2020-07-30 21:30:19 +02:00
|
|
|
<?php
|
2021-12-15 04:58:32 +01:00
|
|
|
|
2020-07-30 21:30:19 +02:00
|
|
|
namespace Psalm\Internal\PhpVisitor;
|
|
|
|
|
|
|
|
use PhpParser;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @internal
|
|
|
|
*/
|
2020-10-15 19:23:35 +02:00
|
|
|
class NodeCounterVisitor extends PhpParser\NodeVisitorAbstract
|
2020-07-30 21:30:19 +02:00
|
|
|
{
|
2022-12-14 01:52:54 +01:00
|
|
|
public int $count = 0;
|
2020-07-30 21:30:19 +02:00
|
|
|
|
2021-10-04 00:03:06 +02:00
|
|
|
public function enterNode(PhpParser\Node $node): ?int
|
2020-07-30 21:30:19 +02:00
|
|
|
{
|
|
|
|
$this->count++;
|
2021-09-25 16:50:14 +02:00
|
|
|
|
|
|
|
return null;
|
2020-07-30 21:30:19 +02:00
|
|
|
}
|
|
|
|
}
|