mirror of
https://github.com/flarum/framework.git
synced 2024-11-23 01:51:05 +08:00
chore: Remove unused vars in catch (#3839)
This commit is contained in:
parent
0cf2001478
commit
b003736d75
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -77,7 +77,7 @@ class AvatarValidator extends AbstractValidator
|
|||
|
||||
try {
|
||||
$this->imageManager->make($file->getStream()->getMetadata('uri'));
|
||||
} catch (NotReadableException $_e) {
|
||||
} catch (NotReadableException) {
|
||||
$this->raise('image');
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -163,7 +163,7 @@ class SimpleFlarumSearchTest extends TestCase
|
|||
|
||||
try {
|
||||
$this->app()->getContainer()->make(CustomSearcher::class);
|
||||
} catch (BindingResolutionException $e) {
|
||||
} catch (BindingResolutionException) {
|
||||
$anExceptionWasThrown = true;
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user