Automated native_function_invocation fixes

This commit is contained in:
drowe authored and Adrien Loison committed 2019-11-18 12:17:27 +01:00
1 parent 94b654175c
commit eb88bb4c3a
62 files changed
+237 -237

No files matched your search

@@ -20,7 +20,7 @@ class GlobalFunctionsHelper
*/
public function fopen($fileName, $mode)
{
return fopen($fileName, $mode);
return \fopen($fileName, $mode);
}
/**
@@ -33,7 +33,7 @@ class GlobalFunctionsHelper
*/
public function fgets($handle, $length = null)
{
return fgets($handle, $length);
return \fgets($handle, $length);
}
/**
@@ -46,7 +46,7 @@ class GlobalFunctionsHelper
*/
public function fputs($handle, $string)
{
return fputs($handle, $string);
return \fputs($handle, $string);
}
/**
@@ -58,7 +58,7 @@ class GlobalFunctionsHelper
*/
public function fflush($handle)
{
return fflush($handle);
return \fflush($handle);
}
/**
@@ -71,7 +71,7 @@ class GlobalFunctionsHelper
*/
public function fseek($handle, $offset)
{
return fseek($handle, $offset);
return \fseek($handle, $offset);
}
/**
@@ -92,7 +92,7 @@ class GlobalFunctionsHelper
// @see http://tools.ietf.org/html/rfc4180
$escapeCharacter = PHP_VERSION_ID >= 70400 ? '' : "\0";
return fgetcsv($handle, $length, $delimiter, $enclosure, $escapeCharacter);
return \fgetcsv($handle, $length, $delimiter, $enclosure, $escapeCharacter);
}
/**
@@ -113,7 +113,7 @@ class GlobalFunctionsHelper
// @see http://tools.ietf.org/html/rfc4180
$escapeCharacter = PHP_VERSION_ID >= 70400 ? '' : "\0";
return fputcsv($handle, $fields, $delimiter, $enclosure, $escapeCharacter);
return \fputcsv($handle, $fields, $delimiter, $enclosure, $escapeCharacter);
}
/**
@@ -126,7 +126,7 @@ class GlobalFunctionsHelper
*/
public function fwrite($handle, $string)
{
return fwrite($handle, $string);
return \fwrite($handle, $string);
}
/**
@@ -138,7 +138,7 @@ class GlobalFunctionsHelper
*/
public function fclose($handle)
{
return fclose($handle);
return \fclose($handle);
}
/**
@@ -150,7 +150,7 @@ class GlobalFunctionsHelper
*/
public function rewind($handle)
{
return rewind($handle);
return \rewind($handle);
}
/**
@@ -162,7 +162,7 @@ class GlobalFunctionsHelper
*/
public function file_exists($fileName)
{
return file_exists($fileName);
return \file_exists($fileName);
}
/**
@@ -176,7 +176,7 @@ class GlobalFunctionsHelper
{
$realFilePath = $this->convertToUseRealPath($filePath);
return file_get_contents($realFilePath);
return \file_get_contents($realFilePath);
}
/**
@@ -191,13 +191,13 @@ class GlobalFunctionsHelper
$realFilePath = $filePath;
if ($this->isZipStream($filePath)) {
if (preg_match('/zip:\/\/(.*)#(.*)/', $filePath, $matches)) {
if (\preg_match('/zip:\/\/(.*)#(.*)/', $filePath, $matches)) {
$documentPath = $matches[1];
$documentInsideZipPath = $matches[2];
$realFilePath = 'zip://' . realpath($documentPath) . '#' . $documentInsideZipPath;
$realFilePath = 'zip://' . \realpath($documentPath) . '#' . $documentInsideZipPath;
}
} else {
$realFilePath = realpath($filePath);
$realFilePath = \realpath($filePath);
}
return $realFilePath;
@@ -211,7 +211,7 @@ class GlobalFunctionsHelper
*/
protected function isZipStream($path)
{
return (strpos($path, 'zip://') === 0);
return (\strpos($path, 'zip://') === 0);
}
/**
@@ -223,7 +223,7 @@ class GlobalFunctionsHelper
*/
public function feof($handle)
{
return feof($handle);
return \feof($handle);
}
/**
@@ -235,7 +235,7 @@ class GlobalFunctionsHelper
*/
public function is_readable($fileName)
{
return is_readable($fileName);
return \is_readable($fileName);
}
/**
@@ -248,7 +248,7 @@ class GlobalFunctionsHelper
*/
public function basename($path, $suffix = null)
{
return basename($path, $suffix);
return \basename($path, $suffix);
}
/**
@@ -260,7 +260,7 @@ class GlobalFunctionsHelper
*/
public function header($string)
{
header($string);
\header($string);
}
/**
@@ -271,8 +271,8 @@ class GlobalFunctionsHelper
*/
public function ob_end_clean()
{
if (ob_get_length() > 0) {
ob_end_clean();
if (\ob_get_length() > 0) {
\ob_end_clean();
}
}
@@ -287,7 +287,7 @@ class GlobalFunctionsHelper
*/
public function iconv($string, $sourceEncoding, $targetEncoding)
{
return iconv($sourceEncoding, $targetEncoding, $string);
return \iconv($sourceEncoding, $targetEncoding, $string);
}
/**
@@ -301,7 +301,7 @@ class GlobalFunctionsHelper
*/
public function mb_convert_encoding($string, $sourceEncoding, $targetEncoding)
{
return mb_convert_encoding($string, $targetEncoding, $sourceEncoding);
return \mb_convert_encoding($string, $targetEncoding, $sourceEncoding);
}
/**
@@ -312,7 +312,7 @@ class GlobalFunctionsHelper
*/
public function stream_get_wrappers()
{
return stream_get_wrappers();
return \stream_get_wrappers();
}
/**
@@ -324,6 +324,6 @@ class GlobalFunctionsHelper
*/
public function function_exists($functionName)
{
return function_exists($functionName);
return \function_exists($functionName);
}
}