mirror of
https://github.com/danog/psalm.git
synced 2025-01-10 15:09:04 +01:00
22 lines
353 B
PHP
22 lines
353 B
PHP
|
<?php
|
||
|
namespace Psalm\Internal\PhpVisitor;
|
||
|
|
||
|
use PhpParser;
|
||
|
|
||
|
/**
|
||
|
* @internal
|
||
|
*/
|
||
|
class NodeCounterVisitor extends PhpParser\NodeVisitorAbstract implements PhpParser\NodeVisitor
|
||
|
{
|
||
|
/** @var int */
|
||
|
public $count = 0;
|
||
|
|
||
|
/**
|
||
|
* @return null|int
|
||
|
*/
|
||
|
public function enterNode(PhpParser\Node $node)
|
||
|
{
|
||
|
$this->count++;
|
||
|
}
|
||
|
}
|