@@ -151,7 +151,7 @@ |
||
151 | 151 | * @access protected |
152 | 152 | * @static |
153 | 153 | * |
154 | - * @return true on success. |
|
154 | + * @return boolean on success. |
|
155 | 155 | */ |
156 | 156 | protected static function setCsvHeaderColumns() |
157 | 157 | { |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | */ |
38 | 38 | private static function loadAbstractStoreFile() |
39 | 39 | { |
40 | - $abstractStoreFile = dirname(__FILE__) . "/Store/AbstractStore.php"; |
|
40 | + $abstractStoreFile = dirname(__FILE__)."/Store/AbstractStore.php"; |
|
41 | 41 | |
42 | 42 | if (!file_exists($abstractStoreFile) || !is_readable($abstractStoreFile)) { |
43 | 43 | throw new \Exception("Could not load the abstract store file."); |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | private static function loadStoreTypeFile($storeType) |
63 | 63 | { |
64 | 64 | $storeType = ucwords($storeType); |
65 | - $storeFile = dirname(__FILE__) . "/Store/$storeType" . "Store.php"; |
|
65 | + $storeFile = dirname(__FILE__)."/Store/$storeType"."Store.php"; |
|
66 | 66 | |
67 | 67 | if (!file_exists($storeFile) || !is_readable($storeFile)) { |
68 | 68 | throw new \Exception("Could not load the store file for $storeType."); |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | */ |
87 | 87 | private static function instantiateStoreClass($storeType) |
88 | 88 | { |
89 | - $storeClass = "\\JsonTable\\Store\\$storeType" . "Store"; |
|
89 | + $storeClass = "\\JsonTable\\Store\\$storeType"."Store"; |
|
90 | 90 | |
91 | 91 | if (!class_exists($storeClass)) { |
92 | 92 | throw new \Exception("Could not find the store class $storeClass"); |
@@ -28,7 +28,7 @@ |
||
28 | 28 | { |
29 | 29 | $referenceFields = implode(" || ', ' || ", $referenceFields); |
30 | 30 | |
31 | - $validationSql = "SELECT |
|
31 | + $validationSql = "SELECT |
|
32 | 32 | COUNT(*) |
33 | 33 | FROM |
34 | 34 | $referenceResource |
@@ -90,7 +90,7 @@ |
||
90 | 90 | private function getFormatMethodDetails($format) |
91 | 91 | { |
92 | 92 | $methodDetails = []; |
93 | - $methodDetails['name'] = 'format' . ucwords($format); |
|
93 | + $methodDetails['name'] = 'format'.ucwords($format); |
|
94 | 94 | $methodDetails['parameter'] = null; |
95 | 95 | |
96 | 96 | if ('datetime' === $this->type && 'default' !== $format) { |
@@ -69,7 +69,7 @@ |
||
69 | 69 | |
70 | 70 | self::rewindFilePointerToFirstData(); |
71 | 71 | |
72 | - $this->rowNumber= 1; |
|
72 | + $this->rowNumber = 1; |
|
73 | 73 | |
74 | 74 | while ($this->currentCsvRow = self::loopThroughFileRows()) { |
75 | 75 | $this->getPrimaryKeyDataForRow(); |
@@ -159,7 +159,7 @@ |
||
159 | 159 | /** |
160 | 160 | * Check whether the current hash has already been created for this file. |
161 | 161 | * |
162 | - * @return boolean|int False if this row's primary key hash is unique |
|
162 | + * @return integer False if this row's primary key hash is unique |
|
163 | 163 | * or the number of the row with the same hash if it's not. |
164 | 164 | */ |
165 | 165 | private function isHashUnique() |
@@ -17,7 +17,7 @@ |
||
17 | 17 | use \JsonTable\Store; |
18 | 18 | |
19 | 19 | // Use composer's autoloading. |
20 | -require __DIR__ . '/../vendor/autoload.php'; |
|
20 | +require __DIR__.'/../vendor/autoload.php'; |
|
21 | 21 | PhpConsole\Helper::register(); |
22 | 22 | |
23 | 23 | /* |
@@ -228,8 +228,8 @@ |
||
228 | 228 | $type = 'datetime'; |
229 | 229 | } |
230 | 230 | |
231 | - $typeClassName = ucwords($type) . 'Validator'; |
|
232 | - $validatorFile = dirname(dirname(__FILE__)) . "/Validate/$validationType/$typeClassName.php"; |
|
231 | + $typeClassName = ucwords($type).'Validator'; |
|
232 | + $validatorFile = dirname(dirname(__FILE__))."/Validate/$validationType/$typeClassName.php"; |
|
233 | 233 | |
234 | 234 | if (!file_exists($validatorFile) || !is_readable($validatorFile)) { |
235 | 235 | throw new \Exception("Could not load the validator file for $validationType $type."); |
@@ -178,7 +178,7 @@ discard block |
||
178 | 178 | */ |
179 | 179 | private function handleInvalidMandatoryColumn() |
180 | 180 | { |
181 | - $errorMessage = $this->schemaColumn->name . " on row $this->rowNumber is missing."; |
|
181 | + $errorMessage = $this->schemaColumn->name." on row $this->rowNumber is missing."; |
|
182 | 182 | $this->setError(Analyse::ERROR_REQUIRED_FIELD_MISSING_DATA, $errorMessage); |
183 | 183 | $this->setErrorRowStatistic($this->rowNumber); |
184 | 184 | $this->valid = false; |
@@ -213,7 +213,7 @@ discard block |
||
213 | 213 | */ |
214 | 214 | private function handleInvalidFormat() |
215 | 215 | { |
216 | - $errorMessage = "The data in column " . $this->schemaColumn->name ." on row $this->rowNumber doesn't "; |
|
216 | + $errorMessage = "The data in column ".$this->schemaColumn->name." on row $this->rowNumber doesn't "; |
|
217 | 217 | $errorMessage .= "match the required format of $this->format."; |
218 | 218 | $this->setError(self::ERROR_INVALID_FORMAT, $errorMessage); |
219 | 219 | $this->setErrorRowStatistic($this->rowNumber); |
@@ -266,7 +266,7 @@ discard block |
||
266 | 266 | */ |
267 | 267 | private function handleInvalidPattern() |
268 | 268 | { |
269 | - $errorMessage = "The data in column " . $this->schemaColumn->name . " on row $this->rowNumber doesn't "; |
|
269 | + $errorMessage = "The data in column ".$this->schemaColumn->name." on row $this->rowNumber doesn't "; |
|
270 | 270 | $errorMessage .= "match the required pattern of $this->pattern."; |
271 | 271 | $this->setError(self::ERROR_INVALID_PATTERN, $errorMessage); |
272 | 272 | $this->setErrorRowStatistic($this->rowNumber); |