| 1 | <?php |
||
| 13 | class Mustache implements Processor |
||
| 14 | { |
||
| 15 | use Processor\Implementation; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * @var object |
||
| 19 | */ |
||
| 20 | protected $source; |
||
| 21 | |||
| 22 | /** |
||
| 23 | * Class constructor |
||
| 24 | * |
||
| 25 | * @param DataEnricher $invoker |
||
| 26 | * @param string $property Property key which should trigger the processor |
||
| 27 | */ |
||
| 28 | public function __construct(DataEnricher $invoker, $property) |
||
| 33 | |||
| 34 | /** |
||
| 35 | * Apply processing to a single node |
||
| 36 | * |
||
| 37 | * @param Node $node |
||
| 38 | */ |
||
| 39 | protected function applyToNode(Node $node) |
||
| 46 | |||
| 47 | /** |
||
| 48 | * Parse as mustache template |
||
| 49 | * |
||
| 50 | * @param string $template |
||
| 51 | */ |
||
| 52 | protected function parse($template) |
||
| 57 | } |
||
| 58 |
This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.
To visualize
will produce issues in the first and second line, while this second example
will produce no issues.