PHP code example of leofeyer / optimize-native-functions-fixer
1. Go to this page and download the library: Download leofeyer/optimize-native-functions-fixer library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
leofeyer / optimize-native-functions-fixer example snippets
class MyClass
{
public function isArray($var): bool
{
return \is_array($var);
}
}
return PhpCsFixer\Config::create()
->setRules([
// …
'LeoFeyer/optimize_native_functions' => true,
])
->registerCustomFixers([
new LeoFeyer\PhpCsFixer\OptimizeNativeFunctionsFixer()
])
->setRiskyAllowed(true)
use function is_array;
class MyClass
{
public function isArray($var): bool
{
return is_array($var);
}
}