| Total Complexity | 4 |
| Total Lines | 41 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 7 | trait Traits_Stylable |
||
| 8 | { |
||
| 9 | abstract public function getStyles() : StyleCollection; |
||
| 10 | |||
| 11 | public function hasStyles() : bool |
||
| 12 | { |
||
| 13 | return $this->getStyles()->hasStyles(); |
||
| 14 | } |
||
| 15 | |||
| 16 | /** |
||
| 17 | * @param string $name |
||
| 18 | * @param string $value |
||
| 19 | * @param bool $important |
||
| 20 | * @return $this |
||
| 21 | */ |
||
| 22 | public function style(string $name, string $value, bool $important) |
||
| 23 | { |
||
| 24 | $this->getStyles()->style($name, $value, $important); |
||
| 25 | return $this; |
||
| 26 | } |
||
| 27 | |||
| 28 | /** |
||
| 29 | * @param string $name |
||
| 30 | * @param string|number|NumberInfo|Interface_Stringable|NULL $value |
||
| 31 | * @param bool $important |
||
| 32 | * @return $this |
||
| 33 | */ |
||
| 34 | public function styleAuto(string $name, $value, bool $important) |
||
| 35 | { |
||
| 36 | $this->getStyles()->styleAuto($name, $value, $important); |
||
| 37 | return $this; |
||
| 38 | } |
||
| 39 | |||
| 40 | /** |
||
| 41 | * @param string $name |
||
| 42 | * @return $this |
||
| 43 | */ |
||
| 44 | public function removeStyle(string $name) |
||
| 48 | } |
||
| 49 | } |
||
| 50 |