diff --git a/src/app/configuration/controllers/ConfigurationController.php b/src/app/configuration/controllers/ConfigurationController.php
index 1d76b6e78c46f492c37ddbc3f0dafe9978d65683..4ab7b2a3c5992fe2e66e111c7b866dd3d390e65a 100755
--- a/src/app/configuration/controllers/ConfigurationController.php
+++ b/src/app/configuration/controllers/ConfigurationController.php
@@ -30,7 +30,7 @@ class ConfigurationController
         }
 
         $configuration = ConfigurationModel::getByService(['service' => $aArgs['service']]);
-        $configuration['value'] = (array)json_decode($configuration['value']);
+        $configuration['value'] = json_decode($configuration['value'], true);
         if (!empty($configuration['value']['password'])) {
             $configuration['value']['password'] = '';
             $configuration['value']['passwordAlreadyExists'] = true;
@@ -56,7 +56,7 @@ class ConfigurationController
         if ($aArgs['service'] == 'admin_email_server') {
             if ($data['auth'] && empty($data['password'])) {
                 $configuration = ConfigurationModel::getByService(['service' => $aArgs['service']]);
-                $configuration['value'] = (array)json_decode($configuration['value']);
+                $configuration['value'] = json_decode($configuration['value'], true);
                 if (!empty($configuration['value']['password'])) {
                     $data['password'] = $configuration['value']['password'];
                 }
diff --git a/src/app/email/controllers/EmailController.php b/src/app/email/controllers/EmailController.php
index a093f043838a14e9fdd088133baff0d8d2d00766..2989c2056ec7e693d8dda2f4c879d58e016ccbe1 100644
--- a/src/app/email/controllers/EmailController.php
+++ b/src/app/email/controllers/EmailController.php
@@ -527,7 +527,7 @@ class EmailController
         ValidatorModel::intVal($args, ['emailId', 'userId']);
 
         $email = EmailModel::getById(['id' => $args['emailId']]);
-        $email['sender']        = (array)json_decode($email['sender']);
+        $email['sender']        = json_decode($email['sender'], true);
         $email['recipients']    = array_unique(json_decode($email['recipients']));
         $email['cc']            = array_unique(json_decode($email['cc']));
         $email['cci']           = array_unique(json_decode($email['cci']));
@@ -544,7 +544,7 @@ class EmailController
         }
 
         $configuration = ConfigurationModel::getByService(['service' => 'admin_email_server', 'select' => ['value']]);
-        $configuration = (array)json_decode($configuration['value']);
+        $configuration = json_decode($configuration['value'], true);
         if (empty($configuration)) {
             return ['errors' => 'Configuration is missing'];
         }
diff --git a/src/app/external/messageExchange/controllers/SendMessageExchangeController.php b/src/app/external/messageExchange/controllers/SendMessageExchangeController.php
index 7552c77fdf02e1e097160ecf385fa0b1f1142e90..00971c4b45bdf037363abfed057ad6988089970e 100755
--- a/src/app/external/messageExchange/controllers/SendMessageExchangeController.php
+++ b/src/app/external/messageExchange/controllers/SendMessageExchangeController.php
@@ -473,7 +473,7 @@ class SendMessageExchangeController
     {
         $archivalAgencyObject                    = new \stdClass();
         $archivalAgencyObject->Identifier        = new \stdClass();
-        $externalId = (array)json_decode($aArgs['ArchivalAgency']['ContactInformations']['external_id']);
+        $externalId = json_decode($aArgs['ArchivalAgency']['ContactInformations']['external_id'], true);
         $archivalAgencyObject->Identifier->value = $externalId['m2m'];
 
         $archivalAgencyObject->OrganizationDescriptiveMetadata       = new \stdClass();
diff --git a/src/app/resource/controllers/ExportController.php b/src/app/resource/controllers/ExportController.php
index 79020c633fca8407755ba6eecbf5010d30142acc..44f440317b9ffb54015f68997c6b9a39263c8d9a 100644
--- a/src/app/resource/controllers/ExportController.php
+++ b/src/app/resource/controllers/ExportController.php
@@ -49,9 +49,9 @@ class ExportController
         $templates = ['pdf' => ['data' => []], 'csv' => ['data' => []]];
         foreach ($rawTemplates as $rawTemplate) {
             if ($rawTemplate['format'] == 'pdf') {
-                $templates['pdf'] = ['data' => (array)json_decode($rawTemplate['data'])];
+                $templates['pdf'] = ['data' => json_decode($rawTemplate['data'], true)];
             } elseif ($rawTemplate['format'] == 'csv') {
-                $templates['csv'] = ['delimiter' => $rawTemplate['delimiter'], 'data' => (array)json_decode($rawTemplate['data'])];
+                $templates['csv'] = ['delimiter' => $rawTemplate['delimiter'], 'data' => json_decode($rawTemplate['data'], true)];
             }
         }
 
@@ -290,7 +290,7 @@ class ExportController
                 }
             }
 
-            foreach($csvContent as $key => $value) {
+            foreach ($csvContent as $key => $value) {
                 $csvContent[$key] = utf8_decode($value);
             }
             fputcsv($file, $csvContent, $delimiter);
@@ -354,7 +354,7 @@ class ExportController
                         $content[] = str_replace('rest/', "apps/maarch_entreprise/index.php?page=details&dir=indexing_searching&id={$resource['res_id']}", \Url::coreurl());
                     } elseif ($value['value'] == 'getParentFolder') {
                         $content[] = ExportController::getParentFolderLabel(['res_id' => $resource['res_id']]);
-                    }  elseif ($value['value'] == 'getFolder') {
+                    } elseif ($value['value'] == 'getFolder') {
                         $content[] = ExportController::getFolderLabel(['res_id' => $resource['res_id']]);
                     } elseif ($value['value'] == 'getCategory') {
                         $content[] = ResModel::getCategoryLabel(['categoryId' => $resource['category_id']]);
diff --git a/src/app/shipping/controllers/ShippingTemplateController.php b/src/app/shipping/controllers/ShippingTemplateController.php
index 73fb94e99400f9c207e07474c826d011caf8e978..0d6b2af6a8f9b3b7b954a7e91dd64ff690b25c88 100755
--- a/src/app/shipping/controllers/ShippingTemplateController.php
+++ b/src/app/shipping/controllers/ShippingTemplateController.php
@@ -50,11 +50,11 @@ class ShippingTemplateController
             return $response->withStatus(400)->withJson(['errors' => 'Shipping does not exist']);
         }
         
-        $shippingInfo['account'] = (array)json_decode($shippingInfo['account']);
+        $shippingInfo['account'] = json_decode($shippingInfo['account'], true);
         $shippingInfo['account']['password'] = '';
-        $shippingInfo['options']  = (array)json_decode($shippingInfo['options']);
-        $shippingInfo['fee']      = (array)json_decode($shippingInfo['fee']);
-        $shippingInfo['entities'] = (array)json_decode($shippingInfo['entities']);
+        $shippingInfo['options']  = json_decode($shippingInfo['options'], true);
+        $shippingInfo['fee']      = json_decode($shippingInfo['fee'], true);
+        $shippingInfo['entities'] = json_decode($shippingInfo['entities'], true);
 
         $allEntities = EntityModel::get([
             'select'    => ['e1.id', 'e1.entity_id', 'e1.entity_label', 'e2.id as parent_id'],
diff --git a/test/unitTests/app/attachment/AttachmentControllerTest.php b/test/unitTests/app/attachment/AttachmentControllerTest.php
index 266791c5af424f03fc58df2b9543cbf5adf36b90..57966df1874ed3d877178979a0d0eff8aeb41014 100644
--- a/test/unitTests/app/attachment/AttachmentControllerTest.php
+++ b/test/unitTests/app/attachment/AttachmentControllerTest.php
@@ -48,7 +48,7 @@ class AttachmentControllerTest extends TestCase
         $fullRequest = \httpRequestCustom::addContentInBody($aArgsFail, $request);
         $response = $attachmentController->create($fullRequest, new \Slim\Http\Response());
         $this->assertSame(400, $response->getStatusCode());
-        $response = (array)json_decode((string)$response->getBody());
+        $response = json_decode((string)$response->getBody(), true);
 
         $this->assertSame('Body type is empty or not a string', $response['errors']);
 
@@ -99,13 +99,13 @@ class AttachmentControllerTest extends TestCase
 
         $response     = $attachmentController->update($fullRequest, new \Slim\Http\Response(), ['id' => self::$id]);
         $this->assertSame(400, $response->getStatusCode());
-        $response = (array)json_decode((string)$response->getBody());
+        $response = json_decode((string)$response->getBody(), true);
 
         $this->assertSame('Body type is empty or not a string', $response['errors']);
 
         //  READ
         $response = $attachmentController->getById($request, new \Slim\Http\Response(), ['id' => self::$id]);
-        $res = (array)json_decode((string)$response->getBody());
+        $res = json_decode((string)$response->getBody(), true);
         $this->assertInternalType('array', $res);
 
         $this->assertSame($aArgs['title'], $res['title']);
@@ -119,25 +119,25 @@ class AttachmentControllerTest extends TestCase
         $attachmentController = new \Attachment\controllers\AttachmentController();
 
         //  DELETE
-        $environment    = \Slim\Http\Environment::mock(['REQUEST_METHOD' => 'DELETE']);
-        $request        = \Slim\Http\Request::createFromEnvironment($environment);
+        $environment  = \Slim\Http\Environment::mock(['REQUEST_METHOD' => 'DELETE']);
+        $request      = \Slim\Http\Request::createFromEnvironment($environment);
 
         $response     = $attachmentController->delete($request, new \Slim\Http\Response(), ['id' => self::$id]);
         $this->assertSame(204, $response->getStatusCode());
 
         //  DELETE
-        $environment    = \Slim\Http\Environment::mock(['REQUEST_METHOD' => 'DELETE']);
-        $request        = \Slim\Http\Request::createFromEnvironment($environment);
+        $environment  = \Slim\Http\Environment::mock(['REQUEST_METHOD' => 'DELETE']);
+        $request      = \Slim\Http\Request::createFromEnvironment($environment);
 
-        $response     = $attachmentController->delete($request, new \Slim\Http\Response(), ['id' => self::$id]);
-        $res = (array)json_decode((string)$response->getBody());
+        $response = $attachmentController->delete($request, new \Slim\Http\Response(), ['id' => self::$id]);
+        $res      = json_decode((string)$response->getBody(), true);
         $this->assertSame(400, $response->getStatusCode());
 
         $this->assertSame('Attachment does not exist', $res['errors']);
 
         //  READ
         $response = $attachmentController->getById($request, new \Slim\Http\Response(), ['id' => self::$id]);
-        $res = (array)json_decode((string)$response->getBody());
+        $res = json_decode((string)$response->getBody(), true);
         $this->assertSame(400, $response->getStatusCode());
 
         $this->assertSame('Attachment does not exist', $res['errors']);