diff --git a/src/Annotation/Get.php b/src/Annotation/Get.php index 1dcb14c..e1c6e68 100644 --- a/src/Annotation/Get.php +++ b/src/Annotation/Get.php @@ -34,9 +34,9 @@ use Exception; * @throws \Kiri\Exception\NotFindClassException * @throws \ReflectionException */ - public static function execute(mixed $params, mixed $class, mixed $method = null): bool + public function execute(mixed $class, mixed $method = null): bool { - di(Getter::class)->addGetter($params->name, $class, $method); + di(Getter::class)->addGetter($this->name, $class, $method); return true; } diff --git a/src/Annotation/Relation.php b/src/Annotation/Relation.php index 1226d43..b542cfa 100644 --- a/src/Annotation/Relation.php +++ b/src/Annotation/Relation.php @@ -24,7 +24,7 @@ use Kiri\Kiri; * Relation constructor. * @param string $name */ - public function __construct(string $name) + public function __construct(public string $name) { } @@ -36,9 +36,9 @@ use Kiri\Kiri; * @return bool * @throws Exception */ - public static function execute(mixed $params, mixed $class, mixed $method = null): bool + public function execute(mixed $class, mixed $method = null): bool { - di(Relate::class)->addRelate($class, $params->name, $method); + di(Relate::class)->addRelate($class, $this->name, $method); return true; } diff --git a/src/Annotation/Set.php b/src/Annotation/Set.php index ef5e759..56a531e 100644 --- a/src/Annotation/Set.php +++ b/src/Annotation/Set.php @@ -16,7 +16,7 @@ use Exception; * Set constructor. * @param string $name */ - public function __construct(string $name) + public function __construct(public string $name) { } @@ -29,9 +29,9 @@ use Exception; * @throws \Kiri\Exception\NotFindClassException * @throws \ReflectionException */ - public static function execute(mixed $params, mixed $class, mixed $method = null): bool + public function execute(mixed $class, mixed $method = null): bool { - di(Setter::class)->addSetter($params->name, $class, $method); + di(Setter::class)->addSetter($this->name, $class, $method); return true; }