From a22d0e032d8ca207e0b4eacbbcb7f19e4c5fb2cd Mon Sep 17 00:00:00 2001 From: Anton Medvedev Date: Sun, 27 Oct 2024 11:53:28 +0100 Subject: [PATCH] Code style Collection.php --- src/Collection/Collection.php | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/src/Collection/Collection.php b/src/Collection/Collection.php index 165a663d3..d2c7e154c 100644 --- a/src/Collection/Collection.php +++ b/src/Collection/Collection.php @@ -15,20 +15,14 @@ class Collection implements Countable, IteratorAggregate { - /** - * @var array - */ - protected $values = []; + protected array $values = []; public function all(): array { return $this->values; } - /** - * @return mixed - */ - public function get(string $name) + public function get(string $name): mixed { if ($this->has($name)) { return $this->values[$name]; @@ -42,10 +36,7 @@ public function has(string $name): bool return array_key_exists($name, $this->values); } - /** - * @param mixed $object - */ - public function set(string $name, $object) + public function set(string $name, mixed $object) { $this->values[$name] = $object; }