mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-07-25 05:14:36 +02:00
Applied rector suggestions
This commit is contained in:
parent
4106bcef5f
commit
20f32c7f12
170 changed files with 808 additions and 761 deletions
|
@ -51,7 +51,7 @@ class InfoProviderExtension extends AbstractExtension
|
|||
{
|
||||
try {
|
||||
return $this->providerRegistry->getProviderByKey($key);
|
||||
} catch (\InvalidArgumentException $exception) {
|
||||
} catch (\InvalidArgumentException) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
@ -65,7 +65,7 @@ class InfoProviderExtension extends AbstractExtension
|
|||
{
|
||||
try {
|
||||
return $this->providerRegistry->getProviderByKey($key)->getProviderInfo()['name'];
|
||||
} catch (\InvalidArgumentException $exception) {
|
||||
} catch (\InvalidArgumentException) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -42,7 +42,7 @@ final class TwigCoreExtension extends AbstractExtension
|
|||
{
|
||||
return [
|
||||
/* Returns the enum cases as values */
|
||||
new TwigFunction('enum_cases', [$this, 'getEnumCases']),
|
||||
new TwigFunction('enum_cases', $this->getEnumCases(...)),
|
||||
];
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue