for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace Doctrine\Inflector\Rules;
use function preg_match;
class Pattern
{
/** @var string */
private $regex;
public function __construct(string $regex)
$this->regex = $regex;
}
public function getRegex() : string
return $this->regex;
public function matches(string $word) : bool
return preg_match($this->regex, $word) !== 0;