rector/rules/Php80/ValueObject/StrStartsWith.php

50 lines
1.2 KiB
PHP
Raw Normal View History

2020-04-23 14:34:27 +02:00
<?php
declare (strict_types=1);
2020-04-23 14:34:27 +02:00
namespace Rector\Php80\ValueObject;
use PhpParser\Node\Expr;
use PhpParser\Node\Expr\FuncCall;
final class StrStartsWith
2020-04-23 14:34:27 +02:00
{
/**
* @var \PhpParser\Node\Expr\FuncCall
2020-04-23 14:34:27 +02:00
*/
2020-04-23 23:49:56 +02:00
private $funcCall;
2020-04-23 14:34:27 +02:00
/**
* @var \PhpParser\Node\Expr
2020-04-23 14:34:27 +02:00
*/
private $haystackExpr;
2020-04-23 23:49:56 +02:00
/**
* @var \PhpParser\Node\Expr
2020-04-23 23:49:56 +02:00
*/
private $needleExpr;
/**
* @var bool
*/
private $isPositive;
public function __construct(\PhpParser\Node\Expr\FuncCall $funcCall, \PhpParser\Node\Expr $haystackExpr, \PhpParser\Node\Expr $needleExpr, bool $isPositive)
2020-04-23 14:34:27 +02:00
{
2020-04-23 23:49:56 +02:00
$this->funcCall = $funcCall;
2020-04-23 14:34:27 +02:00
$this->haystackExpr = $haystackExpr;
2020-04-23 23:49:56 +02:00
$this->needleExpr = $needleExpr;
$this->isPositive = $isPositive;
2020-04-23 14:34:27 +02:00
}
public function getFuncCall() : \PhpParser\Node\Expr\FuncCall
2020-04-23 14:34:27 +02:00
{
2020-04-23 23:49:56 +02:00
return $this->funcCall;
2020-04-23 14:34:27 +02:00
}
public function getHaystackExpr() : \PhpParser\Node\Expr
2020-04-23 14:34:27 +02:00
{
return $this->haystackExpr;
}
public function isPositive() : bool
2020-04-23 14:34:27 +02:00
{
return $this->isPositive;
}
public function getNeedleExpr() : \PhpParser\Node\Expr
2020-04-23 23:49:56 +02:00
{
return $this->needleExpr;
}
2020-04-23 14:34:27 +02:00
}