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

Commit 69f8607

Browse files
committed
run code inspection check
1 parent c54a0c6 commit 69f8607

File tree

6 files changed

+10
-10
lines changed

6 files changed

+10
-10
lines changed

src/Configurable.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public function __construct(array $config = [])
3434
/**
3535
* init
3636
*/
37-
protected function init()
37+
protected function init(): void
3838
{
3939
// init something ...
4040
}

src/ObjectHelper.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public static function init($object, array $options)
4848
* @param $object
4949
* @param array $options
5050
*/
51-
public static function configure($object, array $options)
51+
public static function configure($object, array $options): void
5252
{
5353
foreach ($options as $property => $value) {
5454
if (\property_exists($object, $property)) {
@@ -62,7 +62,7 @@ public static function configure($object, array $options)
6262
* @param $object
6363
* @param array $options
6464
*/
65-
public static function setAttrs($object, array $options)
65+
public static function setAttrs($object, array $options): void
6666
{
6767
self::configure($object, $options);
6868
}

src/Traits/ArrayAccessByGetterSetterTrait.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public function offsetGet($offset)
5151
* @param mixed $offset The array offset.
5252
* @param mixed $value The array value.
5353
*/
54-
public function offsetSet($offset, $value)
54+
public function offsetSet($offset, $value): void
5555
{
5656
$setter = 'set' . ucfirst($offset);
5757

@@ -65,7 +65,7 @@ public function offsetSet($offset, $value)
6565
* @param mixed $offset The array offset.
6666
* @return void
6767
*/
68-
public function offsetUnset($offset)
68+
public function offsetUnset($offset): void
6969
{
7070
// unset($this->$offset);
7171
}

src/Traits/ArrayAccessByPropertyTrait.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public function offsetGet($offset)
4646
* @param mixed $value The array value.
4747
* @return void
4848
*/
49-
public function offsetSet($offset, $value)
49+
public function offsetSet($offset, $value): void
5050
{
5151
$this->$offset = $value;
5252
}
@@ -56,7 +56,7 @@ public function offsetSet($offset, $value)
5656
* @param mixed $offset The array offset.
5757
* @return void
5858
*/
59-
public function offsetUnset($offset)
59+
public function offsetUnset($offset): void
6060
{
6161
// unset($this->$offset);
6262
}

src/Traits/ObjectPoolTrait.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public static function get(string $class)
3737
/**
3838
* @param \stdClass|string $object
3939
*/
40-
public static function put($object)
40+
public static function put($object): void
4141
{
4242
if (\is_string($object)) {
4343
$object = new $object;
@@ -99,7 +99,7 @@ public static function count($class = null): int
9999
* @param null $class
100100
* @throws \InvalidArgumentException
101101
*/
102-
public static function destroy($class = null)
102+
public static function destroy($class = null): void
103103
{
104104
if ($class) {
105105
if (!isset(self::$pool[$class])) {

src/Traits/StdObjectTrait.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public function __construct(array $config = [])
6565
/**
6666
* init
6767
*/
68-
protected function init()
68+
protected function init(): void
6969
{
7070
// init something ...
7171
}

0 commit comments

Comments
 (0)