@@ -40,7 +40,7 @@ |
||
| 40 | 40 | ); |
| 41 | 41 | } |
| 42 | 42 | |
| 43 | - if (! \is_string($this->value)) { |
|
| 43 | + if (!\is_string($this->value)) { |
|
| 44 | 44 | throw $this->createValidationException( |
| 45 | 45 | $context, |
| 46 | 46 | 'The type alias must be a string' |
@@ -56,12 +56,12 @@ discard block |
||
| 56 | 56 | { |
| 57 | 57 | $mapping = $this->getMapping(); |
| 58 | 58 | |
| 59 | - if (! \is_array($mapping)) { |
|
| 59 | + if (!\is_array($mapping)) { |
|
| 60 | 60 | throw $this->createValidationException($context, 'The type-mapping is missing'); |
| 61 | 61 | } |
| 62 | 62 | |
| 63 | 63 | foreach ($mapping as $k => $v) { |
| 64 | - if (! class_exists($v)) { |
|
| 64 | + if (!class_exists($v)) { |
|
| 65 | 65 | throw $this->createValidationException( |
| 66 | 66 | $context, |
| 67 | 67 | 'The class "' . $v . '" for "' . $k . '"does not exist' |
@@ -69,7 +69,7 @@ discard block |
||
| 69 | 69 | } |
| 70 | 70 | } |
| 71 | 71 | |
| 72 | - if (! empty($this->default) && ! class_exists($this->default)) { |
|
| 72 | + if (!empty($this->default) && !class_exists($this->default)) { |
|
| 73 | 73 | throw $this->createValidationException( |
| 74 | 74 | $context, |
| 75 | 75 | 'The class "' . $this->default . ' for the default does not exist' |
@@ -107,7 +107,7 @@ discard block |
||
| 107 | 107 | return new CreatePolymorphic( |
| 108 | 108 | $mapping, |
| 109 | 109 | $this->getTellBy(), |
| 110 | - ! empty($this->default) ? $factory->create(new \ReflectionClass($this->default)) : new NullCreator() |
|
| 110 | + !empty($this->default) ? $factory->create(new \ReflectionClass($this->default)) : new NullCreator() |
|
| 111 | 111 | ); |
| 112 | 112 | } |
| 113 | 113 | } |
@@ -25,7 +25,7 @@ discard block |
||
| 25 | 25 | */ |
| 26 | 26 | public function slumber(Slumberer $slumberer, $value) |
| 27 | 27 | { |
| 28 | - if (! \is_array($value) && ! $value instanceof \Traversable) { |
|
| 28 | + if (!\is_array($value) && !$value instanceof \Traversable) { |
|
| 29 | 29 | return null; |
| 30 | 30 | } |
| 31 | 31 | |
@@ -57,7 +57,7 @@ discard block |
||
| 57 | 57 | */ |
| 58 | 58 | public function awake(Awaker $awaker, $value) |
| 59 | 59 | { |
| 60 | - if (! \is_array($value) && ! $value instanceof \Traversable) { |
|
| 60 | + if (!\is_array($value) && !$value instanceof \Traversable) { |
|
| 61 | 61 | return $this->createAwakeResult([]); |
| 62 | 62 | } |
| 63 | 63 | |
@@ -25,7 +25,7 @@ discard block |
||
| 25 | 25 | */ |
| 26 | 26 | public function slumber(Slumberer $slumberer, $value) |
| 27 | 27 | { |
| 28 | - if (! \is_array($value) && ! $value instanceof \Traversable) { |
|
| 28 | + if (!\is_array($value) && !$value instanceof \Traversable) { |
|
| 29 | 29 | return null; |
| 30 | 30 | } |
| 31 | 31 | |
@@ -55,7 +55,7 @@ discard block |
||
| 55 | 55 | public function awake(Awaker $awaker, $value) |
| 56 | 56 | { |
| 57 | 57 | // can we handle the input ? |
| 58 | - if (! \is_array($value) && ! $value instanceof \Traversable) { |
|
| 58 | + if (!\is_array($value) && !$value instanceof \Traversable) { |
|
| 59 | 59 | return $this->createAwakeResult([]); |
| 60 | 60 | } |
| 61 | 61 | |
@@ -71,7 +71,7 @@ |
||
| 71 | 71 | */ |
| 72 | 72 | public function awake(Awaker $awaker, $value) |
| 73 | 73 | { |
| 74 | - if ($value === null || (! \is_array($value) && ! $value instanceof \ArrayAccess)) { |
|
| 74 | + if ($value === null || (!\is_array($value) && !$value instanceof \ArrayAccess)) { |
|
| 75 | 75 | return null; |
| 76 | 76 | } |
| 77 | 77 | |
@@ -75,7 +75,7 @@ |
||
| 75 | 75 | } |
| 76 | 76 | |
| 77 | 77 | if (IsDateString::isValidDateString($value['date'])) { |
| 78 | - return new LocalDate($value['date'], $tz); |
|
| 78 | + return new LocalDate($value['date'], $tz); |
|
| 79 | 79 | } |
| 80 | 80 | |
| 81 | 81 | return null; |
@@ -77,11 +77,11 @@ discard block |
||
| 77 | 77 | */ |
| 78 | 78 | public function awake($data, $cls) |
| 79 | 79 | { |
| 80 | - if ($data === null || ! \is_array($data)) { |
|
| 80 | + if ($data === null || !\is_array($data)) { |
|
| 81 | 81 | return null; |
| 82 | 82 | } |
| 83 | 83 | |
| 84 | - if (! $cls instanceof \ReflectionClass) { |
|
| 84 | + if (!$cls instanceof \ReflectionClass) { |
|
| 85 | 85 | $cls = new \ReflectionClass($cls); |
| 86 | 86 | } |
| 87 | 87 | |
@@ -96,11 +96,11 @@ discard block |
||
| 96 | 96 | */ |
| 97 | 97 | public function awakeList($data, $cls) |
| 98 | 98 | { |
| 99 | - if (! \is_array($data) && ! $data instanceof \Traversable) { |
|
| 99 | + if (!\is_array($data) && !$data instanceof \Traversable) { |
|
| 100 | 100 | return []; |
| 101 | 101 | } |
| 102 | 102 | |
| 103 | - if (! $cls instanceof \ReflectionClass) { |
|
| 103 | + if (!$cls instanceof \ReflectionClass) { |
|
| 104 | 104 | $cls = new \ReflectionClass($cls); |
| 105 | 105 | } |
| 106 | 106 | |
@@ -41,7 +41,7 @@ |
||
| 41 | 41 | */ |
| 42 | 42 | public function create($data = null) |
| 43 | 43 | { |
| 44 | - if (! \is_array($data) && ! $data instanceof \ArrayAccess) { |
|
| 44 | + if (!\is_array($data) && !$data instanceof \ArrayAccess) { |
|
| 45 | 45 | return null; |
| 46 | 46 | } |
| 47 | 47 | |
@@ -25,7 +25,7 @@ discard block |
||
| 25 | 25 | */ |
| 26 | 26 | public function slumber(Slumberer $slumberer, $value) |
| 27 | 27 | { |
| 28 | - if (! \is_array($value) && ! $value instanceof \Traversable) { |
|
| 28 | + if (!\is_array($value) && !$value instanceof \Traversable) { |
|
| 29 | 29 | return null; |
| 30 | 30 | } |
| 31 | 31 | |
@@ -57,7 +57,7 @@ discard block |
||
| 57 | 57 | */ |
| 58 | 58 | public function awake(Awaker $awaker, $value) |
| 59 | 59 | { |
| 60 | - if (! \is_array($value) && ! $value instanceof \Traversable) { |
|
| 60 | + if (!\is_array($value) && !$value instanceof \Traversable) { |
|
| 61 | 61 | return $this->createAwakeResult([]); |
| 62 | 62 | } |
| 63 | 63 | |