Coding Standards: Remove unnecessary unset() calls in WP_Importer methods.

Variables created within the scope of a function are discarded automatically when PHP leaves the scope of the function, i.e. on `return`, so doing a call to `unset()` straight before a `return` statement is redundant.

Props jrf, ravipatel, rachelbaker, mukesh27.
Fixes #52996.

git-svn-id: https://develop.svn.wordpress.org/trunk@50692 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov 2021-04-08 11:10:16 +00:00
parent ab3dbadec4
commit 4e5569ddd3

View File

@ -42,9 +42,6 @@ class WP_Importer {
}
} while ( count( $results ) == $limit );
// Unset to save memory.
unset( $results, $r );
return $hashtable;
}
@ -72,9 +69,6 @@ class WP_Importer {
$count = (int) $result[0]->cnt;
}
// Unset to save memory.
unset( $results );
return $count;
}
@ -117,9 +111,6 @@ class WP_Importer {
}
} while ( count( $results ) == $limit );
// Unset to save memory.
unset( $results, $r );
return $hashtable;
}