1 | <?php |
||
7 | class main { |
||
8 | |||
9 | public $color; |
||
10 | |||
11 | public function __construct($color) { |
||
14 | |||
15 | public function set($color) { |
||
22 | |||
23 | public function is_dark(int $check_score = 128) :bool { |
||
27 | |||
28 | public function red(float $adjustment, bool $as_percentage = FALSE, bool $set_absolute = TRUE) { |
||
29 | return modify::rgb($this->color, 'red', $adjustment, $as_percentage, $set_absolute); |
||
30 | } |
||
31 | |||
32 | public function green(float $adjustment, bool $as_percentage = FALSE, bool $set_absolute = TRUE) { |
||
33 | return modify::rgb($this->color, 'green', $adjustment, $as_percentage, $set_absolute); |
||
34 | } |
||
35 | |||
36 | public function blue(float $adjustment, bool $as_percentage = FALSE, bool $set_absolute = TRUE) { |
||
37 | return modify::rgb($this->color, 'blue', $adjustment, $as_percentage, $set_absolute); |
||
38 | } |
||
39 | |||
40 | public function hue(float $adjustment, bool $as_percentage = FALSE, bool $set_absolute = TRUE) { |
||
41 | return modify::hsl($this->color, 'hue', $adjustment, $as_percentage, $set_absolute); |
||
42 | } |
||
43 | |||
44 | public function saturation(float $adjustment, bool $as_percentage = FALSE, bool $set_absolute = TRUE) { |
||
45 | return modify::hsl($this->color, 'saturation', $adjustment, $as_percentage, $set_absolute); |
||
46 | } |
||
47 | |||
48 | public function light(float $adjustment, bool $as_percentage = FALSE, bool $set_absolute = TRUE) { |
||
49 | return modify::hsl($this->color, 'light', $adjustment, $as_percentage, $set_absolute); |
||
50 | } |
||
51 | |||
52 | public function get_scheme(string $scheme_name = '') { |
||
62 | |||
63 | public function get_hex_scheme(string $scheme_name = '') { |
||
66 | } |
||
67 |
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.