| 1 | <?php |
||
| 10 | trait Implementation |
||
| 11 | { |
||
| 12 | /** |
||
| 13 | * Property key which should trigger the processor |
||
| 14 | * @var string |
||
| 15 | */ |
||
| 16 | protected $property; |
||
| 17 | |||
| 18 | /** |
||
| 19 | * Apply processing to a single node |
||
| 20 | * |
||
| 21 | * @param Node $node |
||
| 22 | * @return void |
||
| 23 | */ |
||
| 24 | abstract public function applyToNode(Node $node); |
||
| 25 | |||
| 26 | /** |
||
| 27 | * Class constructor |
||
| 28 | * |
||
| 29 | * @param string $property Property key with the processing instruction |
||
| 30 | */ |
||
| 31 | 5 | public function __construct($property) |
|
| 35 | |||
| 36 | /** |
||
| 37 | * Doesn't apply, simply return processor |
||
| 38 | * |
||
| 39 | * @param object $source Data source |
||
| 40 | * @param array|object $target Target or dot key path |
||
| 41 | */ |
||
| 42 | 2 | public function withSourceAndTarget($source, $target) |
|
| 46 | |||
| 47 | /** |
||
| 48 | * Get the property key that holds the processing instruction |
||
| 49 | * |
||
| 50 | * @return string |
||
| 51 | */ |
||
| 52 | 3 | public function getProperty() |
|
| 56 | } |
||
| 57 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.