for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace Cycle\ORM\Promise\Declaration\Visitor;
use PhpParser\Node;
use PhpParser\NodeVisitorAbstract;
class LocateProperties extends NodeVisitorAbstract
{
/** @var string[] */
private $properties = [];
/**
* {@inheritdoc}
*/
public function leaveNode(Node $node)
if (!$node instanceof Node\Stmt\Property) {
return null;
}
if ($node->isPrivate() || $node->isStatic()) {
foreach ($node->props as $prop) {
$this->properties[] = $prop->name->name;
public function getProperties(): array
return $this->properties;