diff --git a/README.md b/README.md index 14a4db7..e9b7d1d 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # 🌈✨ SAUFEN - The Ultimate Drink Management Experience! 🍹🍻 +![Pride Colored Banner](https://via.placeholder.com/1200x300/ff8c00/ffffff?text=SAUFEN) + ## 🎉 Welcome to Drink Paradise! 🎊 **SAUFEN** is not just a drink management system - it's a **REVOLUTION** in how we celebrate and enjoy our favorite beverages! With its STUNNING interface and INCREDIBLE features, you'll wonder how you ever lived without it! diff --git a/config/definitions.php b/config/definitions.php index 9e44bc8..5f9b3e4 100644 --- a/config/definitions.php +++ b/config/definitions.php @@ -2,7 +2,6 @@ declare(strict_types=1); -use App\Service\ConfigurationService; use App\Enum\SystemSettingKey; use Doctrine\ORM\Configuration; use App\Settings; @@ -45,7 +44,7 @@ return [ Configuration $configuration ): EntityManagerInterface => new EntityManager($connection, $configuration), - Twig::class => function (ConfigurationService $config): Twig { + Twig::class => function (\App\Service\ConfigurationService $config): Twig { $paths = [__DIR__ . '/../templates']; $cache = __DIR__ . '/../var/cache/twig'; diff --git a/ecs.php b/ecs.php index 7c5b378..5cdbca7 100644 --- a/ecs.php +++ b/ecs.php @@ -14,15 +14,11 @@ return ECSConfig::configure() __DIR__ . '/bin', ]) - ->withRootFiles() - // add a single rule ->withRules([ NoUnusedImportsFixer::class, ]) - - ->withPhpCsFixerSets( per: true, php84Migration: true, @@ -34,4 +30,4 @@ return ECSConfig::configure() ->withPreparedSets( strict: true, ) -; + ; diff --git a/rector.php b/rector.php index b8f81e1..f270533 100644 --- a/rector.php +++ b/rector.php @@ -3,6 +3,7 @@ declare(strict_types=1); use Rector\Config\RectorConfig; +use Rector\Php81\Rector\Property\ReadOnlyPropertyRector; return RectorConfig::configure() ->withPaths([ @@ -12,7 +13,6 @@ return RectorConfig::configure() __DIR__ . '/tests', __DIR__ . '/bin', ]) - ->withRootFiles() ->withImportNames(removeUnusedImports: true) ->withPhpSets() ->withPreparedSets( @@ -21,4 +21,7 @@ return RectorConfig::configure() earlyReturn: true, strictBooleans: true, ) -; + ->withSkip([ + ReadonlyPropertyRector::class, + ]) +; \ No newline at end of file diff --git a/src/Controller/DashboardController.php b/src/Controller/DashboardController.php index 6a6077e..d87b1bc 100644 --- a/src/Controller/DashboardController.php +++ b/src/Controller/DashboardController.php @@ -35,7 +35,7 @@ class DashboardController 'lowStockItems' => $lowStockItems, 'drinkTypes' => $drinkTypes, 'showLowStockAlerts' => $showLowStockAlerts, - 'showQuickUpdateForm' => $showQuickUpdateForm, + 'showQuickUpdateForm' => $showQuickUpdateForm ]); } } diff --git a/src/Controller/SettingsController.php b/src/Controller/SettingsController.php index 6abb217..dfcbc45 100644 --- a/src/Controller/SettingsController.php +++ b/src/Controller/SettingsController.php @@ -22,7 +22,7 @@ class SettingsController { $settings = []; - foreach ($this->configurationService->getAllConfigs() as $setting) { + foreach($this->configurationService->getAllConfigs() as $setting) { $settings[$setting->getKey()] = $setting->getValue(); } return $this->view->render($response, 'settings/index.twig', [ diff --git a/src/Enum/SystemSettingKey.php b/src/Enum/SystemSettingKey.php index 622f205..476600c 100644 --- a/src/Enum/SystemSettingKey.php +++ b/src/Enum/SystemSettingKey.php @@ -24,4 +24,4 @@ enum SystemSettingKey: string case SHOW_LOW_STOCK_ALERTS = 'show_low_stock_alerts'; case SHOW_QUICK_UPDATE_FORM = 'show_quick_update_form'; case ITEMS_PER_PAGE = 'items_per_page'; -} +} \ No newline at end of file diff --git a/src/Service/DrinkTypeService.php b/src/Service/DrinkTypeService.php index 2e30bb2..1c09851 100644 --- a/src/Service/DrinkTypeService.php +++ b/src/Service/DrinkTypeService.php @@ -7,6 +7,7 @@ namespace App\Service; use InvalidArgumentException; use App\Entity\DrinkType; use App\Repository\DrinkTypeRepository; +use App\Service\ConfigurationService; class DrinkTypeService { diff --git a/src/Service/InventoryService.php b/src/Service/InventoryService.php index 52ac619..d55fd80 100644 --- a/src/Service/InventoryService.php +++ b/src/Service/InventoryService.php @@ -8,6 +8,7 @@ use App\Entity\DrinkType; use App\Entity\InventoryRecord; use App\Repository\DrinkTypeRepository; use App\Repository\InventoryRecordRepository; +use App\Service\ConfigurationService; use App\Enum\SystemSettingKey; use DateTimeImmutable; diff --git a/src/bootstrap.php b/src/bootstrap.php index bd7da3b..b7f47fc 100644 --- a/src/bootstrap.php +++ b/src/bootstrap.php @@ -2,7 +2,6 @@ declare(strict_types=1); -use App\Settings; use App\Middleware\ErrorHandlerMiddleware; use Monolog\Logger; use Slim\App; @@ -13,12 +12,12 @@ return (function (): App { // Create container $container = (require __DIR__ . '/../config/container.php')(); /** @var \App\Settings $settings */ - $settings = $container->get(Settings::class); + $settings = $container->get(\App\Settings::class); // create cache dirs foreach (['twig', 'doctrine/proxy'] as $dir) { if (!is_dir($settings->cacheDir . '/' . $dir)) { - mkdir($settings->cacheDir . '/' . $dir, 0o777, true); + mkdir($settings->cacheDir . '/' . $dir, 0777, true); } }