Skip to content

Commit 33d28cc

Browse files
committed
Dev: Remove the ignore errors of Encryption and Entity in phpstan.
1 parent 6c22cce commit 33d28cc

3 files changed

Lines changed: 11 additions & 20 deletions

File tree

phpstan-baseline.php

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -806,26 +806,6 @@
806806
'count' => 1,
807807
'path' => __DIR__ . '/system/Email/Email.php',
808808
];
809-
$ignoreErrors[] = [
810-
'message' => '#^Method CodeIgniter\\\\Encryption\\\\Handlers\\\\SodiumHandler\\:\\:parseParams\\(\\) has no return type specified\\.$#',
811-
'count' => 1,
812-
'path' => __DIR__ . '/system/Encryption/Handlers/SodiumHandler.php',
813-
];
814-
$ignoreErrors[] = [
815-
'message' => '#^Property CodeIgniter\\\\Entity\\\\Entity\\:\\:\\$casts has no type specified\\.$#',
816-
'count' => 1,
817-
'path' => __DIR__ . '/system/Entity/Entity.php',
818-
];
819-
$ignoreErrors[] = [
820-
'message' => '#^Property CodeIgniter\\\\Entity\\\\Entity\\:\\:\\$datamap has no type specified\\.$#',
821-
'count' => 1,
822-
'path' => __DIR__ . '/system/Entity/Entity.php',
823-
];
824-
$ignoreErrors[] = [
825-
'message' => '#^Property CodeIgniter\\\\Entity\\\\Entity\\:\\:\\$dates has no type specified\\.$#',
826-
'count' => 1,
827-
'path' => __DIR__ . '/system/Entity/Entity.php',
828-
];
829809
$ignoreErrors[] = [
830810
'message' => '#^Method CodeIgniter\\\\Events\\\\Events\\:\\:on\\(\\) has parameter \\$callback with no signature specified for callable\\.$#',
831811
'count' => 1,

system/Encryption/Handlers/SodiumHandler.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,8 @@ public function decrypt($data, $params = null)
112112
*
113113
* @param array|string|null $params
114114
*
115+
* @return void
116+
*
115117
* @throws EncryptionException If key is empty
116118
*/
117119
protected function parseParams($params)

system/Entity/Entity.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,16 @@ class Entity implements JsonSerializable
4545
* $datamap = [
4646
* 'class_property_name' => 'db_column_name'
4747
* ];
48+
*
49+
* @var array<string, string>
4850
*/
4951
protected $datamap = [];
5052

53+
/**
54+
* The date fields.
55+
*
56+
* @var array<string>
57+
*/
5158
protected $dates = [
5259
'created_at',
5360
'updated_at',
@@ -57,6 +64,8 @@ class Entity implements JsonSerializable
5764
/**
5865
* Array of field names and the type of value to cast them as when
5966
* they are accessed.
67+
*
68+
* @var array<string, string>
6069
*/
6170
protected $casts = [];
6271

0 commit comments

Comments
 (0)