Skip to content

Commit 35b1aa9

Browse files
committed
Dev: remove the evnet ignore errors in phpstan-baseline.php
1 parent 06e5089 commit 35b1aa9

2 files changed

Lines changed: 10 additions & 25 deletions

File tree

phpstan-baseline.php

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -901,41 +901,16 @@
901901
'count' => 1,
902902
'path' => __DIR__ . '/system/Entity/Entity.php',
903903
];
904-
$ignoreErrors[] = [
905-
'message' => '#^Method CodeIgniter\\\\Events\\\\Events\\:\\:initialize\\(\\) has no return type specified\\.$#',
906-
'count' => 1,
907-
'path' => __DIR__ . '/system/Events/Events.php',
908-
];
909-
$ignoreErrors[] = [
910-
'message' => '#^Method CodeIgniter\\\\Events\\\\Events\\:\\:on\\(\\) has no return type specified\\.$#',
911-
'count' => 1,
912-
'path' => __DIR__ . '/system/Events/Events.php',
913-
];
914904
$ignoreErrors[] = [
915905
'message' => '#^Method CodeIgniter\\\\Events\\\\Events\\:\\:on\\(\\) has parameter \\$callback with no signature specified for callable\\.$#',
916906
'count' => 1,
917907
'path' => __DIR__ . '/system/Events/Events.php',
918908
];
919-
$ignoreErrors[] = [
920-
'message' => '#^Method CodeIgniter\\\\Events\\\\Events\\:\\:removeAllListeners\\(\\) has no return type specified\\.$#',
921-
'count' => 1,
922-
'path' => __DIR__ . '/system/Events/Events.php',
923-
];
924909
$ignoreErrors[] = [
925910
'message' => '#^Method CodeIgniter\\\\Events\\\\Events\\:\\:removeListener\\(\\) has parameter \\$listener with no signature specified for callable\\.$#',
926911
'count' => 1,
927912
'path' => __DIR__ . '/system/Events/Events.php',
928913
];
929-
$ignoreErrors[] = [
930-
'message' => '#^Method CodeIgniter\\\\Events\\\\Events\\:\\:setFiles\\(\\) has no return type specified\\.$#',
931-
'count' => 1,
932-
'path' => __DIR__ . '/system/Events/Events.php',
933-
];
934-
$ignoreErrors[] = [
935-
'message' => '#^Method CodeIgniter\\\\Events\\\\Events\\:\\:simulate\\(\\) has no return type specified\\.$#',
936-
'count' => 1,
937-
'path' => __DIR__ . '/system/Events/Events.php',
938-
];
939914
$ignoreErrors[] = [
940915
'message' => '#^Method CodeIgniter\\\\Exceptions\\\\CastException\\:\\:forInvalidJsonFormatException\\(\\) has no return type specified\\.$#',
941916
'count' => 1,

system/Events/Events.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@ class Events
6363

6464
/**
6565
* Ensures that we have a events file ready.
66+
*
67+
* @return void
6668
*/
6769
public static function initialize()
6870
{
@@ -108,6 +110,8 @@ public static function initialize()
108110
* @param string $eventName
109111
* @param callable $callback
110112
* @param int $priority
113+
*
114+
* @return void
111115
*/
112116
public static function on($eventName, $callback, $priority = self::PRIORITY_NORMAL)
113117
{
@@ -222,6 +226,8 @@ public static function removeListener($eventName, callable $listener): bool
222226
* removed, otherwise all listeners for all events are removed.
223227
*
224228
* @param string|null $eventName
229+
*
230+
* @return void
225231
*/
226232
public static function removeAllListeners($eventName = null)
227233
{
@@ -234,6 +240,8 @@ public static function removeAllListeners($eventName = null)
234240

235241
/**
236242
* Sets the path to the file that routes are read from.
243+
*
244+
* @return void
237245
*/
238246
public static function setFiles(array $files)
239247
{
@@ -254,6 +262,8 @@ public static function getFiles()
254262
* Turns simulation on or off. When on, events will not be triggered,
255263
* simply logged. Useful during testing when you don't actually want
256264
* the tests to run.
265+
*
266+
* @return void
257267
*/
258268
public static function simulate(bool $choice = true)
259269
{

0 commit comments

Comments
 (0)