| Conditions | 5 |
| Paths | 3 |
| Total Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 33 | public function find_invocation_warnings( $invocation, $warnings ) { |
||
| 34 | if ( $invocation instanceof Static_Call ) { |
||
| 35 | // check if it's instantiating this missing class |
||
| 36 | // echo "Checking " . $invocation->class_name . " matches " . $this->declaration->class_name . "\n"; |
||
| 37 | // echo "... and " . $invocation->method_name . " matches " . $this->declaration->name . ", and invocation is static\n"; |
||
| 38 | if ( $invocation->class_name === $this->declaration->class_name |
||
| 39 | && $invocation->method_name === $this->declaration->name |
||
| 40 | && $this->declaration->static ) { |
||
| 41 | $warnings->add( new Warning( $invocation->path, $invocation->line, "Class static method" . $this->declaration->display_name() . " is missing") ); |
||
| 42 | } |
||
| 43 | } |
||
| 44 | } |
||
| 45 | } |