Skip to content
This repository was archived by the owner on Jun 11, 2020. It is now read-only.

Commit a1049b8

Browse files
committed
add more return type declare
1 parent 04564da commit a1049b8

3 files changed

+4
-4
lines changed

src/Traits/ArrayAccessByGetterSetterTrait.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ trait ArrayAccessByGetterSetterTrait
2525
* @param mixed $offset The array offset.
2626
* @return boolean True if the offset exists, false otherwise.
2727
*/
28-
public function offsetExists($offset)
28+
public function offsetExists($offset): bool
2929
{
3030
return property_exists($this, $offset);
3131
}

src/Traits/ArrayAccessByPropertyTrait.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ trait ArrayAccessByPropertyTrait
2525
* @param mixed $offset The array offset.
2626
* @return boolean True if the offset exists, false otherwise.
2727
*/
28-
public function offsetExists($offset)
28+
public function offsetExists($offset): bool
2929
{
3030
return property_exists($this, $offset);
3131
}

src/Traits/ObjectPoolTrait.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ public static function use($class, \Closure $handler)
6666
* @param string|\stdClass $class
6767
* @return \SplStack
6868
*/
69-
public static function getStack($class)
69+
public static function getStack($class): \SplStack
7070
{
7171
$class = \is_string($class) ? $class : \get_class($class);
7272

@@ -82,7 +82,7 @@ public static function getStack($class)
8282
* @return int
8383
* @throws \InvalidArgumentException
8484
*/
85-
public static function count($class = null)
85+
public static function count($class = null): int
8686
{
8787
if ($class) {
8888
if (!isset(self::$pool[$class])) {

0 commit comments

Comments
 (0)