mirror of https://github.com/rectorphp/rector.git
23 lines
418 B
PHP
23 lines
418 B
PHP
<?php
|
|
|
|
declare (strict_types=1);
|
|
namespace Rector\NodeAnalyzer;
|
|
|
|
use PhpParser\Node\Arg;
|
|
use PhpParser\Node\Identifier;
|
|
final class ArgsAnalyzer
|
|
{
|
|
/**
|
|
* @param Arg[] $args
|
|
*/
|
|
public function hasNamedArg(array $args) : bool
|
|
{
|
|
foreach ($args as $arg) {
|
|
if ($arg->name instanceof Identifier) {
|
|
return \true;
|
|
}
|
|
}
|
|
return \false;
|
|
}
|
|
}
|