Conditions | 4 |
Paths | 8 |
Total Lines | 19 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
25 | public function __construct(array $params = [], \Log $logger = null) |
||
26 | { |
||
27 | if (is_object($logger)) { |
||
28 | \Registry::set('logger', $logger); |
||
29 | } |
||
30 | $this->oLog = \Registry::get('logger'); |
||
31 | |||
32 | if (!array_key_exists('oLog', $params)) { |
||
33 | $this->oLog = \Registry::get('logger'); |
||
34 | } |
||
35 | |||
36 | foreach ($params as $k => $v) { |
||
37 | $this->$k = $v; |
||
38 | } |
||
39 | |||
40 | // save default validation rules and filter rules in-case we add rules |
||
41 | $this->validationRulesDefault = $this->validationRules; |
||
42 | $this->filterRulesDefault = $this->filterRules; |
||
43 | } |
||
44 | } |
||
45 |
This check looks for
@param
annotations where the type inferred by our type inference engine differs from the declared type.It makes a suggestion as to what type it considers more descriptive.
Most often this is a case of a parameter that can be null in addition to its declared types.