@@ -44,7 +44,6 @@ |
||
44 | 44 | * Sets the given Style in the Collection. |
45 | 45 | * |
46 | 46 | * @param string $name The name the Style should be set as. |
47 | - * @param mixed $value The Style to set. |
|
48 | 47 | * @return $this |
49 | 48 | */ |
50 | 49 | public function set(string $name, interfaces\Style $style) : Map |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | * @param mixed $default The default value to return when the given Style does not exist in the Collection. |
36 | 36 | * @return interfaces\Style The Style or the default value given if the Style couldn't be found. |
37 | 37 | */ |
38 | - public function get(string $name, $default = null) : ?interfaces\Style |
|
38 | + public function get(string $name, $default = null) : ? interfaces\Style |
|
39 | 39 | { |
40 | 40 | return $this->items[strtolower($name)] ?? $default; |
41 | 41 | } |
@@ -109,7 +109,7 @@ discard block |
||
109 | 109 | * @param interfaces\Style $style The Style to search for. |
110 | 110 | * @return string The name of the Style or null if it couldn't be found. |
111 | 111 | */ |
112 | - public function name(interfaces\Style $style) : ?string |
|
112 | + public function name(interfaces\Style $style) : ? string |
|
113 | 113 | { |
114 | 114 | foreach ($this->items as $key => $value) { |
115 | 115 | if ($value === $style) { |
@@ -123,7 +123,7 @@ discard block |
||
123 | 123 | /** |
124 | 124 | * @see Map::get() |
125 | 125 | */ |
126 | - public function __get(string $name) : ?interfaces\Style |
|
126 | + public function __get(string $name) : ? interfaces\Style |
|
127 | 127 | { |
128 | 128 | return $this->get($name); |
129 | 129 | } |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | * Defaults to: ['foreground' => 'color', 'background' => 'bg']. |
85 | 85 | * @return Style The Style that was created based on it. |
86 | 86 | */ |
87 | - public static function fromString(string $string, array $properties = null) : ?Style |
|
87 | + public static function fromString(string $string, array $properties = null) : ? Style |
|
88 | 88 | { |
89 | 89 | if (!preg_match_all('/([^:]+):([^;]+)(;|$)/', strtolower($string), $matches, PREG_SET_ORDER)) { |
90 | 90 | return null; |
@@ -118,7 +118,7 @@ discard block |
||
118 | 118 | * @param string $background The background color to be set. |
119 | 119 | * @param array $options An array of additional options emphasis to be set. |
120 | 120 | */ |
121 | - public function __construct(?string $foreground, string $background = null, array $options = null) |
|
121 | + public function __construct(? string $foreground, string $background = null, array $options = null) |
|
122 | 122 | { |
123 | 123 | if (isset($foreground)) { |
124 | 124 | $this->setForeground($foreground); |
@@ -136,7 +136,7 @@ discard block |
||
136 | 136 | /** |
137 | 137 | * {@inheritDoc} |
138 | 138 | */ |
139 | - public function setForeground(?string $color) : interfaces\Style |
|
139 | + public function setForeground(? string $color) : interfaces\Style |
|
140 | 140 | { |
141 | 141 | return $this->setColor('foreground', $color); |
142 | 142 | } |
@@ -144,7 +144,7 @@ discard block |
||
144 | 144 | /** |
145 | 145 | * {@inheritdoc} |
146 | 146 | */ |
147 | - public function setBackground(?string $color) : interfaces\Style |
|
147 | + public function setBackground(? string $color) : interfaces\Style |
|
148 | 148 | { |
149 | 149 | return $this->setColor('background', $color); |
150 | 150 | } |
@@ -206,7 +206,7 @@ discard block |
||
206 | 206 | * @param string $color The color to set. |
207 | 207 | * @return $this |
208 | 208 | */ |
209 | - protected function setColor(string $type, ?string $color) : interfaces\Style |
|
209 | + protected function setColor(string $type, ? string $color) : interfaces\Style |
|
210 | 210 | { |
211 | 211 | if (isset($color) && !isset(static::${$type.'s'}[$color])) { |
212 | 212 | throw new \InvalidArgumentException("The $type color [$color] is not recognized."); |