@@ -35,7 +35,7 @@ discard block |
||
| 35 | 35 | */ |
| 36 | 36 | public function bind($eventName, $handler) |
| 37 | 37 | { |
| 38 | - if (! self::isListener($handler)) { |
|
| 38 | + if (!self::isListener($handler)) { |
|
| 39 | 39 | throw new \LogicException('Invalid listener'); |
| 40 | 40 | } |
| 41 | 41 | |
@@ -45,7 +45,7 @@ discard block |
||
| 45 | 45 | |
| 46 | 46 | $listeners = $this->bindings[$eventName]; |
| 47 | 47 | |
| 48 | - if (! $listeners->offsetExists($handler)) { |
|
| 48 | + if (!$listeners->offsetExists($handler)) { |
|
| 49 | 49 | $listeners->offsetSet($handler); |
| 50 | 50 | } |
| 51 | 51 | |
@@ -93,7 +93,7 @@ |
||
| 93 | 93 | |
| 94 | 94 | if ($identifiers === null) { |
| 95 | 95 | $ids = timezone_identifiers_list(); |
| 96 | - array_walk($ids, function (&$id) { $id = strtolower($id); }); |
|
| 96 | + array_walk($ids, function(&$id) { $id = strtolower($id); }); |
|
| 97 | 97 | |
| 98 | 98 | $identifiers = array_flip($ids); |
| 99 | 99 | |
@@ -142,7 +142,7 @@ |
||
| 142 | 142 | */ |
| 143 | 143 | public function setLeafParentsCollectionType($collectionClass) |
| 144 | 144 | { |
| 145 | - if (! is_a($collectionClass, Collection::class, true)) { |
|
| 145 | + if (!is_a($collectionClass, Collection::class, true)) { |
|
| 146 | 146 | throw new \LogicException("The given class $collectionClass does not implement " . Collection::class); |
| 147 | 147 | } |
| 148 | 148 | |
@@ -37,7 +37,7 @@ |
||
| 37 | 37 | return; |
| 38 | 38 | } |
| 39 | 39 | |
| 40 | - if (! @mkdir($dir, $mode, true) && ! @is_dir($dir)) { |
|
| 40 | + if (!@mkdir($dir, $mode, true) && !@is_dir($dir)) { |
|
| 41 | 41 | error_reporting($old); |
| 42 | 42 | throw new \RuntimeException('Could not create directory'); |
| 43 | 43 | } |
@@ -95,7 +95,7 @@ discard block |
||
| 95 | 95 | |
| 96 | 96 | // we have to exclude manually since it does not work on the finder when using exclude() |
| 97 | 97 | $excludeIt = Psi::it($excludeDirs) |
| 98 | - ->filter(function ($dir) use ($item) { |
|
| 98 | + ->filter(function($dir) use ($item) { |
|
| 99 | 99 | return strpos($item->getRealPath(), $dir) === 0; |
| 100 | 100 | }) |
| 101 | 101 | ->count(); |
@@ -108,7 +108,7 @@ discard block |
||
| 108 | 108 | $namespace = ''; |
| 109 | 109 | |
| 110 | 110 | for ($index = 0; isset($tokens[$index]); $index++) { |
| 111 | - if (! isset($tokens[$index][0])) { |
|
| 111 | + if (!isset($tokens[$index][0])) { |
|
| 112 | 112 | continue; |
| 113 | 113 | } |
| 114 | 114 | if (T_NAMESPACE === $tokens[$index][0]) { |
@@ -57,7 +57,7 @@ discard block |
||
| 57 | 57 | */ |
| 58 | 58 | public function appendAll($items) |
| 59 | 59 | { |
| 60 | - if (! \is_array($items) && ! $items instanceof \Traversable) { |
|
| 60 | + if (!\is_array($items) && !$items instanceof \Traversable) { |
|
| 61 | 61 | return $this; |
| 62 | 62 | } |
| 63 | 63 | |
@@ -80,7 +80,7 @@ discard block |
||
| 80 | 80 | */ |
| 81 | 81 | public function appendIfNotExists($item, $comparator = null) |
| 82 | 82 | { |
| 83 | - if (! $this->contains($item, $comparator)) { |
|
| 83 | + if (!$this->contains($item, $comparator)) { |
|
| 84 | 84 | $this->append($item); |
| 85 | 85 | } |
| 86 | 86 | |
@@ -171,7 +171,7 @@ discard block |
||
| 171 | 171 | public function remove($item) |
| 172 | 172 | { |
| 173 | 173 | return $this->removeWhen( |
| 174 | - function ($storedItem) use ($item) { |
|
| 174 | + function($storedItem) use ($item) { |
|
| 175 | 175 | return $storedItem === $item; |
| 176 | 176 | } |
| 177 | 177 | ); |
@@ -45,7 +45,7 @@ discard block |
||
| 45 | 45 | $parts = explode($separator, (string) $path); |
| 46 | 46 | |
| 47 | 47 | foreach ($parts as $part) { |
| 48 | - if (! isset($array[$part])) { |
|
| 48 | + if (!isset($array[$part])) { |
|
| 49 | 49 | return $default; |
| 50 | 50 | } |
| 51 | 51 | |
@@ -92,7 +92,7 @@ discard block |
||
| 92 | 92 | */ |
| 93 | 93 | public static function isAssoc($arr) |
| 94 | 94 | { |
| 95 | - if (! \is_array($arr)) { |
|
| 95 | + if (!\is_array($arr)) { |
|
| 96 | 96 | return false; |
| 97 | 97 | } |
| 98 | 98 | |
@@ -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 | } |