mirror of
https://github.com/rectorphp/rector.git
synced 2025-02-13 12:33:52 +01:00
17 lines
467 B
PHP
17 lines
467 B
PHP
<?php
|
|
|
|
declare (strict_types=1);
|
|
namespace Rector\Php80\ValueObjectFactory;
|
|
|
|
use PhpParser\Node\Expr\FuncCall;
|
|
use Rector\Php80\ValueObject\StrStartsWith;
|
|
final class StrStartsWithFactory
|
|
{
|
|
public function createFromFuncCall(FuncCall $funcCall, bool $isPositive) : StrStartsWith
|
|
{
|
|
$haystack = $funcCall->args[0]->value;
|
|
$needle = $funcCall->args[1]->value;
|
|
return new StrStartsWith($funcCall, $haystack, $needle, $isPositive);
|
|
}
|
|
}
|