diff --git a/src/Controller/SettingsController.php b/src/Controller/SettingsController.php index 1da8a443..cd317876 100644 --- a/src/Controller/SettingsController.php +++ b/src/Controller/SettingsController.php @@ -23,6 +23,7 @@ declare(strict_types=1); namespace App\Controller; +use Symfony\Component\Form\Extension\Core\Type\SubmitType; use App\Settings\AppSettings; use Jbtronics\SettingsBundle\Form\SettingsFormFactoryInterface; use Jbtronics\SettingsBundle\Manager\SettingsManagerInterface; @@ -49,7 +50,7 @@ class SettingsController extends AbstractController $builder = $this->settingsFormFactory->createSettingsFormBuilder($settings); //Add a submit button to the form - $builder->add('submit', \Symfony\Component\Form\Extension\Core\Type\SubmitType::class, ['label' => 'save']); + $builder->add('submit', SubmitType::class, ['label' => 'save']); //Create the form $form = $builder->getForm(); diff --git a/src/Services/InfoProviderSystem/ExistingPartFinder.php b/src/Services/InfoProviderSystem/ExistingPartFinder.php index 762c1517..614ca105 100644 --- a/src/Services/InfoProviderSystem/ExistingPartFinder.php +++ b/src/Services/InfoProviderSystem/ExistingPartFinder.php @@ -1,5 +1,7 @@ getQuery()->getResult(); } -} \ No newline at end of file +} diff --git a/src/Twig/MiscExtension.php b/src/Twig/MiscExtension.php index 3f78a857..8b6ebc68 100644 --- a/src/Twig/MiscExtension.php +++ b/src/Twig/MiscExtension.php @@ -22,6 +22,7 @@ declare(strict_types=1); */ namespace App\Twig; +use App\Settings\SettingsIcon; use Symfony\Component\HttpFoundation\Request; use App\Services\LogSystem\EventCommentType; use Jbtronics\SettingsBundle\Proxy\SettingsProxyInterface; @@ -71,7 +72,7 @@ final class MiscExtension extends AbstractExtension $reflection = new ReflectionClass($objectOrClass); - $attribute = $reflection->getAttributes(\App\Settings\SettingsIcon::class)[0] ?? null; + $attribute = $reflection->getAttributes(SettingsIcon::class)[0] ?? null; return $attribute?->newInstance()->icon; } diff --git a/tests/Exceptions/TwigModeExceptionTest.php b/tests/Exceptions/TwigModeExceptionTest.php index c5a8ef94..686a87a2 100644 --- a/tests/Exceptions/TwigModeExceptionTest.php +++ b/tests/Exceptions/TwigModeExceptionTest.php @@ -1,4 +1,7 @@ . */ - namespace App\Tests\Exceptions; use App\Exceptions\TwigModeException; diff --git a/tests/Helpers/IPAnonymizerTest.php b/tests/Helpers/IPAnonymizerTest.php index 40030ea7..66439e90 100644 --- a/tests/Helpers/IPAnonymizerTest.php +++ b/tests/Helpers/IPAnonymizerTest.php @@ -1,4 +1,7 @@ . */ - namespace App\Tests\Helpers; use App\Helpers\IPAnonymizer; diff --git a/tests/Repository/LogEntryRepositoryTest.php b/tests/Repository/LogEntryRepositoryTest.php index c2329bc7..fc31faf5 100644 --- a/tests/Repository/LogEntryRepositoryTest.php +++ b/tests/Repository/LogEntryRepositoryTest.php @@ -1,4 +1,7 @@ . */ - namespace App\Tests\Repository; use App\Entity\LogSystem\AbstractLogEntry; diff --git a/tests/Services/LabelSystem/BarcodeScanner/EIGP114BarcodeScanResultTest.php b/tests/Services/LabelSystem/BarcodeScanner/EIGP114BarcodeScanResultTest.php index aa5e4fbc..d0ad8572 100644 --- a/tests/Services/LabelSystem/BarcodeScanner/EIGP114BarcodeScanResultTest.php +++ b/tests/Services/LabelSystem/BarcodeScanner/EIGP114BarcodeScanResultTest.php @@ -1,4 +1,7 @@ . */ - namespace App\Tests\Services\LabelSystem\BarcodeScanner; use App\Services\LabelSystem\BarcodeScanner\EIGP114BarcodeScanResult; diff --git a/tests/Services/LogSystem/TimeTravelTest.php b/tests/Services/LogSystem/TimeTravelTest.php index f8e9c088..f353cc12 100644 --- a/tests/Services/LogSystem/TimeTravelTest.php +++ b/tests/Services/LogSystem/TimeTravelTest.php @@ -1,4 +1,7 @@ . */ - namespace App\Tests\Services\LogSystem; use App\Entity\LogSystem\ElementEditedLogEntry; diff --git a/tests/SettingsTestHelper.php b/tests/SettingsTestHelper.php index 30b8a110..6124a39e 100644 --- a/tests/SettingsTestHelper.php +++ b/tests/SettingsTestHelper.php @@ -22,6 +22,8 @@ declare(strict_types=1); namespace App\Tests; +use Jbtronics\SettingsBundle\Settings\Settings; +use Jbtronics\SettingsBundle\Settings\ResettableSettingsInterface; use InvalidArgumentException; use ReflectionClass; @@ -41,14 +43,14 @@ class SettingsTestHelper $reflection = new ReflectionClass($class); //Check if it is a settings class (has a Settings attribute) - if ($reflection->getAttributes(\Jbtronics\SettingsBundle\Settings\Settings::class) === []) { + if ($reflection->getAttributes(Settings::class) === []) { throw new InvalidArgumentException("The class $class is not a settings class!"); } $object = $reflection->newInstanceWithoutConstructor(); //If the object has some initialization logic, then call it - if ($object instanceof \Jbtronics\SettingsBundle\Settings\ResettableSettingsInterface) { + if ($object instanceof ResettableSettingsInterface) { $object->resetToDefaultValues(); }