Skip to content
This repository was archived by the owner on Jan 29, 2020. It is now read-only.

Commit c86fa32

Browse files
committed
Merge branch 'feature/#121-import-global-functions-for-opcache-inline-optimisations' into develop
Close #121
2 parents 1dd0230 + 76ed105 commit c86fa32

File tree

75 files changed

+490
-2
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+490
-2
lines changed

src/Annotation/AnnotationCollection.php

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

1212
use ArrayObject;
1313

14+
use function get_class;
15+
1416
class AnnotationCollection extends ArrayObject
1517
{
1618
/**

src/Annotation/AnnotationManager.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@
1515
use Zend\EventManager\EventManagerAwareInterface;
1616
use Zend\EventManager\EventManagerInterface;
1717

18+
use function get_class;
19+
use function is_object;
20+
1821
/**
1922
* Pluggable annotation manager
2023
*

src/Annotation/Parser/DoctrineAnnotationParser.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,15 @@
1515
use Zend\Code\Exception;
1616
use Zend\EventManager\EventInterface;
1717

18+
use function array_shift;
19+
use function class_exists;
20+
use function get_class;
21+
use function gettype;
22+
use function is_array;
23+
use function is_object;
24+
use function preg_replace;
25+
use function sprintf;
26+
1827
/**
1928
* A parser for docblock annotations that utilizes the annotation parser from
2029
* Doctrine\Common.

src/Annotation/Parser/GenericAnnotationParser.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,19 @@
1414
use Zend\Code\Exception;
1515
use Zend\EventManager\EventInterface;
1616

17+
use function array_search;
18+
use function class_exists;
19+
use function get_class;
20+
use function gettype;
21+
use function in_array;
22+
use function is_array;
23+
use function is_object;
24+
use function is_string;
25+
use function sprintf;
26+
use function str_replace;
27+
use function strtolower;
28+
use function trim;
29+
1730
/**
1831
* Generic annotation parser
1932
*

src/Generator/AbstractGenerator.php

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

1212
use Traversable;
1313

14+
use function get_class;
15+
use function gettype;
16+
use function is_array;
17+
use function is_object;
18+
use function method_exists;
19+
use function sprintf;
20+
1421
abstract class AbstractGenerator implements GeneratorInterface
1522
{
1623
/**

src/Generator/AbstractMemberGenerator.php

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

1010
namespace Zend\Code\Generator;
1111

12+
use function is_array;
13+
use function is_string;
14+
use function sprintf;
15+
1216
abstract class AbstractMemberGenerator extends AbstractGenerator
1317
{
1418
/**#@+

src/Generator/ClassGenerator.php

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

1212
use Zend\Code\Reflection\ClassReflection;
1313

14+
use function array_diff;
15+
use function array_map;
16+
use function array_pop;
17+
use function array_search;
18+
use function array_walk;
19+
use function call_user_func_array;
20+
use function explode;
21+
use function get_class;
22+
use function gettype;
23+
use function implode;
24+
use function in_array;
25+
use function is_array;
26+
use function is_scalar;
27+
use function is_string;
28+
use function ltrim;
29+
use function sprintf;
30+
use function str_replace;
31+
use function strrpos;
32+
use function strstr;
33+
use function strtolower;
34+
use function substr;
35+
1436
class ClassGenerator extends AbstractGenerator implements TraitUsageInterface
1537
{
1638
const OBJECT_TYPE = 'class';

src/Generator/DocBlock/Tag/AbstractTypeableTag.php

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

1212
use Zend\Code\Generator\AbstractGenerator;
1313

14+
use function explode;
15+
use function implode;
16+
use function is_string;
17+
1418
/**
1519
* This abstract class can be used as parent for all tags
1620
* that use a type part in their content.

src/Generator/DocBlock/Tag/GenericTag.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
use Zend\Code\Generator\AbstractGenerator;
1313
use Zend\Code\Generic\Prototype\PrototypeGenericInterface;
1414

15+
use function ltrim;
16+
1517
class GenericTag extends AbstractGenerator implements TagInterface, PrototypeGenericInterface
1618
{
1719
/**

src/Generator/DocBlock/Tag/MethodTag.php

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

1010
namespace Zend\Code\Generator\DocBlock\Tag;
1111

12+
use function rtrim;
13+
1214
class MethodTag extends AbstractTypeableTag implements TagInterface
1315
{
1416
/**

src/Generator/DocBlock/Tag/ParamTag.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
use Zend\Code\Generator\DocBlock\TagManager;
1313
use Zend\Code\Reflection\DocBlock\Tag\TagInterface as ReflectionTagInterface;
1414

15+
use function ltrim;
16+
1517
class ParamTag extends AbstractTypeableTag implements TagInterface
1618
{
1719
/**

src/Generator/DocBlock/Tag/PropertyTag.php

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

1010
namespace Zend\Code\Generator\DocBlock\Tag;
1111

12+
use function ltrim;
13+
1214
class PropertyTag extends AbstractTypeableTag implements TagInterface
1315
{
1416
/**

src/Generator/DocBlock/TagManager.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@
1313
use Zend\Code\Generic\Prototype\PrototypeClassFactory;
1414
use Zend\Code\Reflection\DocBlock\Tag\TagInterface as ReflectionTagInterface;
1515

16+
use function method_exists;
17+
use function substr;
18+
use function ucfirst;
19+
1620
/**
1721
* This class is used in DocBlockGenerator and creates the needed
1822
* Tag classes depending on the tag. So for example an @author tag

src/Generator/DocBlockGenerator.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,14 @@
1414
use Zend\Code\Generator\DocBlock\TagManager;
1515
use Zend\Code\Reflection\DocBlockReflection;
1616

17+
use function explode;
18+
use function is_array;
19+
use function sprintf;
20+
use function str_replace;
21+
use function strtolower;
22+
use function trim;
23+
use function wordwrap;
24+
1725
class DocBlockGenerator extends AbstractGenerator
1826
{
1927
/**

src/Generator/FileGenerator.php

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,29 @@
1212
use Zend\Code\Reflection\Exception as ReflectionException;
1313
use Zend\Code\Reflection\FileReflection;
1414

15+
use function array_key_exists;
16+
use function array_merge;
17+
use function count;
18+
use function current;
19+
use function dirname;
20+
use function file_put_contents;
21+
use function in_array;
22+
use function is_array;
23+
use function is_string;
24+
use function is_writable;
25+
use function method_exists;
26+
use function preg_match;
27+
use function preg_replace;
28+
use function property_exists;
29+
use function reset;
30+
use function sprintf;
31+
use function str_repeat;
32+
use function str_replace;
33+
use function strrpos;
34+
use function strtolower;
35+
use function substr;
36+
use function token_get_all;
37+
1538
class FileGenerator extends AbstractGenerator
1639
{
1740
/**

src/Generator/FileGeneratorRegistry.php

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

1212
use Zend\Code\Generator\Exception\RuntimeException;
1313

14+
use function str_replace;
15+
1416
class FileGeneratorRegistry
1517
{
1618
/**

src/Generator/InterfaceGenerator.php

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

1212
use Zend\Code\Reflection\ClassReflection;
1313

14+
use function sprintf;
15+
use function str_replace;
16+
use function strtolower;
17+
1418
class InterfaceGenerator extends ClassGenerator
1519
{
1620
const OBJECT_TYPE = 'interface';

src/Generator/MethodGenerator.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,19 @@
1212
use ReflectionMethod;
1313
use Zend\Code\Reflection\MethodReflection;
1414

15+
use function explode;
16+
use function implode;
17+
use function is_array;
18+
use function is_string;
19+
use function method_exists;
20+
use function preg_replace;
21+
use function sprintf;
22+
use function str_replace;
23+
use function strlen;
24+
use function strtolower;
25+
use function substr;
26+
use function trim;
27+
1528
class MethodGenerator extends AbstractMemberGenerator
1629
{
1730
/**

src/Generator/ParameterGenerator.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@
1212
use ReflectionParameter;
1313
use Zend\Code\Reflection\ParameterReflection;
1414

15+
use function is_string;
16+
use function method_exists;
17+
use function str_replace;
18+
use function strtolower;
19+
1520
class ParameterGenerator extends AbstractGenerator
1621
{
1722
/**

src/Generator/PropertyGenerator.php

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

1212
use Zend\Code\Reflection\PropertyReflection;
1313

14+
use function sprintf;
15+
use function str_replace;
16+
use function strtolower;
17+
1418
class PropertyGenerator extends AbstractMemberGenerator
1519
{
1620
const FLAG_CONSTANT = 0x08;

src/Generator/TraitGenerator.php

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

1212
use Zend\Code\Reflection\ClassReflection;
1313

14+
use function str_replace;
15+
use function strtolower;
16+
1417
class TraitGenerator extends ClassGenerator
1518
{
1619
const OBJECT_TYPE = 'trait';

src/Generator/TraitUsageGenerator.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,19 @@
1212
use Reflection;
1313
use ReflectionMethod;
1414

15+
use function array_key_exists;
16+
use function array_search;
17+
use function array_values;
18+
use function count;
19+
use function current;
20+
use function explode;
21+
use function implode;
22+
use function in_array;
23+
use function is_array;
24+
use function is_string;
25+
use function sprintf;
26+
use function strpos;
27+
1528
class TraitUsageGenerator extends AbstractGenerator implements TraitUsageInterface
1629
{
1730
/**

src/Generator/TypeGenerator.php

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

1212
use Zend\Code\Generator\Exception\InvalidArgumentException;
1313

14+
use function in_array;
15+
use function ltrim;
16+
use function preg_match;
17+
use function sprintf;
18+
use function strpos;
19+
use function strtolower;
20+
use function substr;
21+
1422
final class TypeGenerator implements GeneratorInterface
1523
{
1624
/**

src/Generator/ValueGenerator.php

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,23 @@
1313
use Zend\Code\Exception\InvalidArgumentException;
1414
use Zend\Stdlib\ArrayObject as StdlibArrayObject;
1515

16+
use function addcslashes;
17+
use function array_keys;
18+
use function array_merge;
19+
use function array_search;
20+
use function count;
21+
use function get_class;
22+
use function get_defined_constants;
23+
use function gettype;
24+
use function implode;
25+
use function in_array;
26+
use function is_array;
27+
use function is_int;
28+
use function max;
29+
use function sprintf;
30+
use function str_repeat;
31+
use function strpos;
32+
1633
class ValueGenerator extends AbstractGenerator
1734
{
1835
/**#@+

src/Generic/Prototype/PrototypeClassFactory.php

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

1212
use Zend\Code\Reflection\Exception;
1313

14+
use function str_replace;
15+
1416
/**
1517
* This is a factory for classes which are identified by name.
1618
*

src/NameInformation.php

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

1010
namespace Zend\Code;
1111

12+
use function array_key_exists;
13+
use function array_search;
14+
use function is_array;
15+
use function is_int;
16+
use function is_string;
17+
use function ltrim;
18+
use function strlen;
19+
use function strpos;
20+
use function strrpos;
21+
use function substr;
22+
use function substr_replace;
23+
use function trim;
24+
1225
class NameInformation
1326
{
1427
/**

src/Reflection/ClassReflection.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,14 @@
1515
use Zend\Code\Scanner\AnnotationScanner;
1616
use Zend\Code\Scanner\FileScanner;
1717

18+
use function array_shift;
19+
use function array_slice;
20+
use function array_unshift;
21+
use function file;
22+
use function file_exists;
23+
use function implode;
24+
use function strstr;
25+
1826
class ClassReflection extends ReflectionClass implements ReflectionInterface
1927
{
2028
/**

src/Reflection/DocBlock/Tag/AuthorTag.php

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

1010
namespace Zend\Code\Reflection\DocBlock\Tag;
1111

12+
use function preg_match;
13+
use function rtrim;
14+
1215
class AuthorTag implements TagInterface
1316
{
1417
/**

0 commit comments

Comments
 (0)