for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace KGzocha\Searcher\Criteria;
/**
* @author Krzysztof Gzocha <[email protected]>
*/
class TextCriteria implements CriteriaInterface
{
* @var string|null
private $text;
* @param string $text
public function __construct(string $text = null)
$this->text = $text;
}
* @return string|null
public function getText()
return $this->text;
public function setText(string $text = null)
* {@inheritdoc}
public function shouldBeApplied(): bool
return $this->text !== null && 0 < mb_strlen($this->text);