From 041e33d96e675a09bafe7918904b6e8e176dc954 Mon Sep 17 00:00:00 2001 From: "nicolas.diril" Date: Wed, 19 Feb 2020 12:36:11 +0100 Subject: [PATCH 1/3] fix (): bug on import --- dependency/csv/Csv.php | 10 ++++++++-- src/bundle/auth/Controller/role.php | 4 +--- src/bundle/auth/Controller/serviceAccount.php | 6 ++---- src/bundle/auth/Controller/userAccount.php | 10 ++++------ src/bundle/auth/roleInterface.php | 2 +- src/bundle/auth/serviceAccountInterface.php | 2 +- src/bundle/auth/userAccountInterface.php | 2 +- src/bundle/organization/Controller/organization.php | 7 +++---- src/bundle/organization/organizationInterface.php | 2 +- .../recordsManagement/Controller/archivalProfile.php | 4 +--- .../recordsManagement/Controller/descriptionField.php | 4 +--- .../recordsManagement/Controller/retentionRule.php | 4 +--- .../recordsManagement/archivalProfileInterface.php | 2 +- .../recordsManagement/descriptionFieldInterface.php | 2 +- .../recordsManagement/retentionRuleInterface.php | 2 +- .../maarchRM/Resources/view/importExport/index.html | 11 +++-------- .../UserStory/import/importRetentionRuleInterface.php | 2 +- 17 files changed, 32 insertions(+), 44 deletions(-) diff --git a/dependency/csv/Csv.php b/dependency/csv/Csv.php index 0f8b07e9e..dce9ddf29 100644 --- a/dependency/csv/Csv.php +++ b/dependency/csv/Csv.php @@ -30,6 +30,13 @@ class Csv * @param resource $filename */ public function read($filename, $className, $messageType = false, $delimiter = ',', $enclosure = '"', $escape = '\\') + { + $handler = fopen($filename, 'r'); + + return $this->readStream($handler, $className, $messageType, $delimiter, $enclosure, $escape); + } + + public function readStream($handler, $className, $messageType = false, $delimiter = ',', $enclosure = '"', $escape = '\\') { if ($messageType) { $class = \laabs::getMessage($className); @@ -37,8 +44,6 @@ class Csv $class = \laabs::getClass($className); } - $handler = fopen($filename, 'r'); - $header = fgetcsv($handler, 0, $delimiter, $enclosure, $escape); $properties = $this->getPropertiesFromHeader($header, $class); @@ -57,6 +62,7 @@ class Csv fclose($handler); return $collection; + } protected function getPropertiesFromHeader($header, $class) diff --git a/src/bundle/auth/Controller/role.php b/src/bundle/auth/Controller/role.php index c4d13528e..ad3b23154 100755 --- a/src/bundle/auth/Controller/role.php +++ b/src/bundle/auth/Controller/role.php @@ -443,9 +443,7 @@ class role } } - $filename = \laabs\tempnam(); - file_put_contents($filename, $data); - $roles = $this->csv->read($filename, 'auth/roleImportExport', true); + $roles = $this->csv->readStream($data, 'auth/roleImportExport', true); foreach ($roles as $key => $role) { if ($isReset || !$this->sdoFactory->exists('auth/role', $role->roleId) diff --git a/src/bundle/auth/Controller/serviceAccount.php b/src/bundle/auth/Controller/serviceAccount.php index b9c297fc5..992c51112 100755 --- a/src/bundle/auth/Controller/serviceAccount.php +++ b/src/bundle/auth/Controller/serviceAccount.php @@ -545,16 +545,14 @@ class serviceAccount /** * Import Service account function and create or update them * - * @param array $data Array of serviceAccountImportExort Message + * @param resource $data Array of serviceAccountImportExort Message * @param boolean $isReset Reset tables or not * * @return boolean Success of operation or not */ public function import($data, $isReset = false) { - $filename = \laabs\tempnam(); - file_put_contents($filename, $data); - $services = $this->csv->read($filename, 'auth/serviceAccountImportExport', $messageType = true); + $services = $this->csv->readStream($data, 'auth/serviceAccountImportExport', $messageType = true); $organizationController = \laabs::newController('organization/organization'); $transactionControl = !$this->sdoFactory->inTransaction(); diff --git a/src/bundle/auth/Controller/userAccount.php b/src/bundle/auth/Controller/userAccount.php index 6069724b5..a006a6479 100755 --- a/src/bundle/auth/Controller/userAccount.php +++ b/src/bundle/auth/Controller/userAccount.php @@ -833,8 +833,8 @@ class userAccount /** * Import User account function and create or update them * - * @param array $data Array of userAccountImportExort Message - * @param boolean $isReset Reset tables or not + * @param resource $data Array of userAccountImportExort Message + * @param boolean $isReset Reset tables or not * * @return boolean Success of operation or not */ @@ -844,9 +844,7 @@ class userAccount $organizationController = \laabs::newController('organization/organization'); $roleController = \laabs::newController('auth/role'); - $filename = \laabs\tempnam(); - file_put_contents($filename, $data); - $users = $this->csv->read($filename, 'auth/userAccountImportExport', $messageType = true); + $users = $this->csv->readStream($data, 'auth/userAccountImportExport', $messageType = true); $transactionControl = !$this->sdoFactory->inTransaction(); @@ -957,7 +955,7 @@ class userAccount } } - if (!hasSuperAdmin) { + if (!$hasSuperAdmin) { throw new \Exception("Csv must have at least one superadmin"); } } diff --git a/src/bundle/auth/roleInterface.php b/src/bundle/auth/roleInterface.php index f1247829b..b2cfce5e7 100755 --- a/src/bundle/auth/roleInterface.php +++ b/src/bundle/auth/roleInterface.php @@ -51,7 +51,7 @@ interface roleInterface public function readExport($limit = null); /** - * @param string $data Data base64 encoded or not + * @param resource $data Data base64 encoded or not * @param boolean $isReset Reset tables or not * * @action auth/role/import diff --git a/src/bundle/auth/serviceAccountInterface.php b/src/bundle/auth/serviceAccountInterface.php index d8469ec42..8710ed9ac 100755 --- a/src/bundle/auth/serviceAccountInterface.php +++ b/src/bundle/auth/serviceAccountInterface.php @@ -126,7 +126,7 @@ interface serviceAccountInterface public function readQuery_query_($query = null); /** - * @param string $data Data base64 encoded or not + * @param resource $data Data base64 encoded or not * @param boolean $isReset Reset tables or not * * @action auth/serviceAccount/import diff --git a/src/bundle/auth/userAccountInterface.php b/src/bundle/auth/userAccountInterface.php index efa989dfd..e54e1250f 100755 --- a/src/bundle/auth/userAccountInterface.php +++ b/src/bundle/auth/userAccountInterface.php @@ -245,7 +245,7 @@ interface userAccountInterface public function updatePasswordchangerequest_userAccountId_(); /** - * @param string $data Data base64 encoded or not + * @param resource $data Data base64 encoded or not * @param boolean $isReset Reset tables or not * * @action auth/userAccount/import diff --git a/src/bundle/organization/Controller/organization.php b/src/bundle/organization/Controller/organization.php index de07cc293..1c197a8a4 100755 --- a/src/bundle/organization/Controller/organization.php +++ b/src/bundle/organization/Controller/organization.php @@ -1620,16 +1620,15 @@ class organization /** * Import organization and create or update them * - * @param array $data Array of serviceAccountImportExort Message + * @param resource $data Array of serviceAccountImportExort Message * @param boolean $isReset Reset tables or not * * @return boolean Success of operation or not */ public function import($data, $isReset = false) { - $filename = \laabs\tempnam(); - file_put_contents($filename, $data); - $organizations = $this->csv->read($filename, 'organization/organizationImportExport', $messageType = true); + + $organizations = $this->csv->readStream($data, 'organization/organizationImportExport', $messageType = true); $transactionControl = !$this->sdoFactory->inTransaction(); if ($transactionControl) { diff --git a/src/bundle/organization/organizationInterface.php b/src/bundle/organization/organizationInterface.php index c4d613e14..770d6652e 100755 --- a/src/bundle/organization/organizationInterface.php +++ b/src/bundle/organization/organizationInterface.php @@ -346,7 +346,7 @@ interface organizationInterface public function read_orgId_ChangeStatus_status_(); /** - * @param string $data Data base64 encoded or not + * @param resource $data Data base64 encoded or not * @param boolean $isReset Reset tables or not * * @action organization/organization/import diff --git a/src/bundle/recordsManagement/Controller/archivalProfile.php b/src/bundle/recordsManagement/Controller/archivalProfile.php index 8b99b5dca..9bd8654cb 100755 --- a/src/bundle/recordsManagement/Controller/archivalProfile.php +++ b/src/bundle/recordsManagement/Controller/archivalProfile.php @@ -511,9 +511,7 @@ class archivalProfile } } - $filename = \laabs\tempnam(); - file_put_contents($filename, $data); - $archivalProfiles = $this->csv->read($filename, 'recordsManagement/archivalProfileImportExport', true); + $archivalProfiles = $this->csv->readStream($data, 'recordsManagement/archivalProfileImportExport', true); $archivalProfileContents = []; $archivalProfilesReferences = []; foreach ($archivalProfiles as $key => $archivalProfile) { diff --git a/src/bundle/recordsManagement/Controller/descriptionField.php b/src/bundle/recordsManagement/Controller/descriptionField.php index 59c3996ab..c9ce0b087 100755 --- a/src/bundle/recordsManagement/Controller/descriptionField.php +++ b/src/bundle/recordsManagement/Controller/descriptionField.php @@ -282,9 +282,7 @@ class descriptionField } } - $filename = \laabs\tempnam(); - file_put_contents($filename, $data); - $descriptionFields = $this->csv->read($filename, 'recordsManagement/descriptionField', $messageType = false); + $descriptionFields = $this->csv->readStream($data, 'recordsManagement/descriptionField', $messageType = false); foreach ($descriptionFields as $key => $descriptionField) { if (is_null($descriptionField->name)) { throw new \core\Exception\BadRequestException("Name cannot be null"); diff --git a/src/bundle/recordsManagement/Controller/retentionRule.php b/src/bundle/recordsManagement/Controller/retentionRule.php index 2826549f0..08c45b081 100755 --- a/src/bundle/recordsManagement/Controller/retentionRule.php +++ b/src/bundle/recordsManagement/Controller/retentionRule.php @@ -194,9 +194,7 @@ class retentionRule } } - $filename = \laabs\tempnam(); - file_put_contents($filename, $data); - $retentionRules = $this->csv->read($filename, 'recordsManagement/retentionRule', true); + $retentionRules = $this->csv->readStream($data, 'recordsManagement/retentionRule', true); foreach ($retentionRules as $key => $retentionRule) { if ($isReset diff --git a/src/bundle/recordsManagement/archivalProfileInterface.php b/src/bundle/recordsManagement/archivalProfileInterface.php index 5d3f47500..83f517f00 100755 --- a/src/bundle/recordsManagement/archivalProfileInterface.php +++ b/src/bundle/recordsManagement/archivalProfileInterface.php @@ -54,7 +54,7 @@ interface archivalProfileInterface public function readExport($limit = null); /** - * @param string $data Data base64 encoded or not + * @param resource $data Data base64 encoded or not * @param boolean $isReset Reset tables or not * * @action recordsManagement/archivalProfile/import diff --git a/src/bundle/recordsManagement/descriptionFieldInterface.php b/src/bundle/recordsManagement/descriptionFieldInterface.php index ab7cc0d4c..1bafe08fa 100755 --- a/src/bundle/recordsManagement/descriptionFieldInterface.php +++ b/src/bundle/recordsManagement/descriptionFieldInterface.php @@ -75,7 +75,7 @@ interface descriptionFieldInterface public function delete_name_(); /** - * @param string $data Data base64 encoded or not + * @param resource $data Data base64 encoded or not * @param boolean $isReset Reset tables or not * * @action recordsManagement/descriptionField/import diff --git a/src/bundle/recordsManagement/retentionRuleInterface.php b/src/bundle/recordsManagement/retentionRuleInterface.php index 06663178e..2546afeea 100755 --- a/src/bundle/recordsManagement/retentionRuleInterface.php +++ b/src/bundle/recordsManagement/retentionRuleInterface.php @@ -53,7 +53,7 @@ interface retentionRuleInterface public function readExport($limit = null); /** - * @param string $data Data base64 encoded or not + * @param resource $data Data base64 encoded or not * @param boolean $isReset Reset tables or not * * @action recordsManagement/retentionRule/import diff --git a/src/presentation/maarchRM/Resources/view/importExport/index.html b/src/presentation/maarchRM/Resources/view/importExport/index.html index 24a6a000c..2bdc7c109 100644 --- a/src/presentation/maarchRM/Resources/view/importExport/index.html +++ b/src/presentation/maarchRM/Resources/view/importExport/index.html @@ -182,16 +182,11 @@ return; } - var data = { - 'data': file[0].handler, - 'isReset' : isReset - }; - ajax($('#exportContainer'), { - url: '/import/' + referentiel, + url: '/import/' + referentiel + '?isReset=' + isReset, type: 'POST', - data: JSON.stringify(data), - contentType: 'application/json', + data: file[0].handler, + contentType: 'text/csv', success: function (response) { gritter.show($("#file_success").text(), 'true'); }, diff --git a/src/presentation/maarchRM/UserStory/import/importRetentionRuleInterface.php b/src/presentation/maarchRM/UserStory/import/importRetentionRuleInterface.php index c52ed5a92..0a0eefadb 100644 --- a/src/presentation/maarchRM/UserStory/import/importRetentionRuleInterface.php +++ b/src/presentation/maarchRM/UserStory/import/importRetentionRuleInterface.php @@ -7,7 +7,7 @@ interface importRetentionRuleInterface /** * Import a csv file with retention rules informations * - * @param string $data Data base64 encoded or not in proper format + * @param resource $data Data base64 encoded or not in proper format * @param boolean $isReset Reset tables or not * * @uses recordsManagement/retentionRule/createImport -- GitLab From c281ba9453ed0aa52bb99c34ec041a6769bf9d89 Mon Sep 17 00:00:00 2001 From: "nicolas.diril" Date: Wed, 19 Feb 2020 16:12:05 +0100 Subject: [PATCH 2/3] refactor (): code indent and usage of resource --- src/bundle/auth/Controller/serviceAccount.php | 6 +++--- src/bundle/auth/Controller/userAccount.php | 6 +++--- src/bundle/auth/roleInterface.php | 2 +- src/bundle/auth/serviceAccountInterface.php | 2 +- src/bundle/organization/Controller/organization.php | 2 +- src/bundle/organization/organizationInterface.php | 2 +- src/bundle/recordsManagement/archivalProfileInterface.php | 2 +- src/bundle/recordsManagement/descriptionFieldInterface.php | 2 +- src/bundle/recordsManagement/retentionRuleInterface.php | 2 +- .../UserStory/import/importArchivalProfileInterface.php | 4 ++-- .../UserStory/import/importDescriptionFieldInterface.php | 4 ++-- .../UserStory/import/importOrganizationInterface.php | 4 ++-- .../UserStory/import/importRetentionRuleInterface.php | 4 ++-- .../maarchRM/UserStory/import/importRoleInterface.php | 4 ++-- .../UserStory/import/importServiceAccountInterface.php | 4 ++-- .../UserStory/import/importUserAccountInterface.php | 4 ++-- 16 files changed, 27 insertions(+), 27 deletions(-) diff --git a/src/bundle/auth/Controller/serviceAccount.php b/src/bundle/auth/Controller/serviceAccount.php index 992c51112..ab25db7b5 100755 --- a/src/bundle/auth/Controller/serviceAccount.php +++ b/src/bundle/auth/Controller/serviceAccount.php @@ -545,10 +545,10 @@ class serviceAccount /** * Import Service account function and create or update them * - * @param resource $data Array of serviceAccountImportExort Message - * @param boolean $isReset Reset tables or not + * @param resource $data Array of serviceAccountImportExort Message + * @param boolean $isReset Reset tables or not * - * @return boolean Success of operation or not + * @return boolean Success of operation or not */ public function import($data, $isReset = false) { diff --git a/src/bundle/auth/Controller/userAccount.php b/src/bundle/auth/Controller/userAccount.php index a006a6479..f6022a95d 100755 --- a/src/bundle/auth/Controller/userAccount.php +++ b/src/bundle/auth/Controller/userAccount.php @@ -833,10 +833,10 @@ class userAccount /** * Import User account function and create or update them * - * @param resource $data Array of userAccountImportExort Message - * @param boolean $isReset Reset tables or not + * @param resource $data Array of userAccountImportExort Message + * @param boolean $isReset Reset tables or not * - * @return boolean Success of operation or not + * @return boolean Success of operation or not */ public function import($data, $isReset = false) { diff --git a/src/bundle/auth/roleInterface.php b/src/bundle/auth/roleInterface.php index b2cfce5e7..ee8408d74 100755 --- a/src/bundle/auth/roleInterface.php +++ b/src/bundle/auth/roleInterface.php @@ -52,7 +52,7 @@ interface roleInterface /** * @param resource $data Data base64 encoded or not - * @param boolean $isReset Reset tables or not + * @param boolean $isReset Reset tables or not * * @action auth/role/import * diff --git a/src/bundle/auth/serviceAccountInterface.php b/src/bundle/auth/serviceAccountInterface.php index 8710ed9ac..ed11e11c2 100755 --- a/src/bundle/auth/serviceAccountInterface.php +++ b/src/bundle/auth/serviceAccountInterface.php @@ -127,7 +127,7 @@ interface serviceAccountInterface /** * @param resource $data Data base64 encoded or not - * @param boolean $isReset Reset tables or not + * @param boolean $isReset Reset tables or not * * @action auth/serviceAccount/import * diff --git a/src/bundle/organization/Controller/organization.php b/src/bundle/organization/Controller/organization.php index 1c197a8a4..63773027b 100755 --- a/src/bundle/organization/Controller/organization.php +++ b/src/bundle/organization/Controller/organization.php @@ -1621,7 +1621,7 @@ class organization * Import organization and create or update them * * @param resource $data Array of serviceAccountImportExort Message - * @param boolean $isReset Reset tables or not + * @param boolean $isReset Reset tables or not * * @return boolean Success of operation or not */ diff --git a/src/bundle/organization/organizationInterface.php b/src/bundle/organization/organizationInterface.php index 770d6652e..9cb7649a9 100755 --- a/src/bundle/organization/organizationInterface.php +++ b/src/bundle/organization/organizationInterface.php @@ -347,7 +347,7 @@ interface organizationInterface /** * @param resource $data Data base64 encoded or not - * @param boolean $isReset Reset tables or not + * @param boolean $isReset Reset tables or not * * @action organization/organization/import * diff --git a/src/bundle/recordsManagement/archivalProfileInterface.php b/src/bundle/recordsManagement/archivalProfileInterface.php index 83f517f00..bbd7dd9d3 100755 --- a/src/bundle/recordsManagement/archivalProfileInterface.php +++ b/src/bundle/recordsManagement/archivalProfileInterface.php @@ -55,7 +55,7 @@ interface archivalProfileInterface /** * @param resource $data Data base64 encoded or not - * @param boolean $isReset Reset tables or not + * @param boolean $isReset Reset tables or not * * @action recordsManagement/archivalProfile/import * diff --git a/src/bundle/recordsManagement/descriptionFieldInterface.php b/src/bundle/recordsManagement/descriptionFieldInterface.php index 1bafe08fa..5f84ee06e 100755 --- a/src/bundle/recordsManagement/descriptionFieldInterface.php +++ b/src/bundle/recordsManagement/descriptionFieldInterface.php @@ -76,7 +76,7 @@ interface descriptionFieldInterface /** * @param resource $data Data base64 encoded or not - * @param boolean $isReset Reset tables or not + * @param boolean $isReset Reset tables or not * * @action recordsManagement/descriptionField/import * diff --git a/src/bundle/recordsManagement/retentionRuleInterface.php b/src/bundle/recordsManagement/retentionRuleInterface.php index 2546afeea..852f1865b 100755 --- a/src/bundle/recordsManagement/retentionRuleInterface.php +++ b/src/bundle/recordsManagement/retentionRuleInterface.php @@ -54,7 +54,7 @@ interface retentionRuleInterface /** * @param resource $data Data base64 encoded or not - * @param boolean $isReset Reset tables or not + * @param boolean $isReset Reset tables or not * * @action recordsManagement/retentionRule/import * diff --git a/src/presentation/maarchRM/UserStory/import/importArchivalProfileInterface.php b/src/presentation/maarchRM/UserStory/import/importArchivalProfileInterface.php index 51ee02591..ef0f44102 100644 --- a/src/presentation/maarchRM/UserStory/import/importArchivalProfileInterface.php +++ b/src/presentation/maarchRM/UserStory/import/importArchivalProfileInterface.php @@ -7,8 +7,8 @@ interface importArchivalProfileInterface /** * Import a csv file with archival profile informations * - * @param string $data Data base64 encoded or not in proper format - * @param boolean $isReset Reset tables or not + * @param resource $data Data base64 encoded or not in proper format + * @param boolean $isReset Reset tables or not * * @uses recordsManagement/archivalProfile/createImport * diff --git a/src/presentation/maarchRM/UserStory/import/importDescriptionFieldInterface.php b/src/presentation/maarchRM/UserStory/import/importDescriptionFieldInterface.php index 64983b55c..b371e2a27 100644 --- a/src/presentation/maarchRM/UserStory/import/importDescriptionFieldInterface.php +++ b/src/presentation/maarchRM/UserStory/import/importDescriptionFieldInterface.php @@ -7,8 +7,8 @@ interface importDescriptionFieldInterface /** * Import a csv file with description field informations * - * @param string $data Data base64 encoded or not in proper format - * @param boolean $isReset Reset tables or not + * @param resource $data Data base64 encoded or not in proper format + * @param boolean $isReset Reset tables or not * * @uses recordsManagement/descriptionField/createImport * diff --git a/src/presentation/maarchRM/UserStory/import/importOrganizationInterface.php b/src/presentation/maarchRM/UserStory/import/importOrganizationInterface.php index 551e96dde..9492306f7 100644 --- a/src/presentation/maarchRM/UserStory/import/importOrganizationInterface.php +++ b/src/presentation/maarchRM/UserStory/import/importOrganizationInterface.php @@ -7,8 +7,8 @@ interface importOrganizationInterface /** * Import a csv file with organization informations * - * @param string $data Data base64 encoded or not in proper format - * @param boolean $isReset Reset tables or not + * @param resource $data Data base64 encoded or not in proper format + * @param boolean $isReset Reset tables or not * * @uses organization/organization/createImport * diff --git a/src/presentation/maarchRM/UserStory/import/importRetentionRuleInterface.php b/src/presentation/maarchRM/UserStory/import/importRetentionRuleInterface.php index 0a0eefadb..1901239f2 100644 --- a/src/presentation/maarchRM/UserStory/import/importRetentionRuleInterface.php +++ b/src/presentation/maarchRM/UserStory/import/importRetentionRuleInterface.php @@ -7,8 +7,8 @@ interface importRetentionRuleInterface /** * Import a csv file with retention rules informations * - * @param resource $data Data base64 encoded or not in proper format - * @param boolean $isReset Reset tables or not + * @param resource $data Data base64 encoded or not in proper format + * @param boolean $isReset Reset tables or not * * @uses recordsManagement/retentionRule/createImport * diff --git a/src/presentation/maarchRM/UserStory/import/importRoleInterface.php b/src/presentation/maarchRM/UserStory/import/importRoleInterface.php index c2becc963..7377d76b0 100644 --- a/src/presentation/maarchRM/UserStory/import/importRoleInterface.php +++ b/src/presentation/maarchRM/UserStory/import/importRoleInterface.php @@ -7,8 +7,8 @@ interface importRoleInterface /** * Import a csv file with role informations * - * @param string $data Data base64 encoded or not in proper format - * @param boolean $isReset Reset tables or not + * @param resource $data Data base64 encoded or not in proper format + * @param boolean $isReset Reset tables or not * * @uses auth/role/createImport * diff --git a/src/presentation/maarchRM/UserStory/import/importServiceAccountInterface.php b/src/presentation/maarchRM/UserStory/import/importServiceAccountInterface.php index 90daa6f27..a073d8e9d 100644 --- a/src/presentation/maarchRM/UserStory/import/importServiceAccountInterface.php +++ b/src/presentation/maarchRM/UserStory/import/importServiceAccountInterface.php @@ -7,8 +7,8 @@ interface importServiceAccountInterface /** * Import a csv file with service account informations * - * @param string $data Data base64 encoded or not in proper format - * @param boolean $isReset Reset tables or not + * @param resource $data Data base64 encoded or not in proper format + * @param boolean $isReset Reset tables or not * * @uses auth/serviceAccount/createImport * diff --git a/src/presentation/maarchRM/UserStory/import/importUserAccountInterface.php b/src/presentation/maarchRM/UserStory/import/importUserAccountInterface.php index 84ac83daf..a8bc87823 100644 --- a/src/presentation/maarchRM/UserStory/import/importUserAccountInterface.php +++ b/src/presentation/maarchRM/UserStory/import/importUserAccountInterface.php @@ -7,8 +7,8 @@ interface importUserAccountInterface /** * Import a csv file with user account informations * - * @param string $data Data base64 encoded or not in proper format - * @param boolean $isReset Reset tables or not + * @param resource $data Data base64 encoded or not in proper format + * @param boolean $isReset Reset tables or not * * @uses auth/userAccount/createImport * -- GitLab From 407528741c141e62a34e65744ab7ceeafe909b24 Mon Sep 17 00:00:00 2001 From: "nicolas.diril" Date: Wed, 19 Feb 2020 16:29:09 +0100 Subject: [PATCH 3/3] refactor (): mispeling --- src/bundle/auth/Controller/serviceAccount.php | 2 +- src/bundle/auth/Controller/userAccount.php | 2 +- src/bundle/organization/Controller/organization.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/bundle/auth/Controller/serviceAccount.php b/src/bundle/auth/Controller/serviceAccount.php index ab25db7b5..195a3d855 100755 --- a/src/bundle/auth/Controller/serviceAccount.php +++ b/src/bundle/auth/Controller/serviceAccount.php @@ -545,7 +545,7 @@ class serviceAccount /** * Import Service account function and create or update them * - * @param resource $data Array of serviceAccountImportExort Message + * @param resource $data Array of serviceAccountImportExport Message * @param boolean $isReset Reset tables or not * * @return boolean Success of operation or not diff --git a/src/bundle/auth/Controller/userAccount.php b/src/bundle/auth/Controller/userAccount.php index f6022a95d..e6057cfd2 100755 --- a/src/bundle/auth/Controller/userAccount.php +++ b/src/bundle/auth/Controller/userAccount.php @@ -833,7 +833,7 @@ class userAccount /** * Import User account function and create or update them * - * @param resource $data Array of userAccountImportExort Message + * @param resource $data Array of userAccountImportExport Message * @param boolean $isReset Reset tables or not * * @return boolean Success of operation or not diff --git a/src/bundle/organization/Controller/organization.php b/src/bundle/organization/Controller/organization.php index 63773027b..c23ad5695 100755 --- a/src/bundle/organization/Controller/organization.php +++ b/src/bundle/organization/Controller/organization.php @@ -1620,7 +1620,7 @@ class organization /** * Import organization and create or update them * - * @param resource $data Array of serviceAccountImportExort Message + * @param resource $data Array of serviceAccountImportExport Message * @param boolean $isReset Reset tables or not * * @return boolean Success of operation or not -- GitLab