Skip to content

Commit 012e3e4

Browse files
committed
optimized global function calls
1 parent 0fe3b8e commit 012e3e4

17 files changed

+21
-0
lines changed

src/PhpGenerator/ClassLike.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
namespace Nette\PhpGenerator;
1111

1212
use Nette;
13+
use function array_map, is_object, strtolower;
1314

1415

1516
/**

src/PhpGenerator/ClassManipulator.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
namespace Nette\PhpGenerator;
1111

1212
use Nette;
13+
use const PHP_VERSION_ID;
1314

1415

1516
final class ClassManipulator

src/PhpGenerator/ClassType.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
namespace Nette\PhpGenerator;
1111

1212
use Nette;
13+
use function array_diff, array_map, strtolower;
1314

1415

1516
/**

src/PhpGenerator/Dumper.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
namespace Nette\PhpGenerator;
1111

1212
use Nette;
13+
use function addcslashes, array_keys, array_shift, count, dechex, implode, in_array, is_array, is_int, is_object, is_resource, is_string, ltrim, method_exists, ord, preg_match, preg_replace, preg_replace_callback, preg_split, range, serialize, str_contains, str_pad, str_repeat, str_replace, strlen, strrpos, strtoupper, substr, trim, unserialize, var_export;
14+
use const PHP_VERSION_ID, PREG_SPLIT_DELIM_CAPTURE, STR_PAD_LEFT;
1315

1416

1517
/**

src/PhpGenerator/Extractor.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
use PhpParser\Node;
1616
use PhpParser\NodeFinder;
1717
use PhpParser\ParserFactory;
18+
use function addcslashes, array_map, assert, class_exists, end, in_array, is_array, method_exists, rtrim, str_contains, str_repeat, str_replace, str_starts_with, strlen, substr, substr_replace, usort;
1819

1920

2021
/**

src/PhpGenerator/Factory.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111

1212
use Nette;
1313
use Nette\Utils\Reflection;
14+
use function array_diff, array_filter, array_key_exists, array_map, count, explode, file_get_contents, implode, is_object, is_subclass_of, method_exists, reset;
15+
use const PHP_VERSION_ID;
1416

1517

1618
/**

src/PhpGenerator/Helpers.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
namespace Nette\PhpGenerator;
1111

1212
use Nette;
13+
use function is_string, preg_match, preg_replace, preg_replace_callback, str_contains, str_repeat, str_replace, strrpos, strtolower, substr, trim;
1314

1415

1516
/**

src/PhpGenerator/Method.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
namespace Nette\PhpGenerator;
1111

1212
use Nette;
13+
use function func_num_args;
1314

1415

1516
/**

src/PhpGenerator/PhpFile.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99

1010
namespace Nette\PhpGenerator;
1111

12+
use function count;
13+
1214

1315
/**
1416
* Definition of a PHP file.

src/PhpGenerator/PhpNamespace.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111

1212
use Nette;
1313
use Nette\InvalidStateException;
14+
use function strlen;
15+
use const ARRAY_FILTER_USE_BOTH;
1416

1517

1618
/**

0 commit comments

Comments
 (0)