Passed
Push — master ( f63313...36a266 )
by Michael
05:08
created
src/Mapper/Definition/AnnotationDefinitionProvider.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -48,9 +48,9 @@  discard block
 block discarded – undo
48 48
     static protected function registerAnnotations()
49 49
     {
50 50
         if (self::$annotationsRegistered === false) {
51
-            AnnotationRegistry::registerFile(__DIR__ . '/Annotation/Relationship.php');
52
-            AnnotationRegistry::registerFile(__DIR__ . '/Annotation/Attribute.php');
53
-            AnnotationRegistry::registerFile(__DIR__ . '/Annotation/Link.php');
51
+            AnnotationRegistry::registerFile(__DIR__.'/Annotation/Relationship.php');
52
+            AnnotationRegistry::registerFile(__DIR__.'/Annotation/Attribute.php');
53
+            AnnotationRegistry::registerFile(__DIR__.'/Annotation/Link.php');
54 54
 
55 55
             self::$annotationsRegistered = true;
56 56
         }
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
      */
81 81
     public function getDefinition(string $class): Definition
82 82
     {
83
-        if (! isset($this->definitionCache[$class])) {
83
+        if (!isset($this->definitionCache[$class])) {
84 84
             $reflection = new \ReflectionClass($class);
85 85
 
86 86
             $this->definitionCache[$class] = $this->createDefinition($reflection);
@@ -202,7 +202,7 @@  discard block
 block discarded – undo
202 202
      */
203 203
     protected function validateMethodAttribute(AttributeAnnotation $annotation, \ReflectionMethod $method)
204 204
     {
205
-        if (! $method->isPublic()) {
205
+        if (!$method->isPublic()) {
206 206
             throw new \LogicException(sprintf(
207 207
                 'Attribute annotation can be applied only to non public method "%s".',
208 208
                 $method->getName()
@@ -329,7 +329,7 @@  discard block
 block discarded – undo
329 329
      */
330 330
     protected function processDataType(string $definition, Attribute $attribute)
331 331
     {
332
-        if (! preg_match(self::DATATYPE_PATTERN, $definition, $matches)) {
332
+        if (!preg_match(self::DATATYPE_PATTERN, $definition, $matches)) {
333 333
             throw new \LogicException(sprintf('Data-type definition "%s" is invalid.', $definition));
334 334
         }
335 335
 
@@ -386,7 +386,7 @@  discard block
 block discarded – undo
386 386
 
387 387
         foreach (['get', 'is'] as $prefix)
388 388
         {
389
-            $getter = $prefix . ucfirst($name);
389
+            $getter = $prefix.ucfirst($name);
390 390
 
391 391
             if ($class->hasMethod($getter) && $class->getMethod($getter)->isPublic()) {
392 392
                 return $getter;
@@ -394,7 +394,7 @@  discard block
 block discarded – undo
394 394
         }
395 395
 
396 396
         throw new \LogicException(sprintf(
397
-            'Getter-method for the property "%s" cannot be resolved automatically. ' .
397
+            'Getter-method for the property "%s" cannot be resolved automatically. '.
398 398
             'Probably there is no get%2$s() or is%2$s() method or it is not public.',
399 399
             $name, ucfirst($name)
400 400
         ));
@@ -424,7 +424,7 @@  discard block
 block discarded – undo
424 424
      */
425 425
     protected function createLink(LinkAnnotation $annotation): Link
426 426
     {
427
-        if (! preg_match(self::RESOURCE_PATTERN, $annotation->resource, $matches)) {
427
+        if (!preg_match(self::RESOURCE_PATTERN, $annotation->resource, $matches)) {
428 428
             throw new \LogicException(sprintf('Invalid resource definition: "%s"', $annotation->resource));
429 429
         }
430 430
 
Please login to merge, or discard this patch.