| @@ 12-42 (lines=31) @@ | ||
| 9 | * |
|
| 10 | * TODO: detect dynamic instantiations like `$shape = new $class_name( $this->images )` |
|
| 11 | */ |
|
| 12 | class Static_Call extends PersistentListItem { |
|
| 13 | public $path; |
|
| 14 | public $line; |
|
| 15 | public $class_name; |
|
| 16 | public $method_name; |
|
| 17 | ||
| 18 | public function __construct( $path, $line, $class_name, $method_name ) { |
|
| 19 | $this->path = $path; |
|
| 20 | $this->line = $line; |
|
| 21 | $this->class_name = $class_name; |
|
| 22 | $this->method_name = $method_name; |
|
| 23 | } |
|
| 24 | ||
| 25 | public function to_csv_array() { |
|
| 26 | return array( |
|
| 27 | $this->type(), |
|
| 28 | $this->path, |
|
| 29 | $this->line, |
|
| 30 | $this->class_name, |
|
| 31 | $this->method_name |
|
| 32 | ); |
|
| 33 | } |
|
| 34 | ||
| 35 | function type() { |
|
| 36 | return 'static_call'; |
|
| 37 | } |
|
| 38 | ||
| 39 | function display_name() { |
|
| 40 | return $this->class_name . '::' . $this->method_name; |
|
| 41 | } |
|
| 42 | } |
|
| @@ 12-42 (lines=31) @@ | ||
| 9 | * |
|
| 10 | * TODO: detect dynamic instantiations like `$shape = new $class_name( $this->images )` |
|
| 11 | */ |
|
| 12 | class Static_Const extends PersistentListItem { |
|
| 13 | public $path; |
|
| 14 | public $line; |
|
| 15 | public $class_name; |
|
| 16 | public $const_name; |
|
| 17 | ||
| 18 | public function __construct( $path, $line, $class_name, $const_name ) { |
|
| 19 | $this->path = $path; |
|
| 20 | $this->line = $line; |
|
| 21 | $this->class_name = $class_name; |
|
| 22 | $this->const_name = $const_name; |
|
| 23 | } |
|
| 24 | ||
| 25 | public function to_csv_array() { |
|
| 26 | return array( |
|
| 27 | $this->type(), |
|
| 28 | $this->path, |
|
| 29 | $this->line, |
|
| 30 | $this->class_name, |
|
| 31 | $this->const_name |
|
| 32 | ); |
|
| 33 | } |
|
| 34 | ||
| 35 | function type() { |
|
| 36 | return 'class_const'; |
|
| 37 | } |
|
| 38 | ||
| 39 | function display_name() { |
|
| 40 | return $this->class_name . '::' . $this->const_name; |
|
| 41 | } |
|
| 42 | } |
|