Automated native_function_invocation fixes
This commit is contained in:
1 parent
94b654175c
commit
eb88bb4c3a
62 files changed
+237
-237
No files matched your search
@@ -135,7 +135,7 @@ class ZipHelper
|
||||
public static function canChooseCompressionMethod()
|
||||
{
|
||||
// setCompressionName() is a PHP7+ method...
|
||||
return (method_exists(new \ZipArchive(), 'setCompressionName'));
|
||||
return (\method_exists(new \ZipArchive(), 'setCompressionName'));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -151,7 +151,7 @@ class ZipHelper
|
||||
|
||||
foreach ($itemIterator as $itemInfo) {
|
||||
$itemRealPath = $this->getNormalizedRealPath($itemInfo->getPathname());
|
||||
$itemLocalPath = str_replace($folderRealPath, '', $itemRealPath);
|
||||
$itemLocalPath = \str_replace($folderRealPath, '', $itemRealPath);
|
||||
|
||||
if ($itemInfo->isFile() && !$this->shouldSkipFile($zip, $itemLocalPath, $existingFileMode)) {
|
||||
$zip->addFile($itemRealPath, $itemLocalPath);
|
||||
@@ -181,9 +181,9 @@ class ZipHelper
|
||||
*/
|
||||
protected function getNormalizedRealPath($path)
|
||||
{
|
||||
$realPath = realpath($path);
|
||||
$realPath = \realpath($path);
|
||||
|
||||
return str_replace(DIRECTORY_SEPARATOR, '/', $realPath);
|
||||
return \str_replace(DIRECTORY_SEPARATOR, '/', $realPath);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -210,8 +210,8 @@ class ZipHelper
|
||||
*/
|
||||
protected function copyZipToStream($zipFilePath, $pointer)
|
||||
{
|
||||
$zipFilePointer = fopen($zipFilePath, 'r');
|
||||
stream_copy_to_stream($zipFilePointer, $pointer);
|
||||
fclose($zipFilePointer);
|
||||
$zipFilePointer = \fopen($zipFilePath, 'r');
|
||||
\stream_copy_to_stream($zipFilePointer, $pointer);
|
||||
\fclose($zipFilePointer);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user