Skip to content
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
15 changes: 5 additions & 10 deletions system/Traits/PropertiesTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

namespace CodeIgniter\Traits;

use Closure;
use ReflectionClass;
use ReflectionProperty;

Expand Down Expand Up @@ -48,17 +49,11 @@ final public function fill(array $params): self
*/
final public function getPublicProperties(): array
{
$worker = new class () {
/**
* @return array<string, mixed>
*/
public function getProperties(object $obj): array
{
return get_object_vars($obj);
}
};
$fn = fn (): array => get_object_vars($this);

$bound = Closure::bind($fn, $this, null);

return $worker->getProperties($this);
return $bound();
}

/**
Expand Down
3 changes: 1 addition & 2 deletions utils/phpstan-baseline/loader.neon
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# total 24 errors
# total 23 errors

includes:
- argument.type.neon
Expand All @@ -8,6 +8,5 @@ includes:
- function.resultUnused.neon
- method.childParameterType.neon
- method.childReturnType.neon
- missingType.iterableValue.neon
- property.defaultValue.neon
- property.phpDocType.neon
8 changes: 0 additions & 8 deletions utils/phpstan-baseline/missingType.iterableValue.neon

This file was deleted.

Loading