@@ -62,8 +62,7 @@ discard block |
||
62 | 62 | public static function createNormalizer($key = 'default') |
63 | 63 | { |
64 | 64 | return isset(self::$instancePool[$key]) ? |
65 | - self::$instancePool[$key] : |
|
66 | - self::$instancePool[$key] = new static( |
|
65 | + self::$instancePool[$key] : self::$instancePool[$key] = new static( |
|
67 | 66 | PropertyAccess::createPropertyAccessor() |
68 | 67 | ); |
69 | 68 | } |
@@ -293,15 +292,12 @@ discard block |
||
293 | 292 | $class = is_string($normalizable) ? |
294 | 293 | $normalizable : ( |
295 | 294 | $normalizable instanceof \ReflectionClass ? |
296 | - $normalizable->name : |
|
297 | - get_class($normalizable) |
|
295 | + $normalizable->name : get_class($normalizable) |
|
298 | 296 | ) |
299 | 297 | ; |
300 | 298 | $reflection = isset(self::$reflectionPool[$class]) ? |
301 | - self::$reflectionPool[$class] : |
|
302 | - self::$reflectionPool[$class] = $normalizable instanceof \ReflectionClass ? |
|
303 | - $normalizable : |
|
304 | - new \ReflectionClass($class) |
|
299 | + self::$reflectionPool[$class] : self::$reflectionPool[$class] = $normalizable instanceof \ReflectionClass ? |
|
300 | + $normalizable : new \ReflectionClass($class) |
|
305 | 301 | ; |
306 | 302 | |
307 | 303 | $object = $normalizable; |
@@ -328,8 +324,7 @@ discard block |
||
328 | 324 | $argKey = $this->inflector->snakelize($parameter->getName()); |
329 | 325 | if (isset($data[$argKey])) { |
330 | 326 | $arguments[] = $parameter->getClass() ? |
331 | - $this->normalize($data[$argKey], $parameter->getClass()) : |
|
332 | - $data[$argKey] |
|
327 | + $this->normalize($data[$argKey], $parameter->getClass()) : $data[$argKey] |
|
333 | 328 | ; |
334 | 329 | unset($data[$argKey]); |
335 | 330 | |
@@ -337,16 +332,14 @@ discard block |
||
337 | 332 | } |
338 | 333 | |
339 | 334 | $arguments[] = $parameter->isOptional() ? |
340 | - $parameter->getDefaultValue() : |
|
341 | - null |
|
335 | + $parameter->getDefaultValue() : null |
|
342 | 336 | ; |
343 | 337 | } |
344 | 338 | } |
345 | 339 | } |
346 | 340 | |
347 | 341 | $object = empty($arguments) ? |
348 | - $reflection->newInstance() : |
|
349 | - $reflection->newInstanceArgs($arguments); |
|
342 | + $reflection->newInstance() : $reflection->newInstanceArgs($arguments); |
|
350 | 343 | } |
351 | 344 | |
352 | 345 | // BAD ! |
@@ -97,8 +97,7 @@ |
||
97 | 97 | foreach ($filters as $key => $value) { |
98 | 98 | $current = $propertyAccessor->getValue($entity, $key); |
99 | 99 | $res = $res && (is_array($value) ? |
100 | - in_array($current, $value) : |
|
101 | - $current == $value |
|
100 | + in_array($current, $value) : $current == $value |
|
102 | 101 | ); |
103 | 102 | } |
104 | 103 |
@@ -2,11 +2,9 @@ |
||
2 | 2 | |
3 | 3 | namespace Majora\Framework\Domain\Action\Dal; |
4 | 4 | |
5 | -use Majora\Framework\Api\Client\RestApiClient; |
|
6 | 5 | use Majora\Framework\Validation\ValidationException; |
7 | 6 | use Symfony\Component\EventDispatcher\Event; |
8 | 7 | use Symfony\Component\EventDispatcher\EventDispatcherInterface; |
9 | -use Symfony\Component\Serializer\SerializerInterface; |
|
10 | 8 | use Symfony\Component\Validator\Validator\ValidatorInterface; |
11 | 9 | |
12 | 10 | /** |