@@ -17,7 +17,7 @@ |
||
| 17 | 17 | public function __invoke($value) |
| 18 | 18 | { |
| 19 | 19 | if ( |
| 20 | - ! $value instanceof $this->type |
|
| 20 | + !$value instanceof $this->type |
|
| 21 | 21 | ) { |
| 22 | 22 | throw WrongType::fromMessage("must be of type {$this->type}"); |
| 23 | 23 | } |
@@ -43,13 +43,13 @@ |
||
| 43 | 43 | |
| 44 | 44 | public function offsetSet($offset, $value) |
| 45 | 45 | { |
| 46 | - if ($offset === null || ! is_numeric($offset)) { |
|
| 46 | + if ($offset === null || !is_numeric($offset)) { |
|
| 47 | 47 | throw WrongType::fromMessage('You must specify a numeric offset'); |
| 48 | 48 | } |
| 49 | 49 | |
| 50 | 50 | $type = $this->types[$offset] ?? null; |
| 51 | 51 | |
| 52 | - if (! $type) { |
|
| 52 | + if (!$type) { |
|
| 53 | 53 | throw WrongType::fromMessage("No type was configured for this tuple at offset {$offset}"); |
| 54 | 54 | } |
| 55 | 55 | |
@@ -24,7 +24,7 @@ discard block |
||
| 24 | 24 | public function set(array $data): self |
| 25 | 25 | { |
| 26 | 26 | foreach ($this->definition as $name => $type) { |
| 27 | - if (! isset($data[$name])) { |
|
| 27 | + if (!isset($data[$name])) { |
|
| 28 | 28 | throw WrongType::fromMessage("Missing field for this struct: {$name}:{$type}"); |
| 29 | 29 | } |
| 30 | 30 | |
@@ -49,7 +49,7 @@ discard block |
||
| 49 | 49 | |
| 50 | 50 | $type = $this->definition[$offset] ?? null; |
| 51 | 51 | |
| 52 | - if (! $type) { |
|
| 52 | + if (!$type) { |
|
| 53 | 53 | throw WrongType::fromMessage("No type was configured for this field {$offset}"); |
| 54 | 54 | } |
| 55 | 55 | |
@@ -25,7 +25,7 @@ |
||
| 25 | 25 | $type = new $type(); |
| 26 | 26 | } |
| 27 | 27 | |
| 28 | - if (! is_callable($type)) { |
|
| 28 | + if (!is_callable($type)) { |
|
| 29 | 29 | throw WrongType::fromMessage('Generic types must be callable'); |
| 30 | 30 | } |
| 31 | 31 | |