1 | <?php |
||
18 | class ReduceReduce extends Conflict |
||
19 | { |
||
20 | /** |
||
21 | * @var int |
||
22 | */ |
||
23 | protected $reduce1; |
||
24 | |||
25 | /** |
||
26 | * @var int |
||
27 | */ |
||
28 | protected $reduce2; |
||
29 | |||
30 | /** |
||
31 | * ReduceReduce constructor. |
||
32 | * |
||
33 | * @param int $reduce1 |
||
34 | * @param int $reduce2 |
||
35 | * @param Symbol $symbol |
||
36 | * @param Conflict|null $next |
||
37 | */ |
||
38 | public function __construct(int $reduce1, int $reduce2, Symbol $symbol, Conflict $next = null) |
||
44 | |||
45 | /** |
||
46 | * @return bool |
||
47 | */ |
||
48 | public function isReduceReduce(): bool |
||
52 | |||
53 | /** |
||
54 | * @return int |
||
55 | */ |
||
56 | public function reduce1(): int |
||
60 | |||
61 | /** |
||
62 | * @return int |
||
63 | */ |
||
64 | public function reduce2(): int |
||
68 | } |
||
69 |
This check looks at variables that have been passed in as parameters and are passed out again to other methods.
If the outgoing method call has stricter type requirements than the method itself, an issue is raised.
An additional type check may prevent trouble.