Passed
Pull Request — master (#278)
by Paweł
04:24
created
lib/Doctrine/Common/Annotations/FileCacheReader.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
      */
56 56
     public function __construct(Reader $reader, $cacheDir, $debug = false, $umask = 0002)
57 57
     {
58
-        if ( ! is_int($umask)) {
58
+        if (!is_int($umask)) {
59 59
             throw new \InvalidArgumentException(sprintf(
60 60
                 'The parameter umask must be an integer, was: %s',
61 61
                 gettype($umask)
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
      */
79 79
     public function getClassAnnotations(\ReflectionClass $class)
80 80
     {
81
-        if ( ! isset($this->classNameHashes[$class->name])) {
81
+        if (!isset($this->classNameHashes[$class->name])) {
82 82
             $this->classNameHashes[$class->name] = sha1($class->name);
83 83
         }
84 84
         $key = $this->classNameHashes[$class->name];
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
     public function getPropertyAnnotations(\ReflectionProperty $property)
114 114
     {
115 115
         $class = $property->getDeclaringClass();
116
-        if ( ! isset($this->classNameHashes[$class->name])) {
116
+        if (!isset($this->classNameHashes[$class->name])) {
117 117
             $this->classNameHashes[$class->name] = sha1($class->name);
118 118
         }
119 119
         $key = $this->classNameHashes[$class->name].'$'.$property->getName();
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
     public function getMethodAnnotations(\ReflectionMethod $method)
149 149
     {
150 150
         $class = $method->getDeclaringClass();
151
-        if ( ! isset($this->classNameHashes[$class->name])) {
151
+        if (!isset($this->classNameHashes[$class->name])) {
152 152
             $this->classNameHashes[$class->name] = sha1($class->name);
153 153
         }
154 154
         $key = $this->classNameHashes[$class->name].'#'.$method->getName();
Please login to merge, or discard this patch.
lib/Doctrine/Common/Annotations/DocParser.php 2 patches
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
                     'array_type'=>'string',
153 153
                     'value'     =>'array<string>'
154 154
                 ]
155
-             ],
155
+                ],
156 156
         ],
157 157
         'Doctrine\Common\Annotations\Annotation\Attribute' => [
158 158
             'is_annotation'    => true,
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
                     'type'      =>'boolean',
182 182
                     'value'     =>'boolean'
183 183
                 ]
184
-             ],
184
+                ],
185 185
         ],
186 186
         'Doctrine\Common\Annotations\Annotation\Attributes' => [
187 187
             'is_annotation'    => true,
@@ -199,7 +199,7 @@  discard block
 block discarded – undo
199 199
                     'array_type'=>'Doctrine\Common\Annotations\Annotation\Attribute',
200 200
                     'value'     =>'array<Doctrine\Common\Annotations\Annotation\Attribute>'
201 201
                 ]
202
-             ],
202
+                ],
203 203
         ],
204 204
         'Doctrine\Common\Annotations\Annotation\Enum' => [
205 205
             'is_annotation'    => true,
@@ -219,7 +219,7 @@  discard block
 block discarded – undo
219 219
                     'type'      => 'array',
220 220
                     'required'  => false,
221 221
                 ],
222
-             ],
222
+                ],
223 223
         ],
224 224
     ];
225 225
 
@@ -761,7 +761,7 @@  discard block
 block discarded – undo
761 761
         if (0 === (self::$annotationMetadata[$name]['targets'] & $target) && $target) {
762 762
             throw AnnotationException::semanticalError(
763 763
                 sprintf('Annotation @%s is not allowed to be declared on %s. You may only use this annotation on these code elements: %s.',
764
-                     $originalName, $this->context, self::$annotationMetadata[$name]['targets_literal'])
764
+                        $originalName, $this->context, self::$annotationMetadata[$name]['targets_literal'])
765 765
             );
766 766
         }
767 767
 
@@ -930,9 +930,9 @@  discard block
 block discarded – undo
930 930
                 case !empty ($this->namespaces):
931 931
                     foreach ($this->namespaces as $ns) {
932 932
                         if (class_exists($ns.'\\'.$className) || interface_exists($ns.'\\'.$className)) {
933
-                             $className = $ns.'\\'.$className;
934
-                             $found = true;
935
-                             break;
933
+                                $className = $ns.'\\'.$className;
934
+                                $found = true;
935
+                                break;
936 936
                         }
937 937
                     }
938 938
                     break;
@@ -957,7 +957,7 @@  discard block
 block discarded – undo
957 957
             }
958 958
 
959 959
             if ($found) {
960
-                 $identifier = $className . '::' . $const;
960
+                    $identifier = $className . '::' . $const;
961 961
             }
962 962
         }
963 963
 
Please login to merge, or discard this patch.
Spacing   +39 added lines, -39 removed lines patch added patch discarded remove patch
@@ -390,7 +390,7 @@  discard block
 block discarded – undo
390 390
      */
391 391
     private function match($token)
392 392
     {
393
-        if ( ! $this->lexer->isNextToken($token) ) {
393
+        if (!$this->lexer->isNextToken($token)) {
394 394
             $this->syntaxError($this->lexer->getLiteral($token));
395 395
         }
396 396
 
@@ -409,7 +409,7 @@  discard block
 block discarded – undo
409 409
      */
410 410
     private function matchAny(array $tokens)
411 411
     {
412
-        if ( ! $this->lexer->isNextTokenAny($tokens)) {
412
+        if (!$this->lexer->isNextTokenAny($tokens)) {
413 413
             $this->syntaxError(implode(' or ', array_map([$this->lexer, 'getLiteral'], $tokens)));
414 414
         }
415 415
 
@@ -438,7 +438,7 @@  discard block
 block discarded – undo
438 438
             : sprintf("'%s' at position %s", $token['value'], $token['position']);
439 439
 
440 440
         if (strlen($this->context)) {
441
-            $message .= ' in ' . $this->context;
441
+            $message .= ' in '.$this->context;
442 442
         }
443 443
 
444 444
         $message .= '.';
@@ -490,10 +490,10 @@  discard block
 block discarded – undo
490 490
                 'attributes'    => 'Doctrine\Common\Annotations\Annotation\Attributes'
491 491
             ]);
492 492
 
493
-            AnnotationRegistry::registerFile(__DIR__ . '/Annotation/Enum.php');
494
-            AnnotationRegistry::registerFile(__DIR__ . '/Annotation/Target.php');
495
-            AnnotationRegistry::registerFile(__DIR__ . '/Annotation/Attribute.php');
496
-            AnnotationRegistry::registerFile(__DIR__ . '/Annotation/Attributes.php');
493
+            AnnotationRegistry::registerFile(__DIR__.'/Annotation/Enum.php');
494
+            AnnotationRegistry::registerFile(__DIR__.'/Annotation/Target.php');
495
+            AnnotationRegistry::registerFile(__DIR__.'/Annotation/Attribute.php');
496
+            AnnotationRegistry::registerFile(__DIR__.'/Annotation/Attributes.php');
497 497
         }
498 498
 
499 499
         $class      = new \ReflectionClass($name);
@@ -515,7 +515,7 @@  discard block
 block discarded – undo
515 515
         if ($metadata['is_annotation']) {
516 516
             self::$metadataParser->setTarget(Target::TARGET_CLASS);
517 517
 
518
-            foreach (self::$metadataParser->parse($docComment, 'class @' . $name) as $annotation) {
518
+            foreach (self::$metadataParser->parse($docComment, 'class @'.$name) as $annotation) {
519 519
                 if ($annotation instanceof Target) {
520 520
                     $metadata['targets']         = $annotation->targets;
521 521
                     $metadata['targets_literal'] = $annotation->literal;
@@ -544,7 +544,7 @@  discard block
 block discarded – undo
544 544
 
545 545
                     $attribute->required = (false !== strpos($propertyComment, '@Required'));
546 546
                     $attribute->name     = $property->name;
547
-                    $attribute->type     = (false !== strpos($propertyComment, '@var') && preg_match('/@var\s+([^\s]+)/',$propertyComment, $matches))
547
+                    $attribute->type     = (false !== strpos($propertyComment, '@var') && preg_match('/@var\s+([^\s]+)/', $propertyComment, $matches))
548 548
                         ? $matches[1]
549 549
                         : 'mixed';
550 550
 
@@ -552,17 +552,17 @@  discard block
 block discarded – undo
552 552
 
553 553
                     // checks if the property has @Enum
554 554
                     if (false !== strpos($propertyComment, '@Enum')) {
555
-                        $context = 'property ' . $class->name . "::\$" . $property->name;
555
+                        $context = 'property '.$class->name."::\$".$property->name;
556 556
 
557 557
                         self::$metadataParser->setTarget(Target::TARGET_PROPERTY);
558 558
 
559 559
                         foreach (self::$metadataParser->parse($propertyComment, $context) as $annotation) {
560
-                            if ( ! $annotation instanceof Enum) {
560
+                            if (!$annotation instanceof Enum) {
561 561
                                 continue;
562 562
                             }
563 563
 
564 564
                             $metadata['enum'][$property->name]['value']   = $annotation->value;
565
-                            $metadata['enum'][$property->name]['literal'] = ( ! empty($annotation->literal))
565
+                            $metadata['enum'][$property->name]['literal'] = (!empty($annotation->literal))
566 566
                                 ? $annotation->literal
567 567
                                 : $annotation->value;
568 568
                         }
@@ -690,7 +690,7 @@  discard block
 block discarded – undo
690 690
 
691 691
         if ('\\' !== $name[0]) {
692 692
             $pos = strpos($name, '\\');
693
-            $alias = (false === $pos)? $name : substr($name, 0, $pos);
693
+            $alias = (false === $pos) ? $name : substr($name, 0, $pos);
694 694
             $found = false;
695 695
             $loweredAlias = strtolower($alias);
696 696
 
@@ -705,19 +705,19 @@  discard block
 block discarded – undo
705 705
             } elseif (isset($this->imports[$loweredAlias])) {
706 706
                 $found = true;
707 707
                 $name  = (false !== $pos)
708
-                    ? $this->imports[$loweredAlias] . substr($name, $pos)
708
+                    ? $this->imports[$loweredAlias].substr($name, $pos)
709 709
                     : $this->imports[$loweredAlias];
710
-            } elseif ( ! isset($this->ignoredAnnotationNames[$name])
710
+            } elseif (!isset($this->ignoredAnnotationNames[$name])
711 711
                 && isset($this->imports['__NAMESPACE__'])
712
-                && $this->classExists($this->imports['__NAMESPACE__'] . '\\' . $name)
712
+                && $this->classExists($this->imports['__NAMESPACE__'].'\\'.$name)
713 713
             ) {
714 714
                 $name  = $this->imports['__NAMESPACE__'].'\\'.$name;
715 715
                 $found = true;
716
-            } elseif (! isset($this->ignoredAnnotationNames[$name]) && $this->classExists($name)) {
716
+            } elseif (!isset($this->ignoredAnnotationNames[$name]) && $this->classExists($name)) {
717 717
                 $found = true;
718 718
             }
719 719
 
720
-            if ( ! $found) {
720
+            if (!$found) {
721 721
                 if ($this->isIgnoredAnnotation($name)) {
722 722
                     return false;
723 723
                 }
@@ -726,9 +726,9 @@  discard block
 block discarded – undo
726 726
             }
727 727
         }
728 728
 
729
-        $name = ltrim($name,'\\');
729
+        $name = ltrim($name, '\\');
730 730
 
731
-        if ( ! $this->classExists($name)) {
731
+        if (!$this->classExists($name)) {
732 732
             throw AnnotationException::semanticalError(sprintf('The annotation "@%s" in %s does not exist, or could not be auto-loaded.', $name, $this->context));
733 733
         }
734 734
 
@@ -738,7 +738,7 @@  discard block
 block discarded – undo
738 738
 
739 739
 
740 740
         // collects the metadata annotation only if there is not yet
741
-        if ( ! isset(self::$annotationMetadata[$name])) {
741
+        if (!isset(self::$annotationMetadata[$name])) {
742 742
             $this->collectAnnotationMetadata($name);
743 743
         }
744 744
 
@@ -771,7 +771,7 @@  discard block
 block discarded – undo
771 771
             // checks all declared attributes
772 772
             foreach (self::$annotationMetadata[$name]['enum'] as $property => $enum) {
773 773
                 // checks if the attribute is a valid enumerator
774
-                if (isset($values[$property]) && ! in_array($values[$property], $enum['value'])) {
774
+                if (isset($values[$property]) && !in_array($values[$property], $enum['value'])) {
775 775
                     throw AnnotationException::enumeratorError($property, $name, $this->context, $enum['literal'], $values[$property]);
776 776
                 }
777 777
             }
@@ -795,7 +795,7 @@  discard block
 block discarded – undo
795 795
 
796 796
             if ($type['type'] === 'array') {
797 797
                 // handle the case of a single value
798
-                if ( ! is_array($values[$property])) {
798
+                if (!is_array($values[$property])) {
799 799
                     $values[$property] = [$values[$property]];
800 800
                 }
801 801
 
@@ -827,7 +827,7 @@  discard block
 block discarded – undo
827 827
                 }
828 828
 
829 829
                 // handle the case if the property has no annotations
830
-                if ( ! $property = self::$annotationMetadata[$name]['default_property']) {
830
+                if (!$property = self::$annotationMetadata[$name]['default_property']) {
831 831
                     throw AnnotationException::creationError(sprintf('The annotation @%s declared on %s does not accept any values, but got %s.', $originalName, $this->context, json_encode($values)));
832 832
                 }
833 833
             }
@@ -847,13 +847,13 @@  discard block
 block discarded – undo
847 847
     {
848 848
         $values = [];
849 849
 
850
-        if ( ! $this->lexer->isNextToken(DocLexer::T_OPEN_PARENTHESIS)) {
850
+        if (!$this->lexer->isNextToken(DocLexer::T_OPEN_PARENTHESIS)) {
851 851
             return $values;
852 852
         }
853 853
 
854 854
         $this->match(DocLexer::T_OPEN_PARENTHESIS);
855 855
 
856
-        if ( ! $this->lexer->isNextToken(DocLexer::T_CLOSE_PARENTHESIS)) {
856
+        if (!$this->lexer->isNextToken(DocLexer::T_CLOSE_PARENTHESIS)) {
857 857
             $values = $this->Values();
858 858
         }
859 859
 
@@ -881,7 +881,7 @@  discard block
 block discarded – undo
881 881
             $token = $this->lexer->lookahead;
882 882
             $value = $this->Value();
883 883
 
884
-            if ( ! is_object($value) && ! is_array($value)) {
884
+            if (!is_object($value) && !is_array($value)) {
885 885
                 $this->syntaxError('Value', $token);
886 886
             }
887 887
 
@@ -891,10 +891,10 @@  discard block
 block discarded – undo
891 891
         foreach ($values as $k => $value) {
892 892
             if (is_object($value) && $value instanceof \stdClass) {
893 893
                 $values[$value->name] = $value->value;
894
-            } else if ( ! isset($values['value'])){
894
+            } else if (!isset($values['value'])) {
895 895
                 $values['value'] = $value;
896 896
             } else {
897
-                if ( ! is_array($values['value'])) {
897
+                if (!is_array($values['value'])) {
898 898
                     $values['value'] = [$values['value']];
899 899
                 }
900 900
 
@@ -918,7 +918,7 @@  discard block
 block discarded – undo
918 918
     {
919 919
         $identifier = $this->Identifier();
920 920
 
921
-        if ( ! defined($identifier) && false !== strpos($identifier, '::') && '\\' !== $identifier[0]) {
921
+        if (!defined($identifier) && false !== strpos($identifier, '::') && '\\' !== $identifier[0]) {
922 922
             list($className, $const) = explode('::', $identifier);
923 923
 
924 924
             $pos = strpos($className, '\\');
@@ -940,12 +940,12 @@  discard block
 block discarded – undo
940 940
                 case isset($this->imports[$loweredAlias]):
941 941
                     $found     = true;
942 942
                     $className = (false !== $pos)
943
-                        ? $this->imports[$loweredAlias] . substr($className, $pos)
943
+                        ? $this->imports[$loweredAlias].substr($className, $pos)
944 944
                         : $this->imports[$loweredAlias];
945 945
                     break;
946 946
 
947 947
                 default:
948
-                    if(isset($this->imports['__NAMESPACE__'])) {
948
+                    if (isset($this->imports['__NAMESPACE__'])) {
949 949
                         $ns = $this->imports['__NAMESPACE__'];
950 950
 
951 951
                         if (class_exists($ns.'\\'.$className) || interface_exists($ns.'\\'.$className)) {
@@ -957,7 +957,7 @@  discard block
 block discarded – undo
957 957
             }
958 958
 
959 959
             if ($found) {
960
-                 $identifier = $className . '::' . $const;
960
+                 $identifier = $className.'::'.$const;
961 961
             }
962 962
         }
963 963
 
@@ -982,7 +982,7 @@  discard block
 block discarded – undo
982 982
     private function Identifier()
983 983
     {
984 984
         // check if we have an annotation
985
-        if ( ! $this->lexer->isNextTokenAny(self::$classIdentifiers)) {
985
+        if (!$this->lexer->isNextTokenAny(self::$classIdentifiers)) {
986 986
             $this->syntaxError('namespace separator or identifier');
987 987
         }
988 988
 
@@ -996,7 +996,7 @@  discard block
 block discarded – undo
996 996
             $this->match(DocLexer::T_NAMESPACE_SEPARATOR);
997 997
             $this->matchAny(self::$classIdentifiers);
998 998
 
999
-            $className .= '\\' . $this->lexer->token['value'];
999
+            $className .= '\\'.$this->lexer->token['value'];
1000 1000
         }
1001 1001
 
1002 1002
         return $className;
@@ -1044,11 +1044,11 @@  discard block
 block discarded – undo
1044 1044
 
1045 1045
             case DocLexer::T_INTEGER:
1046 1046
                 $this->match(DocLexer::T_INTEGER);
1047
-                return (int)$this->lexer->token['value'];
1047
+                return (int) $this->lexer->token['value'];
1048 1048
 
1049 1049
             case DocLexer::T_FLOAT:
1050 1050
                 $this->match(DocLexer::T_FLOAT);
1051
-                return (float)$this->lexer->token['value'];
1051
+                return (float) $this->lexer->token['value'];
1052 1052
 
1053 1053
             case DocLexer::T_TRUE:
1054 1054
                 $this->match(DocLexer::T_TRUE);
@@ -1176,9 +1176,9 @@  discard block
 block discarded – undo
1176 1176
         }
1177 1177
 
1178 1178
         foreach (array_keys($this->ignoredAnnotationNamespaces) as $ignoredAnnotationNamespace) {
1179
-            $ignoredAnnotationNamespace = rtrim($ignoredAnnotationNamespace, '\\') . '\\';
1179
+            $ignoredAnnotationNamespace = rtrim($ignoredAnnotationNamespace, '\\').'\\';
1180 1180
 
1181
-            if (0 === stripos(rtrim($name, '\\') . '\\', $ignoredAnnotationNamespace)) {
1181
+            if (0 === stripos(rtrim($name, '\\').'\\', $ignoredAnnotationNamespace)) {
1182 1182
                 return true;
1183 1183
             }
1184 1184
         }
Please login to merge, or discard this patch.
lib/Doctrine/Common/Annotations/PhpParser.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -36,8 +36,8 @@  discard block
 block discarded – undo
36 36
         }
37 37
 
38 38
         $namespace = preg_quote($class->getNamespaceName());
39
-        $content = preg_replace('/^.*?(\bnamespace\s+' . $namespace . '\s*[;{].*)$/s', '\\1', $content);
40
-        $tokenizer = new TokenParser('<?php ' . $content);
39
+        $content = preg_replace('/^.*?(\bnamespace\s+'.$namespace.'\s*[;{].*)$/s', '\\1', $content);
40
+        $tokenizer = new TokenParser('<?php '.$content);
41 41
 
42 42
         $statements = $tokenizer->parseUseStatements($class->getNamespaceName());
43 43
 
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
      */
55 55
     private function getFileContent($filename, $lineNumber)
56 56
     {
57
-        if ( ! is_file($filename)) {
57
+        if (!is_file($filename)) {
58 58
             return null;
59 59
         }
60 60
 
Please login to merge, or discard this patch.
lib/Doctrine/Common/Annotations/AnnotationException.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
      */
23 23
     public static function syntaxError($message)
24 24
     {
25
-        return new self('[Syntax Error] ' . $message);
25
+        return new self('[Syntax Error] '.$message);
26 26
     }
27 27
 
28 28
     /**
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
      */
35 35
     public static function semanticalError($message)
36 36
     {
37
-        return new self('[Semantical Error] ' . $message);
37
+        return new self('[Semantical Error] '.$message);
38 38
     }
39 39
 
40 40
     /**
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
      */
50 50
     public static function creationError($message)
51 51
     {
52
-        return new self('[Creation Error] ' . $message);
52
+        return new self('[Creation Error] '.$message);
53 53
     }
54 54
 
55 55
     /**
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
      */
64 64
     public static function typeError($message)
65 65
     {
66
-        return new self('[Type Error] ' . $message);
66
+        return new self('[Type Error] '.$message);
67 67
     }
68 68
 
69 69
     /**
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
         return self::semanticalError(sprintf(
82 82
             "Couldn't find constant %s%s.",
83 83
             $identifier,
84
-            $context ? ', ' . $context : ''
84
+            $context ? ', '.$context : ''
85 85
         ));
86 86
     }
87 87
 
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
             $annotationName,
107 107
             $context,
108 108
             $expected,
109
-            is_object($actual) ? 'an instance of ' . get_class($actual) : gettype($actual)
109
+            is_object($actual) ? 'an instance of '.get_class($actual) : gettype($actual)
110 110
         ));
111 111
     }
112 112
 
Please login to merge, or discard this patch.
lib/Doctrine/Common/Annotations/TokenParser.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -99,17 +99,17 @@
 block discarded – undo
99 99
                 $explicitAlias = true;
100 100
                 $alias = '';
101 101
             } else if ($token === ',') {
102
-                $statements[strtolower($alias)] = $groupRoot . $class;
102
+                $statements[strtolower($alias)] = $groupRoot.$class;
103 103
                 $class = '';
104 104
                 $alias = '';
105 105
                 $explicitAlias = false;
106 106
             } else if ($token === ';') {
107
-                $statements[strtolower($alias)] = $groupRoot . $class;
107
+                $statements[strtolower($alias)] = $groupRoot.$class;
108 108
                 break;
109
-            } else if ($token === '{' ) {
109
+            } else if ($token === '{') {
110 110
                 $groupRoot = $class;
111 111
                 $class = '';
112
-            } else if ($token === '}' ) {
112
+            } else if ($token === '}') {
113 113
                 continue;
114 114
             } else {
115 115
                 break;
Please login to merge, or discard this patch.
lib/Doctrine/Common/Annotations/AnnotationReader.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
         'Required' => true,
60 60
         'Target' => true,
61 61
         // Widely used tags (but not existent in phpdoc)
62
-        'fix' => true , 'fixme' => true,
62
+        'fix' => true, 'fixme' => true,
63 63
         'override' => true,
64 64
         // PHPDocumentor 1 tags
65 65
         'abstract'=> true, 'access'=> true,
@@ -187,7 +187,7 @@  discard block
 block discarded – undo
187 187
             throw AnnotationException::optimizerPlusSaveComments();
188 188
         }
189 189
 
190
-        AnnotationRegistry::registerFile(__DIR__ . '/Annotation/IgnoreAnnotation.php');
190
+        AnnotationRegistry::registerFile(__DIR__.'/Annotation/IgnoreAnnotation.php');
191 191
 
192 192
         $this->parser = $parser ?: new DocParser();
193 193
 
@@ -209,7 +209,7 @@  discard block
 block discarded – undo
209 209
         $this->parser->setIgnoredAnnotationNames($this->getIgnoredAnnotationNames($class));
210 210
         $this->parser->setIgnoredAnnotationNamespaces(self::$globalIgnoredNamespaces);
211 211
 
212
-        return $this->parser->parse($class->getDocComment(), 'class ' . $class->getName());
212
+        return $this->parser->parse($class->getDocComment(), 'class '.$class->getName());
213 213
     }
214 214
 
215 215
     /**
@@ -234,7 +234,7 @@  discard block
 block discarded – undo
234 234
     public function getPropertyAnnotations(ReflectionProperty $property)
235 235
     {
236 236
         $class   = $property->getDeclaringClass();
237
-        $context = 'property ' . $class->getName() . "::\$" . $property->getName();
237
+        $context = 'property '.$class->getName()."::\$".$property->getName();
238 238
 
239 239
         $this->parser->setTarget(Target::TARGET_PROPERTY);
240 240
         $this->parser->setImports($this->getPropertyImports($property));
@@ -266,7 +266,7 @@  discard block
 block discarded – undo
266 266
     public function getMethodAnnotations(ReflectionMethod $method)
267 267
     {
268 268
         $class   = $method->getDeclaringClass();
269
-        $context = 'method ' . $class->getName() . '::' . $method->getName() . '()';
269
+        $context = 'method '.$class->getName().'::'.$method->getName().'()';
270 270
 
271 271
         $this->parser->setTarget(Target::TARGET_METHOD);
272 272
         $this->parser->setImports($this->getMethodImports($method));
@@ -386,7 +386,7 @@  discard block
 block discarded – undo
386 386
     private function collectParsingMetadata(ReflectionClass $class)
387 387
     {
388 388
         $ignoredAnnotationNames = self::$globalIgnoredNames;
389
-        $annotations            = $this->preParser->parse($class->getDocComment(), 'class ' . $class->name);
389
+        $annotations            = $this->preParser->parse($class->getDocComment(), 'class '.$class->name);
390 390
 
391 391
         foreach ($annotations as $annotation) {
392 392
             if ($annotation instanceof IgnoreAnnotation) {
Please login to merge, or discard this patch.
lib/Doctrine/Common/Annotations/AnnotationRegistry.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
      */
124 124
     public static function registerUniqueLoader(callable $callable) : void
125 125
     {
126
-        if ( ! in_array($callable, self::$loaders, true) ) {
126
+        if (!in_array($callable, self::$loaders, true)) {
127 127
             self::registerLoader($callable);
128 128
         }
129 129
     }
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
 
144 144
         foreach (self::$autoloadNamespaces AS $namespace => $dirs) {
145 145
             if (\strpos($class, $namespace) === 0) {
146
-                $file = \str_replace('\\', \DIRECTORY_SEPARATOR, $class) . '.php';
146
+                $file = \str_replace('\\', \DIRECTORY_SEPARATOR, $class).'.php';
147 147
 
148 148
                 if ($dirs === null) {
149 149
                     if ($path = stream_resolve_include_path($file)) {
@@ -151,9 +151,9 @@  discard block
 block discarded – undo
151 151
                         return true;
152 152
                     }
153 153
                 } else {
154
-                    foreach((array) $dirs AS $dir) {
155
-                        if (is_file($dir . \DIRECTORY_SEPARATOR . $file)) {
156
-                            require $dir . \DIRECTORY_SEPARATOR . $file;
154
+                    foreach ((array) $dirs AS $dir) {
155
+                        if (is_file($dir.\DIRECTORY_SEPARATOR.$file)) {
156
+                            require $dir.\DIRECTORY_SEPARATOR.$file;
157 157
                             return true;
158 158
                         }
159 159
                     }
Please login to merge, or discard this patch.
lib/Doctrine/Common/Annotations/Annotation/Enum.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -38,12 +38,12 @@  discard block
 block discarded – undo
38 38
      */
39 39
     public function __construct(array $values)
40 40
     {
41
-        if ( ! isset($values['literal'])) {
41
+        if (!isset($values['literal'])) {
42 42
             $values['literal'] = [];
43 43
         }
44 44
 
45 45
         foreach ($values['value'] as $var) {
46
-            if( ! is_scalar($var)) {
46
+            if (!is_scalar($var)) {
47 47
                 throw new \InvalidArgumentException(sprintf(
48 48
                     '@Enum supports only scalar values "%s" given.',
49 49
                     is_object($var) ? get_class($var) : gettype($var)
@@ -52,10 +52,10 @@  discard block
 block discarded – undo
52 52
         }
53 53
 
54 54
         foreach ($values['literal'] as $key => $var) {
55
-            if( ! in_array($key, $values['value'])) {
55
+            if (!in_array($key, $values['value'])) {
56 56
                 throw new \InvalidArgumentException(sprintf(
57 57
                     'Undefined enumerator value "%s" for literal "%s".',
58
-                    $key , $var
58
+                    $key, $var
59 59
                 ));
60 60
             }
61 61
         }
Please login to merge, or discard this patch.
lib/Doctrine/Common/Annotations/Annotation/Target.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -57,13 +57,13 @@  discard block
 block discarded – undo
57 57
      */
58 58
     public function __construct(array $values)
59 59
     {
60
-        if (!isset($values['value'])){
60
+        if (!isset($values['value'])) {
61 61
             $values['value'] = null;
62 62
         }
63
-        if (is_string($values['value'])){
63
+        if (is_string($values['value'])) {
64 64
             $values['value'] = [$values['value']];
65 65
         }
66
-        if (!is_array($values['value'])){
66
+        if (!is_array($values['value'])) {
67 67
             throw new \InvalidArgumentException(
68 68
                 sprintf('@Target expects either a string value, or an array of strings, "%s" given.',
69 69
                     is_object($values['value']) ? get_class($values['value']) : gettype($values['value'])
@@ -73,10 +73,10 @@  discard block
 block discarded – undo
73 73
 
74 74
         $bitmask = 0;
75 75
         foreach ($values['value'] as $literal) {
76
-            if(!isset(self::$map[$literal])){
76
+            if (!isset(self::$map[$literal])) {
77 77
                 throw new \InvalidArgumentException(
78 78
                     sprintf('Invalid Target "%s". Available targets: [%s]',
79
-                            $literal,  implode(', ', array_keys(self::$map)))
79
+                            $literal, implode(', ', array_keys(self::$map)))
80 80
                 );
81 81
             }
82 82
             $bitmask |= self::$map[$literal];
Please login to merge, or discard this patch.