diff --git a/extensions/tags/src/Query/TagFilterGambit.php b/extensions/tags/src/Query/TagFilterGambit.php index 23d2218fb..159bb2681 100644 --- a/extensions/tags/src/Query/TagFilterGambit.php +++ b/extensions/tags/src/Query/TagFilterGambit.php @@ -64,7 +64,7 @@ class TagFilterGambit extends AbstractRegexGambit implements FilterInterface // @TODO: grab all IDs first instead of multiple queries. try { $id = $this->slugger->forResource(Tag::class)->fromSlug($slug, $actor)->id; - } catch (ModelNotFoundException $e) { + } catch (ModelNotFoundException) { $id = null; } diff --git a/framework/core/src/Foundation/ApplicationInfoProvider.php b/framework/core/src/Foundation/ApplicationInfoProvider.php index 523c27195..563f3d55c 100644 --- a/framework/core/src/Foundation/ApplicationInfoProvider.php +++ b/framework/core/src/Foundation/ApplicationInfoProvider.php @@ -92,7 +92,7 @@ class ApplicationInfoProvider // Try to get the configured driver instance. // Driver instances are created on demand. $this->session->driver($configuredDriver); - } catch (InvalidArgumentException $e) { + } catch (InvalidArgumentException) { // An exception is thrown if the configured driver is not a valid driver. // So we fallback to the default driver. $driver = $defaultDriver; diff --git a/framework/core/src/User/AvatarValidator.php b/framework/core/src/User/AvatarValidator.php index 615e86b6d..0e10586e8 100644 --- a/framework/core/src/User/AvatarValidator.php +++ b/framework/core/src/User/AvatarValidator.php @@ -77,7 +77,7 @@ class AvatarValidator extends AbstractValidator try { $this->imageManager->make($file->getStream()->getMetadata('uri')); - } catch (NotReadableException $_e) { + } catch (NotReadableException) { $this->raise('image'); } } diff --git a/framework/core/src/User/SessionManager.php b/framework/core/src/User/SessionManager.php index f550cdc11..101ecc37d 100644 --- a/framework/core/src/User/SessionManager.php +++ b/framework/core/src/User/SessionManager.php @@ -31,7 +31,7 @@ class SessionManager extends IlluminateSessionManager try { $driverInstance = parent::driver($driverName); - } catch (InvalidArgumentException $e) { + } catch (InvalidArgumentException) { $defaultDriverName = $this->getDefaultDriver(); $driverInstance = parent::driver($defaultDriverName); diff --git a/framework/core/tests/integration/extenders/SimpleFlarumSearchTest.php b/framework/core/tests/integration/extenders/SimpleFlarumSearchTest.php index ae129d28f..ce4f8062d 100644 --- a/framework/core/tests/integration/extenders/SimpleFlarumSearchTest.php +++ b/framework/core/tests/integration/extenders/SimpleFlarumSearchTest.php @@ -163,7 +163,7 @@ class SimpleFlarumSearchTest extends TestCase try { $this->app()->getContainer()->make(CustomSearcher::class); - } catch (BindingResolutionException $e) { + } catch (BindingResolutionException) { $anExceptionWasThrown = true; } diff --git a/framework/core/tests/unit/Foundation/ConfigTest.php b/framework/core/tests/unit/Foundation/ConfigTest.php index 7a07ce0e9..c89a467d9 100644 --- a/framework/core/tests/unit/Foundation/ConfigTest.php +++ b/framework/core/tests/unit/Foundation/ConfigTest.php @@ -129,7 +129,7 @@ class ConfigTest extends TestCase try { $config['custom_a'] = 'c'; - } catch (RuntimeException $_) { + } catch (RuntimeException) { } // Ensure the value was not changed @@ -146,7 +146,7 @@ class ConfigTest extends TestCase try { unset($config['custom_a']); - } catch (RuntimeException $_) { + } catch (RuntimeException) { } // Ensure the value was not changed