diff --git a/config/packages/framework.yaml b/config/packages/framework.yaml index 225af856ce81b24d01de883c8f18bbbb96d1ea01..2d26992bbbbc72a18e72167a29a00c2998f46f3a 100644 --- a/config/packages/framework.yaml +++ b/config/packages/framework.yaml @@ -1,5 +1,5 @@ parameters: - app.version: "2.3.0" + app.version: "2.3.1" framework: secret: '%env(APP_SECRET)%' diff --git a/src/Application/Traits/Model/CreatorTrait.php b/src/Application/Traits/Model/CreatorTrait.php index a37a4de431bb5c456e603fd66ef0c8fdd4aec749..0890fbb40747d29115c74477a3ab2b8eca55aff4 100644 --- a/src/Application/Traits/Model/CreatorTrait.php +++ b/src/Application/Traits/Model/CreatorTrait.php @@ -30,9 +30,6 @@ trait CreatorTrait { private ?User $creator = null; - /** - * @return User - */ public function getCreator(): ?User { return $this->creator; diff --git a/src/Domain/AIPD/Controller/AnalyseImpactController.php b/src/Domain/AIPD/Controller/AnalyseImpactController.php index fb87dd80ce6cb1d347b2a880d49142b1ebffb7ec..07ff8e05005bc5c2c248a006c111fb2d1ba5c1bc 100644 --- a/src/Domain/AIPD/Controller/AnalyseImpactController.php +++ b/src/Domain/AIPD/Controller/AnalyseImpactController.php @@ -410,7 +410,7 @@ class AnalyseImpactController extends CRUDController } } } - // dd($object); + return new PdfResponse( $this->pdf->getOutputFromHtml( $this->renderView($this->getTemplatingBasePath('pdf'), [ diff --git a/src/Domain/Maturity/Calculator/Maturity.php b/src/Domain/Maturity/Calculator/Maturity.php index 384e6110b9b36a52d3227ba994ab4f451ced464c..42472d971104b1f07663afccc43305f586bf2c69 100644 --- a/src/Domain/Maturity/Calculator/Maturity.php +++ b/src/Domain/Maturity/Calculator/Maturity.php @@ -95,7 +95,6 @@ class Maturity $removedMaturities = $maturityList; // Update maturityList with new points // If maturity doesn't exists for related domain, create it - // dd($points); foreach ($points as $key => $point) { if (!isset($maturityList[$key])) { $maturityList[$key] = new Model\Maturity(); diff --git a/src/Domain/Maturity/Controller/ReferentielController.php b/src/Domain/Maturity/Controller/ReferentielController.php index 50e7da183d478cd2336163f77b2290f4a2f4c114..d34e1b0d3bbfd05b1cc3a5d9ce32aa486f53baa8 100644 --- a/src/Domain/Maturity/Controller/ReferentielController.php +++ b/src/Domain/Maturity/Controller/ReferentielController.php @@ -425,7 +425,6 @@ class ReferentielController extends CRUDController /** @var Model\Referentiel $object */ $object = $serializer->deserialize($content, Model\Referentiel::class, 'xml'); $object->deserialize(); - // dd($object); // $object->setDomains($domain); $object->setCreatedAt(new \DateTimeImmutable()); diff --git a/src/Domain/Maturity/Controller/SurveyController.php b/src/Domain/Maturity/Controller/SurveyController.php index ec6678a56bb550ca475088db4c6be09299dcb92d..09c1834039169ab8972a9b3809f7888a921b1c55 100644 --- a/src/Domain/Maturity/Controller/SurveyController.php +++ b/src/Domain/Maturity/Controller/SurveyController.php @@ -293,8 +293,6 @@ class SurveyController extends CRUDController $this->entityManager->persist($object); $this->entityManager->flush(); - // dd($object->getAnswerSurveys()); - $this->addFlash('success', $this->getFlashbagMessage('success', 'edit', $object->__toString())); return $this->redirectToRoute($this->getRouteName('list')); diff --git a/src/Domain/Maturity/Repository/Survey.php b/src/Domain/Maturity/Repository/Survey.php index 9bf3ebeeff858b9c137bf543eabd522f533bdf59..2e92bfea3cf5a38b564a2e52b1bd519a9d9e4730 100644 --- a/src/Domain/Maturity/Repository/Survey.php +++ b/src/Domain/Maturity/Repository/Survey.php @@ -57,7 +57,6 @@ interface Survey extends CRUDRepositoryInterface, DataTablesRepository * * @param array $collectivities The array of collectivity to search with * @param array $order Order the data - * @param int $limit * * @return array The array of survey given by the collectivity */ diff --git a/src/Domain/Notification/Command/NotificationsSendCommand.php b/src/Domain/Notification/Command/NotificationsSendCommand.php index 8ab4918917ad69a13d4cd7cd5a54be74af7e4963..343dce0c2be5c7ab46af2baf6bda4211c3066439 100644 --- a/src/Domain/Notification/Command/NotificationsSendCommand.php +++ b/src/Domain/Notification/Command/NotificationsSendCommand.php @@ -213,6 +213,7 @@ class NotificationsSendCommand extends Command return (new \DateTime())->setTime($prefs->getHour(), 0); case EmailNotificationPreference::FREQUENCY_WEEK: $now = new \DateTime(); + // set cutoff date to this week at the specified day and time return (new \DateTime())->setTime($prefs->getHour(), 0)->setISODate($now->format('Y'), $now->format('W'), $prefs->getDay()); case EmailNotificationPreference::FREQUENCY_MONTH: diff --git a/src/Domain/Registry/Form/Type/TreatmentType.php b/src/Domain/Registry/Form/Type/TreatmentType.php index a142df486d6a0a1a90ee5015bcba7de52fd1fb7f..c83f55c89312bb17421fb751988420a8242680e6 100644 --- a/src/Domain/Registry/Form/Type/TreatmentType.php +++ b/src/Domain/Registry/Form/Type/TreatmentType.php @@ -468,7 +468,6 @@ class TreatmentType extends AbstractType $qb ->orderBy('s.name', 'ASC'); - // dd($qb); return $qb; } diff --git a/src/Domain/Reporting/Generator/Csv/TreatmentGenerator.php b/src/Domain/Reporting/Generator/Csv/TreatmentGenerator.php index a44201dafdf312d4f87ab7144e9b8e77c414110a..52b336286ba39673563f2d2d7e2262e9dbb00999 100644 --- a/src/Domain/Reporting/Generator/Csv/TreatmentGenerator.php +++ b/src/Domain/Reporting/Generator/Csv/TreatmentGenerator.php @@ -116,7 +116,7 @@ class TreatmentGenerator extends AbstractGenerator ); array_push($data, $extract); } - // dd($data); + return $data; } diff --git a/src/Domain/User/Controller/SecurityController.php b/src/Domain/User/Controller/SecurityController.php index 14ef60e60be6413634d39331e8535209a5291eca..bce0bf32edeac1174f38748a16eb4c735abe59b1 100644 --- a/src/Domain/User/Controller/SecurityController.php +++ b/src/Domain/User/Controller/SecurityController.php @@ -32,7 +32,6 @@ use App\Domain\User\Form\Type\ResetPasswordType; use App\Domain\User\Model\User; use App\Domain\User\Repository; use Doctrine\ORM\EntityManagerInterface; -use Exception; use KnpU\OAuth2ClientBundle\Client\ClientRegistry; use KnpU\OAuth2ClientBundle\Client\OAuth2Client; use League\OAuth2\Client\Provider\Exception\IdentityProviderException; @@ -113,7 +112,7 @@ class SecurityController extends AbstractController $oauthServiceName = $request->get('service'); try { $client = $clientRegistry->getClient($oauthServiceName); - } catch (Exception) { + } catch (\Exception) { return $this->_handleSsoClientError(); } @@ -138,7 +137,7 @@ class SecurityController extends AbstractController $sso_key_field = $this->sso_key_field; try { $sso_value = $userOAuthData[$sso_key_field]; - } catch (Exception) { + } catch (\Exception) { $logger->error('SSO field "' . $sso_key_field . '" not found.'); $logger->info('Data returned by SSO: ' . json_encode($userOAuthData)); diff --git a/src/Domain/User/Model/Collectivity.php b/src/Domain/User/Model/Collectivity.php index f440f18d34a1e79e15c4e0f2ba8ffce73b32f64a..72967771debd2b83ea116243d662917c66e41fe9 100644 --- a/src/Domain/User/Model/Collectivity.php +++ b/src/Domain/User/Model/Collectivity.php @@ -502,9 +502,6 @@ class Collectivity implements LoggableSubject $modeleAnalyse->addAuthorizedCollectivity($this); } - /** - * @return bool - */ public function isHasModuleConformiteTraitement(): ?bool { return $this->hasModuleConformiteTraitement; diff --git a/src/Domain/User/Model/User.php b/src/Domain/User/Model/User.php index 5347dbeae66cc904fe016e01d436716f0922a415..a69e5705591c2bb2b6b4c7bda65244684e4a2281 100644 --- a/src/Domain/User/Model/User.php +++ b/src/Domain/User/Model/User.php @@ -426,17 +426,11 @@ class User implements LoggableSubject, UserInterface, CollectivityRelated, Passw $this->ssoKey = $ssoKey; } - /** - * @return bool - */ public function isNotGeneratesNotifications(): ?bool { return $this->notGeneratesNotifications; } - /** - * @param bool $notGeneratesNotifications - */ public function setNotGeneratesNotifications(?bool $notGeneratesNotifications): void { $this->notGeneratesNotifications = $notGeneratesNotifications; diff --git a/src/Infrastructure/ORM/Registry/Repository/Treatment.php b/src/Infrastructure/ORM/Registry/Repository/Treatment.php index e65e4109a89c7b5abef754f4e41f5b0872f64c1e..3e21afd5fce2da73c3ef25d69e349512584620e3 100644 --- a/src/Infrastructure/ORM/Registry/Repository/Treatment.php +++ b/src/Infrastructure/ORM/Registry/Repository/Treatment.php @@ -444,8 +444,6 @@ class Treatment extends CRUDRepository implements Repository\Treatment ->setParameter('sensitiveDatas', 1) ->groupBy('o.id') ; - - // dd($queryBuilder->getQuery()->getSQL()); } break; diff --git a/src/Oauth2Provider/Keycloak/Keycloak.php b/src/Oauth2Provider/Keycloak/Keycloak.php index 327fe3093de95588f6831bc2aa81f16da3311161..e5dbe62e3196ac61a5128c56f4330f3d902d865a 100644 --- a/src/Oauth2Provider/Keycloak/Keycloak.php +++ b/src/Oauth2Provider/Keycloak/Keycloak.php @@ -3,7 +3,6 @@ namespace App\Oauth2Provider\Keycloak; use App\Oauth2Provider\Keycloak\Exception\EncryptionConfigurationException; -use Exception; use Firebase\JWT\JWT; use Firebase\JWT\Key; use League\OAuth2\Client\Provider\AbstractProvider; @@ -262,7 +261,7 @@ class Keycloak extends AbstractProvider { try { $this->encryptionKey = file_get_contents($encryptionKeyPath); - } catch (Exception) { + } catch (\Exception) { // Not sure how to handle this yet. }