- Usunięty błędny guard w summaryView() blokujący kolejne zamówienia - Token zamówienia z jednorazowego na TTL 30 min (multi-tab safe) - Logowanie błędów zamówień do logs/logs-order-YYYY-MM-DD.log - Redirect przy złym tokenie na /koszyk-podsumowanie zamiast /koszyk - Double-submit guard przeniesiony przed sprawdzenie tokena Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
9.5 KiB
9.5 KiB
- Dodać uwierzytelnienie dwuskładnikowe za pomocą aplikacji.
- Dodać zarządzanie uprawnieniami na poziomie urzytkownika, na razie uprawnienia do poszczególnych modułów. naprawić działanie newslettera i zapis do bazy newslettera program lojalnościowy proponowane produkty w koszyku Do zamówień w statusie: realizowane lub oczekuje na wpłatę. Opcja tylko dla zarejestrowanych klientów. https://royal-stone.pl/pl/order1.html Dodać możliwość ustawienia limitu znaków w wiadomościach do produktu
- [] Przerobić analitykę Google Analytics i Google ADS
- Rozważyć integrację SonarQube (statyczna analiza kodu PHP — bugi, security, code smells). Community Edition darmowy, self-hosted. Wymaga serwera + MCP server w Claude Code.
SonarQube — 0.340 (2026-03-15)
Bugs
- [MAJOR] cron.php:192 — Review the data-flow - use of uninitialized value (php:S836)
- [MAJOR] cron.php:561 — Review the data-flow - use of uninitialized value (php:S836)
- [MAJOR] cron.php:590 — Review the data-flow - use of uninitialized value (php:S836)
- [MAJOR] cron.php:643 — Review the data-flow - use of uninitialized value (php:S836)
Code Smells — CRITICAL
- [CRITICAL] autoload/Domain/Integrations/ApiloRepository.php:35 — Add curly braces around nested statement(s) (php:S121)
- [CRITICAL] autoload/Domain/Integrations/ApiloRepository.php:66 — Define a constant instead of duplicating "Accept: application/json" 5 times (php:S1192)
- [CRITICAL] autoload/Domain/Integrations/ApiloRepository.php:77 — Add curly braces around nested statement(s) (php:S121)
- [CRITICAL] autoload/Domain/Integrations/ApiloRepository.php:159 — Define a constant instead of duplicating "Y-m-d H:i:s" 3 times (php:S1192)
- [CRITICAL] autoload/Domain/Integrations/ApiloRepository.php:239 — Add curly braces around nested statement(s) (php:S121)
- [CRITICAL] autoload/Domain/Integrations/ApiloRepository.php:309 — Add curly braces around nested statement(s) (php:S121)
- [CRITICAL] autoload/Domain/Integrations/ApiloRepository.php:315 — Add curly braces around nested statement(s) (php:S121)
- [CRITICAL] autoload/Domain/Integrations/ApiloRepository.php:339 — Define a constant instead of duplicating "Authorization: Bearer " 3 times (php:S1192)
- [CRITICAL] autoload/Domain/Integrations/ApiloRepository.php:359 — Add curly braces around nested statement(s) (php:S121)
- [CRITICAL] autoload/Domain/Integrations/ApiloRepository.php:400 — Refactor this function to reduce its Cognitive Complexity (php:S3776)
- [CRITICAL] autoload/front/Controllers/ShopBasketController.php:499 — Add curly braces around nested statement(s) (php:S121)
- [CRITICAL] autoload/front/Controllers/ShopBasketController.php:502 — Add curly braces around nested statement(s) (php:S121)
- [CRITICAL] autoload/api/Controllers/ProductsApiController.php:396 — Refactor this function to reduce its Cognitive Complexity from 83 to 15 (php:S3776)
- [CRITICAL] autoload/Shared/Helpers/Helpers.php:408 — Refactor this function to reduce its Cognitive Complexity from 165 to 15 (php:S3776)
- [CRITICAL] autoload/Shared/Helpers/Helpers.php:520 — Define a constant instead of duplicating "/([0-9]+)$" 3 times (php:S1192)
- [CRITICAL] autoload/Shared/Helpers/Helpers.php:607 — Define a constant instead of duplicating " Order Deny,Allow" 3 times (php:S1192)
- [CRITICAL] autoload/Shared/Helpers/Helpers.php:650 — Define a constant instead of duplicating "&lang=" 7 times (php:S1192)
- [CRITICAL] cron.php:200 — Define a constant instead of duplicating "Y-m-d H:i:s" 7 times (php:S1192)
- [CRITICAL] cron.php:200 — Add curly braces around nested statement(s) (php:S121)
- [CRITICAL] cron.php:203 — Add curly braces around nested statement(s) (php:S121)
- [CRITICAL] cron.php:418 — Define a constant instead of duplicating "Authorization: Bearer " 5 times (php:S1192)
- [CRITICAL] cron.php:419 — Define a constant instead of duplicating "Accept: application/json" 5 times (php:S1192)
- [CRITICAL] cron.php:526 — Add curly braces around nested statement(s) (php:S121)
- [CRITICAL] cron.php:529 — Add curly braces around nested statement(s) (php:S121)
- [CRITICAL] cron.php:531 — Add curly braces around nested statement(s) (php:S121)
- [CRITICAL] cron.php:533 — Add curly braces around nested statement(s) (php:S121)
- [CRITICAL] cron.php:542 — Add curly braces around nested statement(s) (php:S121)
- [CRITICAL] cron.php:545 — Add curly braces around nested statement(s) (php:S121)
- [CRITICAL] cron.php:547 — Add curly braces around nested statement(s) (php:S121)
- [CRITICAL] cron.php:555 — Add curly braces around nested statement(s) (php:S121)
- [CRITICAL] cron.php:559 — Add curly braces around nested statement(s) (php:S121)
Code Smells — MAJOR
- [MAJOR] autoload/Domain/Integrations/ApiloRepository.php:130 — Method has 4 returns, max 3 allowed (php:S1142)
- [MAJOR] autoload/Domain/Integrations/ApiloRepository.php:233 — Method has 5 returns, max 3 allowed (php:S1142)
- [MAJOR] autoload/Domain/Integrations/ApiloRepository.php:307 — Method has 7 returns, max 3 allowed (php:S1142)
- [MAJOR] autoload/Domain/Integrations/ApiloRepository.php:400 — Method has 8 returns, max 3 allowed (php:S1142)
- [MAJOR] autoload/Domain/Integrations/ApiloRepository.php:449 — Method has 4 returns, max 3 allowed (php:S1142)
- [MAJOR] autoload/Domain/Integrations/ApiloRepository.php:481 — Method has 4 returns, max 3 allowed (php:S1142)
- [MAJOR] autoload/Domain/Integrations/ApiloRepository.php:513 — Method has 4 returns, max 3 allowed (php:S1142)
- [MAJOR] autoload/front/Controllers/ShopBasketController.php:493 — Method has 4 returns, max 3 allowed (php:S1142)
- [MAJOR] autoload/Domain/Order/OrderAdminService.php:673 — Method has 4 returns, max 3 allowed (php:S1142)
- [MAJOR] autoload/Domain/Order/OrderAdminService.php:740 — Method has 4 returns, max 3 allowed (php:S1142)
Code Smells — MINOR
- [MINOR] autoload/Domain/Order/OrderRepository.php — Add a new line at the end of file (php:S113)
- [MINOR] admin/templates/site/unlogged-layout.php — Add a new line at the end of file (php:S113)
- [MINOR] admin/templates/users/user-2fa.php — Add a new line at the end of file (php:S113)
- [MINOR] autoload/admin/Controllers/ProductArchiveController.php:196 — Rename function "bulk_delete_permanent" to match camelCase (php:S100)
- [MINOR] autoload/api/ApiRouter.php:107 — Remove unused "$db" local variable (php:S1481)
- [MINOR] cron.php:198 — Remove unused "$orderAdminService" local variable (php:S1481)
- [MINOR] cron.php:524 — Remove unused "$mdb" local variable (php:S1481)
- [MINOR] cron.php:539 — Remove unused "$mdb" local variable (php:S1481)
SonarQube — 0.343 (2026-03-19)
Nowe issues (nie występowały w 0.340)
Code Smells — CRITICAL
- [CRITICAL] autoload/admin/App.php:39 — Cognitive Complexity 37 (max 15) (php:S3776)
- [CRITICAL] autoload/admin/App.php:50 — Duplicated literal "Location: /admin/" 8 times (php:S1192)
- [CRITICAL] autoload/front/Controllers/ShopOrderController.php:86 — Cognitive Complexity 22 (max 15) (php:S3776)
- [CRITICAL] autoload/front/Controllers/ShopBasketController.php:275 — Duplicated literal "Location: /koszyk" 6 times (php:S1192)
- [CRITICAL] autoload/front/Controllers/ShopBasketController.php:287 — Duplicated literal "Location: /zamowienie/" 3 times (php:S1192)
- [CRITICAL] autoload/front/Controllers/ShopBasketController.php:495 — Add curly braces around nested statement(s) (php:S121)
- [CRITICAL] autoload/Domain/Integrations/IntegrationsRepository.php:33 — Add curly braces around nested statement(s) (php:S121)
- [CRITICAL] autoload/Domain/Integrations/ApiloRepository.php:449 — Cognitive Complexity 22 (max 15) (php:S3776)
- [CRITICAL] autoload/Domain/Order/OrderRepository.php:635 — Cognitive Complexity 61 (max 15) (php:S3776)
- [CRITICAL] cron.php:198 — Cognitive Complexity 109 (max 15) (php:S3776)
- [CRITICAL] cron.php:651 — Cognitive Complexity 18 (max 15) (php:S3776)
Code Smells — MAJOR
- [MAJOR] cron.php:198 — Function has 305 lines (max 150) (php:S138)
- [MAJOR] cron.php:572 — Unused function parameter "$payload" (php:S1172)
- [MAJOR] cron.php:572 — 5 returns (max 3) (php:S1142)
- [MAJOR] cron.php:605 — Unused function parameter "$payload" (php:S1172)
- [MAJOR] cron.php:605 — 4 returns (max 3) (php:S1142)
- [MAJOR] cron.php:651 — Unused function parameter "$payload" (php:S1172)
- [MAJOR] autoload/Domain/Integrations/ApiloRepository.php:53 — 4 returns (max 3) (php:S1142)
- [MAJOR] autoload/Domain/Integrations/ApiloRepository.php:93 — 4 returns (max 3) (php:S1142)
- [MAJOR] autoload/Domain/Integrations/ApiloRepository.php:105 — Merge if statement with enclosing one (php:S1066)
SonarQube — 0.344 (2026-03-19)
- [MINOR] autoload/front/Controllers/ShopBasketController.php:484 — Use empty() to check whether the array is empty (php:S1155)
SonarQube — 0.345 (2026-03-25)
- [MAJOR] autoload/front/Controllers/ShopBasketController.php:574 — This method has 6 returns, which is more than the 3 allowed (php:S1142)
- [CRITICAL] autoload/front/Controllers/ShopBasketController.php:576 — Add curly braces around nested statement(s) (php:S121)
- [CRITICAL] autoload/front/Controllers/ShopBasketController.php:602 — Add curly braces around nested statement(s) (php:S121)