mirror of
https://github.com/rectorphp/rector.git
synced 2025-01-17 05:18:18 +01:00
9a4a5b2bc5
eb5df4dde7
Use vendor-patches main branch (#6453)
50 lines
1.0 KiB
PHP
50 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
|
|
{
|
|
/**
|
|
* @readonly
|
|
*/
|
|
private FuncCall $funcCall;
|
|
/**
|
|
* @readonly
|
|
*/
|
|
private Expr $haystackExpr;
|
|
/**
|
|
* @readonly
|
|
*/
|
|
private Expr $needleExpr;
|
|
/**
|
|
* @readonly
|
|
*/
|
|
private bool $isPositive;
|
|
public function __construct(FuncCall $funcCall, Expr $haystackExpr, Expr $needleExpr, bool $isPositive)
|
|
{
|
|
$this->funcCall = $funcCall;
|
|
$this->haystackExpr = $haystackExpr;
|
|
$this->needleExpr = $needleExpr;
|
|
$this->isPositive = $isPositive;
|
|
}
|
|
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;
|
|
}
|
|
}
|