diff --git a/example/includes/core.php b/example/includes/core.php index f00b7f5..9940b31 100644 --- a/example/includes/core.php +++ b/example/includes/core.php @@ -9,7 +9,7 @@ error_reporting(E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED); // Root directory path $script = null; -if (defined('__FILE__') && constant('__FILE__')) { +if (defined('__FILE__') && constant('__FILE__')) { // @phpstan-ignore-line $script = __FILE__; } else { diff --git a/skel/includes/core.php b/skel/includes/core.php index f3f9420..7108884 100644 --- a/skel/includes/core.php +++ b/skel/includes/core.php @@ -8,7 +8,7 @@ error_reporting(E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED); // Root directory path $script = null; -if (defined('__FILE__') && constant('__FILE__')) { +if (defined('__FILE__') && constant('__FILE__')) { // @phpstan-ignore-line $script = __FILE__; } else { diff --git a/src/HookEvent.php b/src/HookEvent.php index e819b5e..cd03003 100644 --- a/src/HookEvent.php +++ b/src/HookEvent.php @@ -23,6 +23,11 @@ class HookEvent implements JsonSerializable { return null; } + /** + * Return data to serialize a HookEvent object as JSON + * @return array + */ + #[\ReturnTypeWillChange] public function jsonSerialize() { return array ( 'name' => $this -> name, diff --git a/src/Session.php b/src/Session.php index 42036a7..1f08849 100644 --- a/src/Session.php +++ b/src/Session.php @@ -21,6 +21,7 @@ class Session { // In CLI or Phpstan context, do not initialize if ( php_sapi_name() == "cli" + // @phpstan-ignore-next-line || (defined('__PHPSTAN_RUNNING__') && constant('__PHPSTAN_RUNNING__')) ) return;