mirror of
https://github.com/rectorphp/rector.git
synced 2025-02-09 01:21:17 +01:00
17 lines
482 B
PHP
17 lines
482 B
PHP
<?php
|
|
|
|
declare (strict_types=1);
|
|
namespace Rector\Php74\Tokenizer;
|
|
|
|
use PhpParser\Node;
|
|
use Rector\Core\ValueObject\Application\File;
|
|
final class FollowedByCurlyBracketAnalyzer
|
|
{
|
|
public function isFollowed(\Rector\Core\ValueObject\Application\File $file, \PhpParser\Node $node) : bool
|
|
{
|
|
$oldTokens = $file->getOldTokens();
|
|
$endTokenPost = $node->getEndTokenPos();
|
|
return isset($oldTokens[$endTokenPost]) && $oldTokens[$endTokenPost] === '}';
|
|
}
|
|
}
|