1 | <?php |
||
7 | class main implements \Serializable { |
||
8 | |||
9 | public $color; |
||
10 | |||
11 | public function __construct($color) { |
||
14 | |||
15 | public function serialize() :string { |
||
18 | |||
19 | public function unserialize($serialized) { |
||
24 | |||
25 | public function set($color, string $type = '') { |
||
32 | |||
33 | public function rgb() { |
||
36 | |||
37 | public function hsl() { |
||
40 | |||
41 | public function is_dark(int $check_score = 128) :bool { |
||
45 | |||
46 | public function red(float $adjustment, bool $as_percentage = FALSE, bool $set_absolute = TRUE) { |
||
49 | |||
50 | public function green(float $adjustment, bool $as_percentage = FALSE, bool $set_absolute = TRUE) { |
||
53 | |||
54 | public function blue(float $adjustment, bool $as_percentage = FALSE, bool $set_absolute = TRUE) { |
||
57 | |||
58 | public function hue(float $adjustment, bool $as_percentage = FALSE, bool $set_absolute = TRUE) { |
||
61 | |||
62 | public function saturation(float $adjustment, bool $as_percentage = FALSE, bool $set_absolute = TRUE) { |
||
65 | |||
66 | public function light(float $adjustment, bool $as_percentage = FALSE, bool $set_absolute = TRUE) { |
||
69 | |||
70 | public function get_scheme(string $scheme_name = '') { |
||
80 | |||
81 | public function get_hex_scheme(string $scheme_name = '') { |
||
84 | } |
||
85 |
This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.
To visualize
will produce issues in the first and second line, while this second example
will produce no issues.