Passed
Push — phpbench-1.x ( a341ce )
by Michael
03:14
created
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/PhpParser.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -53,8 +53,8 @@  discard block
 block discarded – undo
53 53
         }
54 54
 
55 55
         $namespace = preg_quote($class->getNamespaceName());
56
-        $content = preg_replace('/^.*?(\bnamespace\s+' . $namespace . '\s*[;{].*)$/s', '\\1', $content);
57
-        $tokenizer = new TokenParser('<?php ' . $content);
56
+        $content = preg_replace('/^.*?(\bnamespace\s+'.$namespace.'\s*[;{].*)$/s', '\\1', $content);
57
+        $tokenizer = new TokenParser('<?php '.$content);
58 58
 
59 59
         $statements = $tokenizer->parseUseStatements($class->getNamespaceName());
60 60
 
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
      */
72 72
     private function getFileContent($filename, $lineNumber)
73 73
     {
74
-        if ( ! is_file($filename)) {
74
+        if (!is_file($filename)) {
75 75
             return null;
76 76
         }
77 77
 
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/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/TokenParser.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -116,17 +116,17 @@
 block discarded – undo
116 116
                 $explicitAlias = true;
117 117
                 $alias = '';
118 118
             } else if ($token === ',') {
119
-                $statements[strtolower($alias)] = $groupRoot . $class;
119
+                $statements[strtolower($alias)] = $groupRoot.$class;
120 120
                 $class = '';
121 121
                 $alias = '';
122 122
                 $explicitAlias = false;
123 123
             } else if ($token === ';') {
124
-                $statements[strtolower($alias)] = $groupRoot . $class;
124
+                $statements[strtolower($alias)] = $groupRoot.$class;
125 125
                 break;
126
-            } else if ($token === '{' ) {
126
+            } else if ($token === '{') {
127 127
                 $groupRoot = $class;
128 128
                 $class = '';
129
-            } else if ($token === '}' ) {
129
+            } else if ($token === '}') {
130 130
                 continue;
131 131
             } else {
132 132
                 break;
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
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
      */
40 40
     public static function syntaxError($message)
41 41
     {
42
-        return new self('[Syntax Error] ' . $message);
42
+        return new self('[Syntax Error] '.$message);
43 43
     }
44 44
 
45 45
     /**
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
      */
52 52
     public static function semanticalError($message)
53 53
     {
54
-        return new self('[Semantical Error] ' . $message);
54
+        return new self('[Semantical Error] '.$message);
55 55
     }
56 56
 
57 57
     /**
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
      */
67 67
     public static function creationError($message)
68 68
     {
69
-        return new self('[Creation Error] ' . $message);
69
+        return new self('[Creation Error] '.$message);
70 70
     }
71 71
 
72 72
     /**
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
      */
81 81
     public static function typeError($message)
82 82
     {
83
-        return new self('[Type Error] ' . $message);
83
+        return new self('[Type Error] '.$message);
84 84
     }
85 85
 
86 86
     /**
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
         return self::semanticalError(sprintf(
99 99
             "Couldn't find constant %s%s.",
100 100
             $identifier,
101
-            $context ? ', ' . $context : ''
101
+            $context ? ', '.$context : ''
102 102
         ));
103 103
     }
104 104
 
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
             $annotationName,
124 124
             $context,
125 125
             $expected,
126
-            is_object($actual) ? 'an instance of ' . get_class($actual) : gettype($actual)
126
+            is_object($actual) ? 'an instance of '.get_class($actual) : gettype($actual)
127 127
         ));
128 128
     }
129 129
 
Please login to merge, or discard this patch.
lib/Doctrine/Common/Annotations/FileCacheReader.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
      */
73 73
     public function __construct(Reader $reader, $cacheDir, $debug = false, $umask = 0002)
74 74
     {
75
-        if ( ! is_int($umask)) {
75
+        if (!is_int($umask)) {
76 76
             throw new \InvalidArgumentException(sprintf(
77 77
                 'The parameter umask must be an integer, was: %s',
78 78
                 gettype($umask)
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
      */
96 96
     public function getClassAnnotations(\ReflectionClass $class)
97 97
     {
98
-        if ( ! isset($this->classNameHashes[$class->name])) {
98
+        if (!isset($this->classNameHashes[$class->name])) {
99 99
             $this->classNameHashes[$class->name] = sha1($class->name);
100 100
         }
101 101
         $key = $this->classNameHashes[$class->name];
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
     public function getPropertyAnnotations(\ReflectionProperty $property)
131 131
     {
132 132
         $class = $property->getDeclaringClass();
133
-        if ( ! isset($this->classNameHashes[$class->name])) {
133
+        if (!isset($this->classNameHashes[$class->name])) {
134 134
             $this->classNameHashes[$class->name] = sha1($class->name);
135 135
         }
136 136
         $key = $this->classNameHashes[$class->name].'$'.$property->getName();
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
     public function getMethodAnnotations(\ReflectionMethod $method)
166 166
     {
167 167
         $class = $method->getDeclaringClass();
168
-        if ( ! isset($this->classNameHashes[$class->name])) {
168
+        if (!isset($this->classNameHashes[$class->name])) {
169 169
             $this->classNameHashes[$class->name] = sha1($class->name);
170 170
         }
171 171
         $key = $this->classNameHashes[$class->name].'#'.$method->getName();
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
@@ -56,12 +56,12 @@  discard block
 block discarded – undo
56 56
      */
57 57
     public function __construct(array $values)
58 58
     {
59
-        if ( ! isset($values['literal'])) {
59
+        if (!isset($values['literal'])) {
60 60
             $values['literal'] = [];
61 61
         }
62 62
 
63 63
         foreach ($values['value'] as $var) {
64
-            if( ! is_scalar($var)) {
64
+            if (!is_scalar($var)) {
65 65
                 throw new \InvalidArgumentException(sprintf(
66 66
                     '@Enum supports only scalar values "%s" given.',
67 67
                     is_object($var) ? get_class($var) : gettype($var)
@@ -70,10 +70,10 @@  discard block
 block discarded – undo
70 70
         }
71 71
 
72 72
         foreach ($values['literal'] as $key => $var) {
73
-            if( ! in_array($key, $values['value'])) {
73
+            if (!in_array($key, $values['value'])) {
74 74
                 throw new \InvalidArgumentException(sprintf(
75 75
                     'Undefined enumerator value "%s" for literal "%s".',
76
-                    $key , $var
76
+                    $key, $var
77 77
                 ));
78 78
             }
79 79
         }
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
@@ -75,13 +75,13 @@  discard block
 block discarded – undo
75 75
      */
76 76
     public function __construct(array $values)
77 77
     {
78
-        if (!isset($values['value'])){
78
+        if (!isset($values['value'])) {
79 79
             $values['value'] = null;
80 80
         }
81
-        if (is_string($values['value'])){
81
+        if (is_string($values['value'])) {
82 82
             $values['value'] = [$values['value']];
83 83
         }
84
-        if (!is_array($values['value'])){
84
+        if (!is_array($values['value'])) {
85 85
             throw new \InvalidArgumentException(
86 86
                 sprintf('@Target expects either a string value, or an array of strings, "%s" given.',
87 87
                     is_object($values['value']) ? get_class($values['value']) : gettype($values['value'])
@@ -91,10 +91,10 @@  discard block
 block discarded – undo
91 91
 
92 92
         $bitmask = 0;
93 93
         foreach ($values['value'] as $literal) {
94
-            if(!isset(self::$map[$literal])){
94
+            if (!isset(self::$map[$literal])) {
95 95
                 throw new \InvalidArgumentException(
96 96
                     sprintf('Invalid Target "%s". Available targets: [%s]',
97
-                            $literal,  implode(', ', array_keys(self::$map)))
97
+                            $literal, implode(', ', array_keys(self::$map)))
98 98
                 );
99 99
             }
100 100
             $bitmask |= self::$map[$literal];
Please login to merge, or discard this patch.