for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace LegalThings\DataEnricher\Processor;
use LegalThings\DataEnricher;
use LegalThings\DataEnricher\Processor;
use LegalThings\DataEnricher\Node;
use Jasny\DotKey;
/**
* Symbolic link to a property of the source object
*/
class Reference implements Processor
{
use Processor\Implementation;
* @var DotKey
protected $source;
* Class constructor
*
* @param DataEnricher $invoker
* @param string $property Property key which should trigger the processor
public function __construct(DataEnricher $invoker, $property)
$this->source = DotKey::on($invoker->getSource());
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
$a = "a"; $ab = "ab"; $abc = "abc";
will produce issues in the first and second line, while this second example
will produce no issues.
$this->property = $property;
}
* Apply reference processing to a single node
* @param Node $node
protected function applyToNode(Node $node)
$ref = $node->getInstruction($this);
$result = $this->source->get($ref);
$node->setResult($result);
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.