chore: Remove unused vars in catch (#3839)

This commit is contained in:
Ngô Quốc Đạt 2023-06-21 22:38:24 +07:00 committed by GitHub
parent 0cf2001478
commit b003736d75
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 7 additions and 7 deletions

View File

@ -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;
}

View File

@ -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;

View File

@ -77,7 +77,7 @@ class AvatarValidator extends AbstractValidator
try {
$this->imageManager->make($file->getStream()->getMetadata('uri'));
} catch (NotReadableException $_e) {
} catch (NotReadableException) {
$this->raise('image');
}
}

View File

@ -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);

View File

@ -163,7 +163,7 @@ class SimpleFlarumSearchTest extends TestCase
try {
$this->app()->getContainer()->make(CustomSearcher::class);
} catch (BindingResolutionException $e) {
} catch (BindingResolutionException) {
$anExceptionWasThrown = true;
}

View File

@ -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