q
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
<?php
|
||||
|
||||
namespace Kiri\Inject\Validator\Inject;
|
||||
namespace Kiri\Router\Validator\Inject;
|
||||
|
||||
use Kiri\Router\Interface\ValidatorInterface;
|
||||
|
||||
#[\Attribute(\Attribute::TARGET_PROPERTY)]
|
||||
class Max implements ValidatorInterface
|
||||
@@ -17,12 +18,13 @@ class Max implements ValidatorInterface
|
||||
|
||||
|
||||
/**
|
||||
* @param object $class
|
||||
* @param string $name
|
||||
* @return bool
|
||||
*/
|
||||
public function dispatch(string $name): bool
|
||||
public function dispatch(object $class, string $name): bool
|
||||
{
|
||||
// TODO: Implement dispatch() method.
|
||||
return true;
|
||||
return $class->{$name} <= $this->value;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user