@@ -56,6 +56,6 @@ |
||
| 56 | 56 | |
| 57 | 57 | public function invert() : SevenBitChannel |
| 58 | 58 | { |
| 59 | - return ColorChannel::SevenBit(127-$this->value); |
|
| 59 | + return ColorChannel::SevenBit(127 - $this->value); |
|
| 60 | 60 | } |
| 61 | 61 | } |
@@ -21,18 +21,18 @@ |
||
| 21 | 21 | * @throws ColorException |
| 22 | 22 | * @see RGBAColor::ERROR_INVALID_HEX_LENGTH |
| 23 | 23 | */ |
| 24 | - public function parse(string $hex, string $name='') : RGBAColor |
|
| 24 | + public function parse(string $hex, string $name = '') : RGBAColor |
|
| 25 | 25 | { |
| 26 | 26 | $hex = ltrim($hex, '#'); // Remove the hash if present |
| 27 | 27 | $hex = strtoupper($hex); |
| 28 | 28 | $length = strlen($hex); |
| 29 | 29 | |
| 30 | - if($length === 3) |
|
| 30 | + if ($length === 3) |
|
| 31 | 31 | { |
| 32 | 32 | return $this->parseHEX3($hex, $name); |
| 33 | 33 | } |
| 34 | 34 | |
| 35 | - if($length === 6) |
|
| 35 | + if ($length === 6) |
|
| 36 | 36 | { |
| 37 | 37 | return $this->parseHEX6($hex, $name); |
| 38 | 38 | } |
@@ -64,7 +64,7 @@ discard block |
||
| 64 | 64 | return $this->name; |
| 65 | 65 | } |
| 66 | 66 | |
| 67 | - public function setSelfClosing(bool $selfClosing=true) : HTMLTag |
|
| 67 | + public function setSelfClosing(bool $selfClosing = true) : HTMLTag |
|
| 68 | 68 | { |
| 69 | 69 | $this->selfClosing = $selfClosing; |
| 70 | 70 | return $this; |
@@ -75,7 +75,7 @@ discard block |
||
| 75 | 75 | return $this->selfClosing; |
| 76 | 76 | } |
| 77 | 77 | |
| 78 | - public function setEmptyAllowed(bool $allowed=true) : HTMLTag |
|
| 78 | + public function setEmptyAllowed(bool $allowed = true) : HTMLTag |
|
| 79 | 79 | { |
| 80 | 80 | $this->allowEmpty = $allowed; |
| 81 | 81 | return $this; |
@@ -83,7 +83,7 @@ discard block |
||
| 83 | 83 | |
| 84 | 84 | public function isEmptyAllowed() : bool |
| 85 | 85 | { |
| 86 | - if($this->isSelfClosing()) |
|
| 86 | + if ($this->isSelfClosing()) |
|
| 87 | 87 | { |
| 88 | 88 | return true; |
| 89 | 89 | } |
@@ -91,9 +91,9 @@ discard block |
||
| 91 | 91 | return $this->allowEmpty; |
| 92 | 92 | } |
| 93 | 93 | |
| 94 | - public static function create(string $name, ?AttributeCollection $attributes=null) : HTMLTag |
|
| 94 | + public static function create(string $name, ?AttributeCollection $attributes = null) : HTMLTag |
|
| 95 | 95 | { |
| 96 | - if($attributes === null) |
|
| 96 | + if ($attributes === null) |
|
| 97 | 97 | { |
| 98 | 98 | $attributes = AttributeCollection::create(); |
| 99 | 99 | } |
@@ -129,7 +129,7 @@ discard block |
||
| 129 | 129 | |
| 130 | 130 | public function render() : string |
| 131 | 131 | { |
| 132 | - if(!$this->isEmptyAllowed() && $this->isEmpty()) |
|
| 132 | + if (!$this->isEmptyAllowed() && $this->isEmpty()) |
|
| 133 | 133 | { |
| 134 | 134 | return ''; |
| 135 | 135 | } |
@@ -142,7 +142,7 @@ discard block |
||
| 142 | 142 | |
| 143 | 143 | public function renderContent() : string |
| 144 | 144 | { |
| 145 | - if($this->selfClosing) |
|
| 145 | + if ($this->selfClosing) |
|
| 146 | 146 | { |
| 147 | 147 | return ''; |
| 148 | 148 | } |
@@ -152,7 +152,7 @@ discard block |
||
| 152 | 152 | |
| 153 | 153 | public function getSelfClosingChar() : string |
| 154 | 154 | { |
| 155 | - if($this->selfClosing && self::getGlobalOptions()->getSelfCloseStyle() === self::SELF_CLOSE_STYLE_SLASH) |
|
| 155 | + if ($this->selfClosing && self::getGlobalOptions()->getSelfCloseStyle() === self::SELF_CLOSE_STYLE_SLASH) |
|
| 156 | 156 | { |
| 157 | 157 | return '/'; |
| 158 | 158 | } |
@@ -172,7 +172,7 @@ discard block |
||
| 172 | 172 | |
| 173 | 173 | public function renderClose() : string |
| 174 | 174 | { |
| 175 | - if($this->selfClosing) |
|
| 175 | + if ($this->selfClosing) |
|
| 176 | 176 | { |
| 177 | 177 | return ''; |
| 178 | 178 | } |
@@ -184,7 +184,7 @@ discard block |
||
| 184 | 184 | |
| 185 | 185 | public static function getGlobalOptions() : GlobalOptions |
| 186 | 186 | { |
| 187 | - if(!isset(self::$globalOptions)) |
|
| 187 | + if (!isset(self::$globalOptions)) |
|
| 188 | 188 | { |
| 189 | 189 | self::$globalOptions = new GlobalOptions(); |
| 190 | 190 | } |