From 0ee7494f6a373080f6ca57c738878ec8cff3f89d Mon Sep 17 00:00:00 2001 From: Laurent Calvet Date: Tue, 28 Jan 2020 22:45:16 +0100 Subject: [PATCH] Fix PSR2 and phpstan error (level 7) #2 --- src/Centreon/Domain/Option/OptionService.php | 2 +- src/Centreon/Infrastructure/Option/OptionRepositoryRDB.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Centreon/Domain/Option/OptionService.php b/src/Centreon/Domain/Option/OptionService.php index 2d52eff0dbd..1c94ebcad80 100644 --- a/src/Centreon/Domain/Option/OptionService.php +++ b/src/Centreon/Domain/Option/OptionService.php @@ -39,7 +39,7 @@ class OptionService implements OptionServiceInterface /** * @param OptionRepositoryInterface $repository */ - public function __construct (OptionRepositoryInterface $repository) + public function __construct(OptionRepositoryInterface $repository) { $this->repository = $repository; } diff --git a/src/Centreon/Infrastructure/Option/OptionRepositoryRDB.php b/src/Centreon/Infrastructure/Option/OptionRepositoryRDB.php index 90e15b80f74..952d657b575 100644 --- a/src/Centreon/Infrastructure/Option/OptionRepositoryRDB.php +++ b/src/Centreon/Infrastructure/Option/OptionRepositoryRDB.php @@ -36,7 +36,7 @@ class OptionRepositoryRDB extends AbstractRepositoryDRB implements OptionReposit /** * @param DatabaseConnection $db */ - public function __construct (DatabaseConnection $db) + public function __construct(DatabaseConnection $db) { $this->db = $db; } @@ -57,7 +57,7 @@ public function findSelectedOptions(array $optionsToFind): array $optionsFound = []; while (false !== ($option = $statement->fetch(\PDO::FETCH_ASSOC))) { - $optionsFound[$option['key']] = $option['value']; + $optionsFound[(string) $option['key']] = (string) $option['value']; } return $optionsFound; }