mirror of
https://github.com/rectorphp/rector.git
synced 2025-01-18 05:48:21 +01:00
c726969380
fc10fce13d
[Rectify] [Php81] Enable Rectify on Readonly Property only (#1384)
54 lines
1.2 KiB
PHP
54 lines
1.2 KiB
PHP
<?php
|
|
|
|
declare (strict_types=1);
|
|
namespace Rector\Php80\ValueObject;
|
|
|
|
use PhpParser\Node\Expr;
|
|
use PhpParser\Node\Expr\FuncCall;
|
|
final class StrStartsWith
|
|
{
|
|
/**
|
|
* @readonly
|
|
* @var \PhpParser\Node\Expr\FuncCall
|
|
*/
|
|
private $funcCall;
|
|
/**
|
|
* @readonly
|
|
* @var \PhpParser\Node\Expr
|
|
*/
|
|
private $haystackExpr;
|
|
/**
|
|
* @readonly
|
|
* @var \PhpParser\Node\Expr
|
|
*/
|
|
private $needleExpr;
|
|
/**
|
|
* @readonly
|
|
* @var bool
|
|
*/
|
|
private $isPositive;
|
|
public function __construct(\PhpParser\Node\Expr\FuncCall $funcCall, \PhpParser\Node\Expr $haystackExpr, \PhpParser\Node\Expr $needleExpr, bool $isPositive)
|
|
{
|
|
$this->funcCall = $funcCall;
|
|
$this->haystackExpr = $haystackExpr;
|
|
$this->needleExpr = $needleExpr;
|
|
$this->isPositive = $isPositive;
|
|
}
|
|
public function getFuncCall() : \PhpParser\Node\Expr\FuncCall
|
|
{
|
|
return $this->funcCall;
|
|
}
|
|
public function getHaystackExpr() : \PhpParser\Node\Expr
|
|
{
|
|
return $this->haystackExpr;
|
|
}
|
|
public function isPositive() : bool
|
|
{
|
|
return $this->isPositive;
|
|
}
|
|
public function getNeedleExpr() : \PhpParser\Node\Expr
|
|
{
|
|
return $this->needleExpr;
|
|
}
|
|
}
|