Completed
Pull Request — master (#1200)
by Rene
11:27
created
src/Handler/HandlerRegistry.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -23,10 +23,10 @@  discard block
 block discarded – undo
23 23
 
24 24
         switch ($direction) {
25 25
             case GraphNavigatorInterface::DIRECTION_DESERIALIZATION:
26
-                return 'deserialize' . $type . 'From' . $format;
26
+                return 'deserialize'.$type.'From'.$format;
27 27
 
28 28
             case GraphNavigatorInterface::DIRECTION_SERIALIZATION:
29
-                return 'serialize' . $type . 'To' . $format;
29
+                return 'serialize'.$type.'To'.$format;
30 30
 
31 31
             default:
32 32
                 throw new LogicException(sprintf('The direction %s does not exist; see GraphNavigatorInterface::DIRECTION_??? constants.', json_encode($direction)));
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
     public function registerSubscribingHandler(SubscribingHandlerInterface $handler): void
42 42
     {
43 43
         foreach ($handler->getSubscribingMethods() as $methodData) {
44
-            if (!isset($methodData['type'], $methodData['format'])) {
44
+            if ( ! isset($methodData['type'], $methodData['format'])) {
45 45
                 throw new RuntimeException(sprintf('For each subscribing method a "type" and "format" attribute must be given, but only got "%s" for %s.', implode('" and "', array_keys($methodData)), \get_class($handler)));
46 46
             }
47 47
 
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
      */
71 71
     public function getHandler(int $direction, string $typeName, string $format)
72 72
     {
73
-        if (!isset($this->handlers[$direction][$typeName][$format])) {
73
+        if ( ! isset($this->handlers[$direction][$typeName][$format])) {
74 74
             return null;
75 75
         }
76 76
 
Please login to merge, or discard this patch.
src/Handler/LazyHandlerRegistry.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
      */
27 27
     public function __construct($container, array $handlers = [])
28 28
     {
29
-        if (!$container instanceof PsrContainerInterface && !$container instanceof ContainerInterface) {
29
+        if ( ! $container instanceof PsrContainerInterface && ! $container instanceof ContainerInterface) {
30 30
             throw new InvalidArgumentException(sprintf('The container must be an instance of %s or %s (%s given).', PsrContainerInterface::class, ContainerInterface::class, \is_object($container) ? \get_class($container) : \gettype($container)));
31 31
         }
32 32
 
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
             return $this->initializedHandlers[$direction][$typeName][$format];
53 53
         }
54 54
 
55
-        if (!isset($this->handlers[$direction][$typeName][$format])) {
55
+        if ( ! isset($this->handlers[$direction][$typeName][$format])) {
56 56
             return null;
57 57
         }
58 58
 
Please login to merge, or discard this patch.
src/Metadata/ClassMetadata.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -159,12 +159,12 @@  discard block
 block discarded – undo
159 159
      */
160 160
     public function setAccessorOrder(string $order, array $customOrder = []): void
161 161
     {
162
-        if (!in_array($order, [self::ACCESSOR_ORDER_UNDEFINED, self::ACCESSOR_ORDER_ALPHABETICAL, self::ACCESSOR_ORDER_CUSTOM], true)) {
162
+        if ( ! in_array($order, [self::ACCESSOR_ORDER_UNDEFINED, self::ACCESSOR_ORDER_ALPHABETICAL, self::ACCESSOR_ORDER_CUSTOM], true)) {
163 163
             throw new InvalidMetadataException(sprintf('The accessor order "%s" is invalid.', $order));
164 164
         }
165 165
 
166 166
         foreach ($customOrder as $name) {
167
-            if (!\is_string($name)) {
167
+            if ( ! \is_string($name)) {
168 168
                 throw new InvalidMetadataException(sprintf('$customOrder is expected to be a list of strings, but got element of value %s.', json_encode($name)));
169 169
             }
170 170
         }
@@ -200,7 +200,7 @@  discard block
 block discarded – undo
200 200
 
201 201
     public function merge(MergeableInterface $object): void
202 202
     {
203
-        if (!$object instanceof ClassMetadata) {
203
+        if ( ! $object instanceof ClassMetadata) {
204 204
             throw new InvalidMetadataException('$object must be an instance of ClassMetadata.');
205 205
         }
206 206
         parent::merge($object);
@@ -224,7 +224,7 @@  discard block
 block discarded – undo
224 224
                 $this->discriminatorBaseClass,
225 225
                 $this->discriminatorBaseClass
226 226
             ));
227
-        } elseif (!$this->discriminatorFieldName && $object->discriminatorFieldName) {
227
+        } elseif ( ! $this->discriminatorFieldName && $object->discriminatorFieldName) {
228 228
             $this->discriminatorFieldName = $object->discriminatorFieldName;
229 229
             $this->discriminatorMap = $object->discriminatorMap;
230 230
         }
@@ -246,12 +246,12 @@  discard block
 block discarded – undo
246 246
 
247 247
     public function registerNamespace(string $uri, ?string $prefix = null): void
248 248
     {
249
-        if (!\is_string($uri)) {
249
+        if ( ! \is_string($uri)) {
250 250
             throw new InvalidMetadataException(sprintf('$uri is expected to be a strings, but got value %s.', json_encode($uri)));
251 251
         }
252 252
 
253 253
         if (null !== $prefix) {
254
-            if (!\is_string($prefix)) {
254
+            if ( ! \is_string($prefix)) {
255 255
                 throw new InvalidMetadataException(sprintf('$prefix is expected to be a strings, but got value %s.', json_encode($prefix)));
256 256
             }
257 257
         } else {
@@ -367,8 +367,8 @@  discard block
 block discarded – undo
367 367
     private function handleDiscriminatorProperty(): void
368 368
     {
369 369
         if ($this->discriminatorMap
370
-            && !$this->getReflection()->isAbstract()
371
-            && !$this->getReflection()->isInterface()
370
+            && ! $this->getReflection()->isAbstract()
371
+            && ! $this->getReflection()->isInterface()
372 372
         ) {
373 373
             if (false === $typeValue = array_search($this->name, $this->discriminatorMap, true)) {
374 374
                 throw new InvalidMetadataException(sprintf(
@@ -381,7 +381,7 @@  discard block
 block discarded – undo
381 381
             $this->discriminatorValue = $typeValue;
382 382
 
383 383
             if (isset($this->propertyMetadata[$this->discriminatorFieldName])
384
-                && !$this->propertyMetadata[$this->discriminatorFieldName] instanceof StaticPropertyMetadata
384
+                && ! $this->propertyMetadata[$this->discriminatorFieldName] instanceof StaticPropertyMetadata
385 385
             ) {
386 386
                 throw new InvalidMetadataException(sprintf(
387 387
                     'The discriminator field name "%s" of the base-class "%s" conflicts with a regular property of the sub-class "%s".',
Please login to merge, or discard this patch.
src/Metadata/PropertyMetadata.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -157,22 +157,22 @@  discard block
 block discarded – undo
157 157
             $class = $this->getReflection()->getDeclaringClass();
158 158
 
159 159
             if (empty($getter)) {
160
-                if ($class->hasMethod('get' . $this->name) && $class->getMethod('get' . $this->name)->isPublic()) {
161
-                    $getter = 'get' . $this->name;
162
-                } elseif ($class->hasMethod('is' . $this->name) && $class->getMethod('is' . $this->name)->isPublic()) {
163
-                    $getter = 'is' . $this->name;
164
-                } elseif ($class->hasMethod('has' . $this->name) && $class->getMethod('has' . $this->name)->isPublic()) {
165
-                    $getter = 'has' . $this->name;
160
+                if ($class->hasMethod('get'.$this->name) && $class->getMethod('get'.$this->name)->isPublic()) {
161
+                    $getter = 'get'.$this->name;
162
+                } elseif ($class->hasMethod('is'.$this->name) && $class->getMethod('is'.$this->name)->isPublic()) {
163
+                    $getter = 'is'.$this->name;
164
+                } elseif ($class->hasMethod('has'.$this->name) && $class->getMethod('has'.$this->name)->isPublic()) {
165
+                    $getter = 'has'.$this->name;
166 166
                 } else {
167
-                    throw new InvalidMetadataException(sprintf('There is neither a public %s method, nor a public %s method, nor a public %s method in class %s. Please specify which public method should be used for retrieving the value of the property %s.', 'get' . ucfirst($this->name), 'is' . ucfirst($this->name), 'has' . ucfirst($this->name), $this->class, $this->name));
167
+                    throw new InvalidMetadataException(sprintf('There is neither a public %s method, nor a public %s method, nor a public %s method in class %s. Please specify which public method should be used for retrieving the value of the property %s.', 'get'.ucfirst($this->name), 'is'.ucfirst($this->name), 'has'.ucfirst($this->name), $this->class, $this->name));
168 168
                 }
169 169
             }
170 170
 
171
-            if (empty($setter) && !$this->readOnly) {
172
-                if ($class->hasMethod('set' . $this->name) && $class->getMethod('set' . $this->name)->isPublic()) {
173
-                    $setter = 'set' . $this->name;
171
+            if (empty($setter) && ! $this->readOnly) {
172
+                if ($class->hasMethod('set'.$this->name) && $class->getMethod('set'.$this->name)->isPublic()) {
173
+                    $setter = 'set'.$this->name;
174 174
                 } else {
175
-                    throw new InvalidMetadataException(sprintf('There is no public %s method in class %s. Please specify which public method should be used for setting the value of the property %s.', 'set' . ucfirst($this->name), $this->class, $this->name));
175
+                    throw new InvalidMetadataException(sprintf('There is no public %s method in class %s. Please specify which public method should be used for setting the value of the property %s.', 'set'.ucfirst($this->name), $this->class, $this->name));
176 176
                 }
177 177
             }
178 178
         }
@@ -191,7 +191,7 @@  discard block
 block discarded – undo
191 191
         return is_array($type)
192 192
             && 'array' === $type['name']
193 193
             && isset($type['params'][0])
194
-            && !isset($type['params'][1]);
194
+            && ! isset($type['params'][1]);
195 195
     }
196 196
 
197 197
     public static function isCollectionMap(?array $type = null): bool
Please login to merge, or discard this patch.
src/Metadata/Driver/AnnotationDriver.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
     public function loadMetadataForClass(\ReflectionClass $class): ?BaseClassMetadata
78 78
     {
79 79
         $classMetadata = new ClassMetadata($name = $class->name);
80
-        $fileResource =  $class->getFilename();
80
+        $fileResource = $class->getFilename();
81 81
         if (false !== $fileResource) {
82 82
             $classMetadata->fileResources[] = $fileResource;
83 83
         }
@@ -153,7 +153,7 @@  discard block
 block discarded – undo
153 153
             }
154 154
         }
155 155
 
156
-        if (!$excludeAll) {
156
+        if ( ! $excludeAll) {
157 157
             foreach ($class->getProperties() as $property) {
158 158
                 if ($property->class !== $name || (isset($property->info) && $property->info['class'] !== $name)) {
159 159
                     continue;
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
                     } elseif ($annot instanceof Expose) {
185 185
                         $isExpose = true;
186 186
                         if (null !== $annot->if) {
187
-                            $propertyMetadata->excludeIf = $this->parseExpression('!(' . $annot->if . ')');
187
+                            $propertyMetadata->excludeIf = $this->parseExpression('!('.$annot->if.')');
188 188
                         }
189 189
                     } elseif ($annot instanceof Exclude) {
190 190
                         if (null !== $annot->if) {
@@ -233,7 +233,7 @@  discard block
 block discarded – undo
233 233
                                 throw new InvalidMetadataException(sprintf(
234 234
                                     'Invalid group name "%s" on "%s", did you mean to create multiple groups?',
235 235
                                     implode(', ', $propertyMetadata->groups),
236
-                                    $propertyMetadata->class . '->' . $propertyMetadata->name
236
+                                    $propertyMetadata->class.'->'.$propertyMetadata->name
237 237
                                 ));
238 238
                             }
239 239
                         }
@@ -255,7 +255,7 @@  discard block
 block discarded – undo
255 255
                     }
256 256
                 }
257 257
 
258
-                if (!$propertyMetadata->serializedName) {
258
+                if ( ! $propertyMetadata->serializedName) {
259 259
                     $propertyMetadata->serializedName = $this->namingStrategy->translateName($propertyMetadata);
260 260
                 }
261 261
 
@@ -265,7 +265,7 @@  discard block
 block discarded – undo
265 265
                     }
266 266
                 }
267 267
 
268
-                if ((ExclusionPolicy::NONE === $exclusionPolicy && !$isExclude)
268
+                if ((ExclusionPolicy::NONE === $exclusionPolicy && ! $isExclude)
269 269
                     || (ExclusionPolicy::ALL === $exclusionPolicy && $isExpose)
270 270
                 ) {
271 271
                     $propertyMetadata->setAccessor($accessType, $accessor[0], $accessor[1]);
Please login to merge, or discard this patch.
src/Metadata/Driver/NullDriver.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
13 13
     public function loadMetadataForClass(\ReflectionClass $class): ?BaseClassMetadata
14 14
     {
15 15
         $classMetadata = new ClassMetadata($name = $class->name);
16
-        $fileResource =  $class->getFilename();
16
+        $fileResource = $class->getFilename();
17 17
         if (false !== $fileResource) {
18 18
             $classMetadata->fileResources[] = $fileResource;
19 19
         }
Please login to merge, or discard this patch.
src/Metadata/Driver/AbstractDoctrineTypeDriver.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
         $classMetadata = $this->delegate->loadMetadataForClass($class);
84 84
 
85 85
         // Abort if the given class is not a mapped entity
86
-        if (!$doctrineMetadata = $this->tryLoadingDoctrineMetadata($class->name)) {
86
+        if ( ! $doctrineMetadata = $this->tryLoadingDoctrineMetadata($class->name)) {
87 87
             return $classMetadata;
88 88
         }
89 89
 
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
 
132 132
     protected function tryLoadingDoctrineMetadata(string $className): ?DoctrineClassMetadata
133 133
     {
134
-        if (!$manager = $this->registry->getManagerForClass($className)) {
134
+        if ( ! $manager = $this->registry->getManagerForClass($className)) {
135 135
             return null;
136 136
         }
137 137
 
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
 
145 145
     protected function normalizeFieldType(string $type): ?string
146 146
     {
147
-        if (!isset($this->fieldMapping[$type])) {
147
+        if ( ! isset($this->fieldMapping[$type])) {
148 148
             return null;
149 149
         }
150 150
 
Please login to merge, or discard this patch.
src/Metadata/Driver/DoctrineTypeDriver.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -16,8 +16,8 @@  discard block
 block discarded – undo
16 16
 {
17 17
     protected function setDiscriminator(DoctrineClassMetadata $doctrineMetadata, ClassMetadata $classMetadata): void
18 18
     {
19
-        if (empty($classMetadata->discriminatorMap) && !$classMetadata->discriminatorDisabled
20
-            && !empty($doctrineMetadata->discriminatorMap) && $doctrineMetadata->isRootEntity()
19
+        if (empty($classMetadata->discriminatorMap) && ! $classMetadata->discriminatorDisabled
20
+            && ! empty($doctrineMetadata->discriminatorMap) && $doctrineMetadata->isRootEntity()
21 21
         ) {
22 22
             $classMetadata->setDiscriminator(
23 23
                 $doctrineMetadata->discriminatorColumn['name'],
@@ -43,11 +43,11 @@  discard block
 block discarded – undo
43 43
             // For inheritance schemes, we cannot add any type as we would only add the super-type of the hierarchy.
44 44
             // On serialization, this would lead to only the supertype being serialized, and properties of subtypes
45 45
             // being ignored.
46
-            if ($targetMetadata instanceof DoctrineClassMetadata && !$targetMetadata->isInheritanceTypeNone()) {
46
+            if ($targetMetadata instanceof DoctrineClassMetadata && ! $targetMetadata->isInheritanceTypeNone()) {
47 47
                 return;
48 48
             }
49 49
 
50
-            if (!$doctrineMetadata->isSingleValuedAssociation($propertyName)) {
50
+            if ( ! $doctrineMetadata->isSingleValuedAssociation($propertyName)) {
51 51
                 $targetEntity = sprintf('ArrayCollection<%s>', $targetEntity);
52 52
             }
53 53
 
Please login to merge, or discard this patch.
src/Metadata/Driver/XmlDriver.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -54,13 +54,13 @@  discard block
 block discarded – undo
54 54
         }
55 55
 
56 56
         $metadata = new ClassMetadata($name = $class->name);
57
-        if (!$elems = $elem->xpath("./class[@name = '" . $name . "']")) {
57
+        if ( ! $elems = $elem->xpath("./class[@name = '".$name."']")) {
58 58
             throw new InvalidMetadataException(sprintf('Could not find class %s inside XML element.', $name));
59 59
         }
60 60
         $elem = reset($elems);
61 61
 
62 62
         $metadata->fileResources[] = $path;
63
-        $fileResource =  $class->getFilename();
63
+        $fileResource = $class->getFilename();
64 64
         if (false !== $fileResource) {
65 65
             $metadata->fileResources[] = $fileResource;
66 66
         }
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
         $discriminatorFieldName = (string) $elem->attributes()->{'discriminator-field-name'};
93 93
         $discriminatorMap = [];
94 94
         foreach ($elem->xpath('./discriminator-class') as $entry) {
95
-            if (!isset($entry->attributes()->value)) {
95
+            if ( ! isset($entry->attributes()->value)) {
96 96
                 throw new InvalidMetadataException('Each discriminator-class element must have a "value" attribute.');
97 97
             }
98 98
 
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
 
102 102
         if ('true' === (string) $elem->attributes()->{'discriminator-disabled'}) {
103 103
             $metadata->discriminatorDisabled = true;
104
-        } elseif (!empty($discriminatorFieldName) || !empty($discriminatorMap)) {
104
+        } elseif ( ! empty($discriminatorFieldName) || ! empty($discriminatorMap)) {
105 105
             $discriminatorGroups = [];
106 106
             foreach ($elem->xpath('./discriminator-groups/group') as $entry) {
107 107
                 $discriminatorGroups[] = (string) $entry;
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
         }
111 111
 
112 112
         foreach ($elem->xpath('./xml-namespace') as $xmlNamespace) {
113
-            if (!isset($xmlNamespace->attributes()->uri)) {
113
+            if ( ! isset($xmlNamespace->attributes()->uri)) {
114 114
                 throw new InvalidMetadataException('The prefix attribute must be set for all xml-namespace elements.');
115 115
             }
116 116
 
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
                     $this->parseExpression((string) $method->attributes()->expression)
144 144
                 );
145 145
             } else {
146
-                if (!isset($method->attributes()->method)) {
146
+                if ( ! isset($method->attributes()->method)) {
147 147
                     throw new InvalidMetadataException('The method attribute must be set for all virtual-property elements.');
148 148
                 }
149 149
                 $virtualPropertyMetadata = new VirtualPropertyMetadata($name, (string) $method->attributes()->method);
@@ -153,7 +153,7 @@  discard block
 block discarded – undo
153 153
             $propertiesNodes[] = $method;
154 154
         }
155 155
 
156
-        if (!$excludeAll) {
156
+        if ( ! $excludeAll) {
157 157
             foreach ($class->getProperties() as $property) {
158 158
                 if ($property->class !== $name || (isset($property->info) && $property->info['class'] !== $name)) {
159 159
                     continue;
@@ -161,7 +161,7 @@  discard block
 block discarded – undo
161 161
                 $pName = $property->getName();
162 162
                 $propertiesMetadata[] = new PropertyMetadata($name, $pName);
163 163
 
164
-                $pElems = $elem->xpath("./property[@name = '" . $pName . "']");
164
+                $pElems = $elem->xpath("./property[@name = '".$pName."']");
165 165
                 $propertiesNodes[] = $pElems ? reset($pElems) : null;
166 166
             }
167 167
 
@@ -172,7 +172,7 @@  discard block
 block discarded – undo
172 172
                     || isset($propertiesNodes[$propertyKey]);
173 173
 
174 174
                 $pElem = $propertiesNodes[$propertyKey];
175
-                if (!empty($pElem)) {
175
+                if ( ! empty($pElem)) {
176 176
                     if (null !== $exclude = $pElem->attributes()->exclude) {
177 177
                         $isExclude = 'true' === strtolower((string) $exclude);
178 178
                     }
@@ -194,7 +194,7 @@  discard block
 block discarded – undo
194 194
                     }
195 195
 
196 196
                     if (null !== $excludeIf = $pElem->attributes()->{'expose-if'}) {
197
-                        $pMetadata->excludeIf = $this->parseExpression('!(' . (string) $excludeIf . ')');
197
+                        $pMetadata->excludeIf = $this->parseExpression('!('.(string) $excludeIf.')');
198 198
                         $isExpose = true;
199 199
                     }
200 200
 
@@ -322,15 +322,15 @@  discard block
 block discarded – undo
322 322
                     $metadata->isMap = $metadata->isMap || PropertyMetadata::isCollectionMap($pMetadata->type);
323 323
                 }
324 324
 
325
-                if (!$pMetadata->serializedName) {
325
+                if ( ! $pMetadata->serializedName) {
326 326
                     $pMetadata->serializedName = $this->namingStrategy->translateName($pMetadata);
327 327
                 }
328 328
 
329
-                if (!empty($pElem) && null !== $name = $pElem->attributes()->name) {
329
+                if ( ! empty($pElem) && null !== $name = $pElem->attributes()->name) {
330 330
                     $pMetadata->name = (string) $name;
331 331
                 }
332 332
 
333
-                if ((ExclusionPolicy::NONE === (string) $exclusionPolicy && !$isExclude)
333
+                if ((ExclusionPolicy::NONE === (string) $exclusionPolicy && ! $isExclude)
334 334
                     || (ExclusionPolicy::ALL === (string) $exclusionPolicy && $isExpose)
335 335
                 ) {
336 336
                     $metadata->addPropertyMetadata($pMetadata);
@@ -339,10 +339,10 @@  discard block
 block discarded – undo
339 339
         }
340 340
 
341 341
         foreach ($elem->xpath('./callback-method') as $method) {
342
-            if (!isset($method->attributes()->type)) {
342
+            if ( ! isset($method->attributes()->type)) {
343 343
                 throw new InvalidMetadataException('The type attribute must be set for all callback-method elements.');
344 344
             }
345
-            if (!isset($method->attributes()->name)) {
345
+            if ( ! isset($method->attributes()->name)) {
346 346
                 throw new InvalidMetadataException('The name attribute must be set for all callback-method elements.');
347 347
             }
348 348
 
@@ -360,10 +360,10 @@  discard block
 block discarded – undo
360 360
                     break;
361 361
 
362 362
                 case 'handler':
363
-                    if (!isset($method->attributes()->format)) {
363
+                    if ( ! isset($method->attributes()->format)) {
364 364
                         throw new InvalidMetadataException('The format attribute must be set for "handler" callback methods.');
365 365
                     }
366
-                    if (!isset($method->attributes()->direction)) {
366
+                    if ( ! isset($method->attributes()->direction)) {
367 367
                         throw new InvalidMetadataException('The direction attribute must be set for "handler" callback methods.');
368 368
                     }
369 369
 
Please login to merge, or discard this patch.