Skip to content
This repository was archived by the owner on Jan 20, 2024. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public function offsetSet($offset, $value): void
*
* @return bool
*/
public function offsetExists($offset)
public function offsetExists($offset): bool
{
return isset($this->settings[$offset]);
}
Expand All @@ -88,7 +88,7 @@ public function offsetUnset($offset): void
* Get a single settings value
* @link http://php.net/manual/en/arrayaccess.offsetget.php
*/
public function offsetGet($offset)
public function offsetGet($offset): mixed
{
return $this->settings[$offset] ?? null;
}
Expand Down
15 changes: 3 additions & 12 deletions src/TraitCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,7 @@ public static function getInstance()
return self::$instance;
}

/**
* @return TraitDefinition
*/
public function current()
public function current(): TraitDefinition
{
if ($this->valid()) {
return $this->collection[$this->position];
Expand All @@ -67,10 +64,7 @@ public function current()
throw new InvalidKeyException($this->position);
}

/**
* @return int
*/
public function key()
public function key(): int
{
return $this->position;
}
Expand All @@ -85,10 +79,7 @@ public function rewind(): void
$this->position = 0;
}

/**
* @return bool
*/
public function valid()
public function valid(): bool
{
return isset($this->collection[$this->position]);
}
Expand Down
6 changes: 3 additions & 3 deletions src/TypeCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,15 @@ public static function getInstance()
/**
* {@inheritDoc}
*/
public function current()
public function current(): mixed
{
return $this->collection[$this->position];
}

/**
* {@inheritDoc}
*/
public function key()
public function key(): mixed
{
return $this->position;
}
Expand All @@ -84,7 +84,7 @@ public function rewind(): void
/**
* {@inheritDoc}
*/
public function valid()
public function valid(): bool
{
return isset($this->collection[$this->position]);
}
Expand Down