mirror of
https://github.com/rectorphp/rector.git
synced 2025-02-22 18:54:39 +01:00
60 lines
1.0 KiB
PHP
60 lines
1.0 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Rector\Php80\ValueObject;
|
|
|
|
use PhpParser\Node\Expr;
|
|
use PhpParser\Node\Expr\FuncCall;
|
|
|
|
final class StrStartsWith
|
|
{
|
|
/**
|
|
* @var bool
|
|
*/
|
|
private $isPositive = false;
|
|
|
|
/**
|
|
* @var FuncCall
|
|
*/
|
|
private $funcCall;
|
|
|
|
/**
|
|
* @var Expr
|
|
*/
|
|
private $haystackExpr;
|
|
|
|
/**
|
|
* @var Expr
|
|
*/
|
|
private $needleExpr;
|
|
|
|
public function __construct(FuncCall $funcCall, Expr $haystackExpr, Expr $needleExpr, bool $isPositive)
|
|
{
|
|
$this->funcCall = $funcCall;
|
|
$this->haystackExpr = $haystackExpr;
|
|
$this->isPositive = $isPositive;
|
|
$this->needleExpr = $needleExpr;
|
|
}
|
|
|
|
public function getFuncCall(): FuncCall
|
|
{
|
|
return $this->funcCall;
|
|
}
|
|
|
|
public function getHaystackExpr(): Expr
|
|
{
|
|
return $this->haystackExpr;
|
|
}
|
|
|
|
public function isPositive(): bool
|
|
{
|
|
return $this->isPositive;
|
|
}
|
|
|
|
public function getNeedleExpr(): Expr
|
|
{
|
|
return $this->needleExpr;
|
|
}
|
|
}
|