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\Each;
#[Each([
new Callback(method: 'validate'),
])]
final class EachDto
{
public function __construct(
public int $a,
public int $b,
public int $c,
) {
}
private function validate(int $value): Result
validate()
This check looks for private methods that have been defined, but are not used inside the class.
$result = new Result();
if ($value !== 0) {
$result->addError('Value must be zero.');
return $result;
This check looks for private methods that have been defined, but are not used inside the class.