@@ -42,13 +42,13 @@ |
||
| 42 | 42 | |
| 43 | 43 | public function offsetSet($offset, $value) |
| 44 | 44 | { |
| 45 | - if ($offset === null || ! is_numeric($offset)) { |
|
| 45 | + if ($offset === null || !is_numeric($offset)) { |
|
| 46 | 46 | throw WrongType::withMessage('You must specify a numeric offset'); |
| 47 | 47 | } |
| 48 | 48 | |
| 49 | 49 | $type = $this->types[$offset] ?? null; |
| 50 | 50 | |
| 51 | - if (! $type) { |
|
| 51 | + if (!$type) { |
|
| 52 | 52 | throw WrongType::withMessage("No type was configured for this tuple at offset {$offset}"); |
| 53 | 53 | } |
| 54 | 54 | |
@@ -33,7 +33,7 @@ discard block |
||
| 33 | 33 | continue; |
| 34 | 34 | } |
| 35 | 35 | |
| 36 | - if (! $this->sameType($initialValue, $currentValue, $type)) { |
|
| 36 | + if (!$this->sameType($initialValue, $currentValue, $type)) { |
|
| 37 | 37 | continue; |
| 38 | 38 | } |
| 39 | 39 | |
@@ -76,7 +76,7 @@ discard block |
||
| 76 | 76 | |
| 77 | 77 | private function getAvailableTypesString(): string |
| 78 | 78 | { |
| 79 | - return implode(', ', array_map(function (Type $type) { |
|
| 79 | + return implode(', ', array_map(function(Type $type) { |
|
| 80 | 80 | return (string) $type; |
| 81 | 81 | }, $this->types)); |
| 82 | 82 | } |
@@ -22,7 +22,7 @@ |
||
| 22 | 22 | public function validate($value) |
| 23 | 23 | { |
| 24 | 24 | if ( |
| 25 | - ! $value instanceof $this->type |
|
| 25 | + !$value instanceof $this->type |
|
| 26 | 26 | ) { |
| 27 | 27 | throw WrongType::withMessage("must be of type {$this->type}"); |
| 28 | 28 | } |
@@ -26,7 +26,7 @@ discard block |
||
| 26 | 26 | public function set(array $data): self |
| 27 | 27 | { |
| 28 | 28 | foreach ($this->definition as $name => $type) { |
| 29 | - if (! array_key_exists($name, $data)) { |
|
| 29 | + if (!array_key_exists($name, $data)) { |
|
| 30 | 30 | $type = serialize($type); |
| 31 | 31 | |
| 32 | 32 | throw WrongType::withMessage("Missing field for this struct: {$name}:{$type}"); |
@@ -53,7 +53,7 @@ discard block |
||
| 53 | 53 | |
| 54 | 54 | $type = $this->definition[$offset] ?? null; |
| 55 | 55 | |
| 56 | - if (! $type) { |
|
| 56 | + if (!$type) { |
|
| 57 | 57 | throw WrongType::withMessage("No type was configured for this field {$offset}"); |
| 58 | 58 | } |
| 59 | 59 | |