@@ -72,7 +72,7 @@ |
||
| 72 | 72 | */ |
| 73 | 73 | private function validate(int $id): void |
| 74 | 74 | { |
| 75 | - if (! isset($this->data[$id])) { |
|
| 75 | + if (!isset($this->data[$id])) { |
|
| 76 | 76 | throw new \OutOfRangeException( |
| 77 | 77 | sprintf( |
| 78 | 78 | 'Data for ID #%d is not found.', |
@@ -33,7 +33,7 @@ |
||
| 33 | 33 | */ |
| 34 | 34 | public function create(string $language): LanguageInterface |
| 35 | 35 | { |
| 36 | - if (! array_key_exists($language, $this->language)) { |
|
| 36 | + if (!array_key_exists($language, $this->language)) { |
|
| 37 | 37 | throw new \InvalidArgumentException("$language is not valid programming language."); |
| 38 | 38 | } |
| 39 | 39 | $class = $this->language[$language]; |
@@ -25,7 +25,7 @@ |
||
| 25 | 25 | $class = static::class; |
| 26 | 26 | $parameter = \array_slice(\func_get_args(), 1); |
| 27 | 27 | |
| 28 | - if (! isset(static::$instances[$identifier])) { |
|
| 28 | + if (!isset(static::$instances[$identifier])) { |
|
| 29 | 29 | $reflection = new \ReflectionClass($class); |
| 30 | 30 | $constructor = $reflection->getConstructor(); |
| 31 | 31 | $object = $reflection->newInstanceWithoutConstructor(); |
@@ -19,7 +19,7 @@ |
||
| 19 | 19 | { |
| 20 | 20 | $class = __NAMESPACE__ . '\Formatter' . ucfirst($type); |
| 21 | 21 | |
| 22 | - if (! class_exists($class)) { |
|
| 22 | + if (!class_exists($class)) { |
|
| 23 | 23 | throw new \InvalidArgumentException("$class is not found."); |
| 24 | 24 | } |
| 25 | 25 | |
@@ -18,7 +18,7 @@ |
||
| 18 | 18 | */ |
| 19 | 19 | public static function getInstance(string $type): BulletInterface |
| 20 | 20 | { |
| 21 | - if (! array_key_exists($type, self::$bullets)) { |
|
| 21 | + if (!array_key_exists($type, self::$bullets)) { |
|
| 22 | 22 | if ($type === 'EmptyBullet') { |
| 23 | 23 | self::$bullets[$type] = new EmptyBullet(); |
| 24 | 24 | } elseif ($type === 'ExpandBullet') { |
@@ -39,7 +39,7 @@ |
||
| 39 | 39 | */ |
| 40 | 40 | public function attach(ObserverInterface $observer) |
| 41 | 41 | { |
| 42 | - if (! in_array($observer, $this->observers, true)) { |
|
| 42 | + if (!in_array($observer, $this->observers, true)) { |
|
| 43 | 43 | $this->observers[] = $observer; |
| 44 | 44 | } |
| 45 | 45 | } |
@@ -64,7 +64,7 @@ |
||
| 64 | 64 | */ |
| 65 | 65 | private static function isValidState(int $state): void |
| 66 | 66 | { |
| 67 | - if (! in_array($state, self::$validStates, true)) { |
|
| 67 | + if (!in_array($state, self::$validStates, true)) { |
|
| 68 | 68 | throw new \InvalidArgumentException('Invalid state given.'); |
| 69 | 69 | } |
| 70 | 70 | } |
@@ -34,7 +34,7 @@ |
||
| 34 | 34 | */ |
| 35 | 35 | public function sort(): array |
| 36 | 36 | { |
| 37 | - if (! $this->comparator) { |
|
| 37 | + if (!$this->comparator) { |
|
| 38 | 38 | throw new \LogicException('Comparator is not set.'); |
| 39 | 39 | } |
| 40 | 40 | |
@@ -46,7 +46,7 @@ |
||
| 46 | 46 | */ |
| 47 | 47 | public function addItem(Item $item): void |
| 48 | 48 | { |
| 49 | - if (! in_array($item, $this->list, true)) { |
|
| 49 | + if (!in_array($item, $this->list, true)) { |
|
| 50 | 50 | $this->list[] = $item; |
| 51 | 51 | } |
| 52 | 52 | } |