Skip to content

Commit

Permalink
Code style Collection.php
Browse files Browse the repository at this point in the history
  • Loading branch information
antonmedv committed Oct 27, 2024
1 parent d581fdc commit a22d0e0
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions src/Collection/Collection.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {

Check failure on line 27 in src/Collection/Collection.php

View workflow job for this annotation

GitHub Actions / phpstan

Method Deployer\Collection\Collection::get() should return mixed but return statement is missing.
return $this->values[$name];
Expand All @@ -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;
}
Expand Down

0 comments on commit a22d0e0

Please sign in to comment.