for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php declare(strict_types=1);
namespace Star\Component\State\Transitions;
use Star\Component\State\RegistryBuilder;
use Star\Component\State\StateTransition;
final class OneToOneTransition implements StateTransition
{
/**
* @var string
*/
private $name;
private $from;
private $to;
public function __construct(string $name, string $from, string $to)
$this->name = $name;
$this->from = $from;
$this->to = $to;
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.
}
public function getName(): string
return $this->name;
public function onRegister(RegistryBuilder $registry): void
$registry->registerStartingState($this->name, $this->from, []);
$registry->registerDestinationState($this->name, $this->to, []);
public function getDestinationState(): string
return $this->to;
This check marks files that end in a newline character, i.e. an empy line.