1 | <?php defined('SYSPATH') OR die('No direct script access.'); |
||
11 | class Kohana_Jam_Validator_Rule_Count extends Jam_Validator_Rule { |
||
12 | |||
13 | public $minimum; |
||
14 | |||
15 | public $maximum; |
||
16 | |||
17 | public $within; |
||
18 | |||
19 | public $is; |
||
20 | |||
21 | 16 | public function validate(Jam_Validated $model, $attribute, $value) |
|
51 | } |
||
52 |
This check looks for variable assignements that are either overwritten by other assignments or where the variable is not used subsequently.
Both the
$myVar
assignment in line 1 and the$higher
assignment in line 2 are dead. The first because$myVar
is never used and the second because$higher
is always overwritten for every possible time line.