for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace XLaravel\ValidationExtend\Rules;
use Illuminate\Contracts\Validation\Rule;
class HumanNameRule implements Rule
{
public function passes($attribute, $value): bool
return (bool)preg_match("/^\p{Lu}[\p{L} '&-]*[\p{L}]$/u", $value);
}
public function message(): string
return trans('X-Laravel::validationExtend.human_name');
trans
If this is a false-positive, you can also ignore this issue in your code via the ignore-call annotation
ignore-call
return /** @scrutinizer ignore-call */ trans('X-Laravel::validationExtend.human_name');