for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace Yiisoft\Validator\Tests\TestEnvironments\Support\Data;
use Yiisoft\Validator\Result;
use Yiisoft\Validator\Rule\Callback;
use Yiisoft\Validator\Rule\StopOnError;
#[StopOnError([
new Callback(method: 'validateA'),
new Callback(method: 'validateB'),
])]
final class StopOnErrorDto
{
private function validateA(): Result
validateA()
This check looks for private methods that have been defined, but are not used inside the class.
return (new Result())->addError('error A');
}
private function validateB(): Result
validateB()
return (new Result())->addError('error B');
This check looks for private methods that have been defined, but are not used inside the class.