@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | if ($this->containsKey($key)) { |
| 38 | 38 | return $this->data[$key]; |
| 39 | 39 | } |
| 40 | - if (null !== $default and ! $this->checkValueType($default)) { |
|
| 40 | + if (null !== $default and !$this->checkValueType($default)) { |
|
| 41 | 41 | throw new \InvalidArgumentException( |
| 42 | 42 | 'The default value provided for ' |
| 43 | 43 | . get_class($this) . '::getOrDefault is not a valid type,' |
@@ -54,14 +54,14 @@ discard block |
||
| 54 | 54 | |
| 55 | 55 | public function put($key, $value) |
| 56 | 56 | { |
| 57 | - if (! $this->checkKeyType($key)) { |
|
| 57 | + if (!$this->checkKeyType($key)) { |
|
| 58 | 58 | throw new \InvalidArgumentException( |
| 59 | 59 | 'The key provided for ' . get_class($this) |
| 60 | 60 | . '::put is not a valid type,' |
| 61 | 61 | . ' expected ' . $this->getKeyType() . '.' |
| 62 | 62 | ); |
| 63 | 63 | } |
| 64 | - if (! $this->checkValueType($value)) { |
|
| 64 | + if (!$this->checkValueType($value)) { |
|
| 65 | 65 | throw new \InvalidArgumentException( |
| 66 | 66 | 'The value provided for ' . get_class($this) |
| 67 | 67 | . '::put is not a valid type,' |
@@ -109,7 +109,7 @@ discard block |
||
| 109 | 109 | $changed = true; |
| 110 | 110 | } |
| 111 | 111 | } |
| 112 | - if (! $this->isComparisonIdentical()) { |
|
| 112 | + if (!$this->isComparisonIdentical()) { |
|
| 113 | 113 | if ($previous == $value) { |
| 114 | 114 | unset($this->data[$key]); |
| 115 | 115 | $changed = true; |
@@ -125,7 +125,7 @@ discard block |
||
| 125 | 125 | |
| 126 | 126 | public function replaceExact($key, $current, $replacement) |
| 127 | 127 | { |
| 128 | - if (! $this->containsKey($key)) { |
|
| 128 | + if (!$this->containsKey($key)) { |
|
| 129 | 129 | return false; |
| 130 | 130 | } |
| 131 | 131 | $previous = $this->get($key); |
@@ -27,7 +27,7 @@ discard block |
||
| 27 | 27 | |
| 28 | 28 | public function add($element) |
| 29 | 29 | { |
| 30 | - if (! $this->checkElementType($element)) { |
|
| 30 | + if (!$this->checkElementType($element)) { |
|
| 31 | 31 | throw new \InvalidArgumentException( |
| 32 | 32 | 'Invalid element type;' |
| 33 | 33 | . ' the collection ' . get_class($this) |
@@ -48,7 +48,7 @@ discard block |
||
| 48 | 48 | public function containsAll(array $elements) |
| 49 | 49 | { |
| 50 | 50 | foreach ($elements as $element) { |
| 51 | - if (! $this->contains($element)) { |
|
| 51 | + if (!$this->contains($element)) { |
|
| 52 | 52 | return false; |
| 53 | 53 | } |
| 54 | 54 | } |
@@ -109,7 +109,7 @@ discard block |
||
| 109 | 109 | { |
| 110 | 110 | $changed = false; |
| 111 | 111 | foreach ($this->data as $index => $element) { |
| 112 | - if (! in_array($element, $elements, $this->isComparisonIdentical())) { |
|
| 112 | + if (!in_array($element, $elements, $this->isComparisonIdentical())) { |
|
| 113 | 113 | unset($this->data[$index]); |
| 114 | 114 | $changed = true; |
| 115 | 115 | } |
@@ -51,11 +51,11 @@ |
||
| 51 | 51 | */ |
| 52 | 52 | public function checkType($type, $value) |
| 53 | 53 | { |
| 54 | - if (! array_key_exists($type, $this->map)) { |
|
| 54 | + if (!array_key_exists($type, $this->map)) { |
|
| 55 | 55 | return $this->checkInstanceOf($value, $type); |
| 56 | 56 | } |
| 57 | 57 | $call = [$this, $this->map[$type]]; |
| 58 | - if (! is_callable($call)) { |
|
| 58 | + if (!is_callable($call)) { |
|
| 59 | 59 | return false; |
| 60 | 60 | } |
| 61 | 61 | return call_user_func($call, $value); |
@@ -27,7 +27,7 @@ |
||
| 27 | 27 | throw new \InvalidArgumentException('The type for ' . get_class($this) . ' is not a string'); |
| 28 | 28 | } |
| 29 | 29 | $allowed = $this->getAllowedTypes(); |
| 30 | - if (is_array($allowed) and count($allowed) and ! in_array($type, $allowed, true)) { |
|
| 30 | + if (is_array($allowed) and count($allowed) and !in_array($type, $allowed, true)) { |
|
| 31 | 31 | throw new \InvalidArgumentException( |
| 32 | 32 | 'The type ' . $type . ' for ' . get_class($this) . ' is not a allowed' |
| 33 | 33 | ); |