From ceafe20ce5cdbf13403f759f7a94ead56460f1d9 Mon Sep 17 00:00:00 2001 From: Rasmus Schultz Date: Sat, 6 Apr 2024 13:39:07 +0200 Subject: [PATCH] stricter inspection --- phpstan.neon | 2 +- src/Container.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/phpstan.neon b/phpstan.neon index d7f8277..c308dcf 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -1,4 +1,4 @@ parameters: - level: 6 + level: 8 paths: - src diff --git a/src/Container.php b/src/Container.php index b8c613b..c55a0ab 100644 --- a/src/Container.php +++ b/src/Container.php @@ -56,7 +56,7 @@ public function get(string $name) ksort($activations, SORT_NUMERIC); // order by activation depth - $activations = array_slice($activations, array_search($name, $activations, true)); + $activations = array_slice($activations, array_search($name, $activations, true) ?: 0); $activations[] = $name;