diff --git a/phpstan-baseline.php b/phpstan-baseline.php index 44239104f22c..6d22593ffcab 100644 --- a/phpstan-baseline.php +++ b/phpstan-baseline.php @@ -806,26 +806,6 @@ 'count' => 1, 'path' => __DIR__ . '/system/Email/Email.php', ]; -$ignoreErrors[] = [ - 'message' => '#^Method CodeIgniter\\\\Encryption\\\\Handlers\\\\SodiumHandler\\:\\:parseParams\\(\\) has no return type specified\\.$#', - 'count' => 1, - 'path' => __DIR__ . '/system/Encryption/Handlers/SodiumHandler.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Property CodeIgniter\\\\Entity\\\\Entity\\:\\:\\$casts has no type specified\\.$#', - 'count' => 1, - 'path' => __DIR__ . '/system/Entity/Entity.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Property CodeIgniter\\\\Entity\\\\Entity\\:\\:\\$datamap has no type specified\\.$#', - 'count' => 1, - 'path' => __DIR__ . '/system/Entity/Entity.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Property CodeIgniter\\\\Entity\\\\Entity\\:\\:\\$dates has no type specified\\.$#', - 'count' => 1, - 'path' => __DIR__ . '/system/Entity/Entity.php', -]; $ignoreErrors[] = [ 'message' => '#^Method CodeIgniter\\\\Events\\\\Events\\:\\:on\\(\\) has parameter \\$callback with no signature specified for callable\\.$#', 'count' => 1, diff --git a/system/Encryption/Handlers/SodiumHandler.php b/system/Encryption/Handlers/SodiumHandler.php index 9dc4cdbdec44..95dcdfb6c8b0 100644 --- a/system/Encryption/Handlers/SodiumHandler.php +++ b/system/Encryption/Handlers/SodiumHandler.php @@ -112,6 +112,8 @@ public function decrypt($data, $params = null) * * @param array|string|null $params * + * @return void + * * @throws EncryptionException If key is empty */ protected function parseParams($params) diff --git a/system/Entity/Entity.php b/system/Entity/Entity.php index 07e1e26393c8..a979567d75e7 100644 --- a/system/Entity/Entity.php +++ b/system/Entity/Entity.php @@ -45,9 +45,17 @@ class Entity implements JsonSerializable * $datamap = [ * 'class_property_name' => 'db_column_name' * ]; + * + * @var array */ protected $datamap = []; + /** + * The date fields. + * + * @var array + * @phpstan-var list + */ protected $dates = [ 'created_at', 'updated_at', @@ -57,6 +65,8 @@ class Entity implements JsonSerializable /** * Array of field names and the type of value to cast them as when * they are accessed. + * + * @var array */ protected $casts = [];