@@ -64,9 +64,9 @@ discard block |
||
| 64 | 64 | public function fetchOneBy(array $where = []): ?GeoCacheLogEntity |
| 65 | 65 | { |
| 66 | 66 | $queryBuilder = $this->connection->createQueryBuilder() |
| 67 | - ->select('*') |
|
| 68 | - ->from(self::TABLE) |
|
| 69 | - ->setMaxResults(1); |
|
| 67 | + ->select('*') |
|
| 68 | + ->from(self::TABLE) |
|
| 69 | + ->setMaxResults(1); |
|
| 70 | 70 | |
| 71 | 71 | if (count($where) > 0) { |
| 72 | 72 | foreach ($where as $column => $value) { |
@@ -94,8 +94,8 @@ discard block |
||
| 94 | 94 | public function fetchBy(array $where = []): array |
| 95 | 95 | { |
| 96 | 96 | $queryBuilder = $this->connection->createQueryBuilder() |
| 97 | - ->select('*') |
|
| 98 | - ->from(self::TABLE); |
|
| 97 | + ->select('*') |
|
| 98 | + ->from(self::TABLE); |
|
| 99 | 99 | |
| 100 | 100 | if (count($where) > 0) { |
| 101 | 101 | foreach ($where as $column => $value) { |
@@ -164,7 +164,7 @@ discard block |
||
| 164 | 164 | $databaseArray |
| 165 | 165 | ); |
| 166 | 166 | |
| 167 | - $entity->id = (int) $this->connection->lastInsertId(); |
|
| 167 | + $entity->id = (int)$this->connection->lastInsertId(); |
|
| 168 | 168 | |
| 169 | 169 | return $entity; |
| 170 | 170 | } |
@@ -188,7 +188,7 @@ discard block |
||
| 188 | 188 | ['id' => $entity->id] |
| 189 | 189 | ); |
| 190 | 190 | |
| 191 | - $entity->id = (int) $this->connection->lastInsertId(); |
|
| 191 | + $entity->id = (int)$this->connection->lastInsertId(); |
|
| 192 | 192 | |
| 193 | 193 | return $entity; |
| 194 | 194 | } |
@@ -250,27 +250,27 @@ discard block |
||
| 250 | 250 | public function getEntityFromDatabaseArray(array $data): GeoCacheLogEntity |
| 251 | 251 | { |
| 252 | 252 | $entity = new GeoCacheLogEntity(); |
| 253 | - $entity->id = (int) $data['id']; |
|
| 253 | + $entity->id = (int)$data['id']; |
|
| 254 | 254 | $entity->uuid = $data['uuid']; |
| 255 | - $entity->node = (int) $data['node']; |
|
| 255 | + $entity->node = (int)$data['node']; |
|
| 256 | 256 | $entity->dateCreated = new DateTime($data['date_created']); |
| 257 | 257 | $entity->entryLastModified = new DateTime($data['entry_last_modified']); |
| 258 | 258 | $entity->lastModified = new DateTime($data['last_modified']); |
| 259 | - $entity->okapiSyncbase = (int) $data['okapi_syncbase']; |
|
| 259 | + $entity->okapiSyncbase = (int)$data['okapi_syncbase']; |
|
| 260 | 260 | $entity->logLastModified = new DateTime($data['log_last_modified']); |
| 261 | - $entity->cacheId = (int) $data['cache_id']; |
|
| 262 | - $entity->userId = (int) $data['user_id']; |
|
| 263 | - $entity->type = (int) $data['type']; |
|
| 264 | - $entity->ocTeamComment = (bool) $data['oc_team_comment']; |
|
| 261 | + $entity->cacheId = (int)$data['cache_id']; |
|
| 262 | + $entity->userId = (int)$data['user_id']; |
|
| 263 | + $entity->type = (int)$data['type']; |
|
| 264 | + $entity->ocTeamComment = (bool)$data['oc_team_comment']; |
|
| 265 | 265 | $entity->date = new DateTime($data['date']); |
| 266 | 266 | $entity->orderDate = new DateTime($data['order_date']); |
| 267 | - $entity->needsMaintenance = (bool) $data['needs_maintenance']; |
|
| 268 | - $entity->listingOutdated = (bool) $data['listing_outdated']; |
|
| 267 | + $entity->needsMaintenance = (bool)$data['needs_maintenance']; |
|
| 268 | + $entity->listingOutdated = (bool)$data['listing_outdated']; |
|
| 269 | 269 | $entity->text = $data['text']; |
| 270 | - $entity->textHtml = (bool) $data['text_html']; |
|
| 271 | - $entity->textHtmledit = (bool) $data['text_htmledit']; |
|
| 272 | - $entity->ownerNotified = (bool) $data['owner_notified']; |
|
| 273 | - $entity->picture = (int) $data['picture']; |
|
| 270 | + $entity->textHtml = (bool)$data['text_html']; |
|
| 271 | + $entity->textHtmledit = (bool)$data['text_htmledit']; |
|
| 272 | + $entity->ownerNotified = (bool)$data['owner_notified']; |
|
| 273 | + $entity->picture = (int)$data['picture']; |
|
| 274 | 274 | |
| 275 | 275 | return $entity; |
| 276 | 276 | } |
@@ -27,7 +27,7 @@ discard block |
||
| 27 | 27 | public function toDatabaseArray(): array |
| 28 | 28 | { |
| 29 | 29 | return [ |
| 30 | - 'id' => (int) $this->id, |
|
| 30 | + 'id' => (int)$this->id, |
|
| 31 | 31 | 'email' => $this->email, |
| 32 | 32 | 'status' => $this->status, |
| 33 | 33 | 'created' => $this->created, |
@@ -36,7 +36,7 @@ discard block |
||
| 36 | 36 | |
| 37 | 37 | public function fromDatabaseArray(array $data): self |
| 38 | 38 | { |
| 39 | - $this->id = (int) $data['id']; |
|
| 39 | + $this->id = (int)$data['id']; |
|
| 40 | 40 | $this->email = $data['email']; |
| 41 | 41 | $this->status = $data['status']; |
| 42 | 42 | $this->created = $data['created']; |
@@ -21,7 +21,6 @@ |
||
| 21 | 21 | * Validates a single item. |
| 22 | 22 | * |
| 23 | 23 | * @param mixed $item Item to validate |
| 24 | - |
|
| 25 | 24 | * @throws ValidationException |
| 26 | 25 | */ |
| 27 | 26 | public function validate($item): void |
@@ -17,7 +17,7 @@ |
||
| 17 | 17 | { |
| 18 | 18 | $this->setViolations($violations); |
| 19 | 19 | |
| 20 | - parent::__construct((string) $this); |
|
| 20 | + parent::__construct((string)$this); |
|
| 21 | 21 | } |
| 22 | 22 | |
| 23 | 23 | public function __toString(): string |
@@ -72,7 +72,7 @@ |
||
| 72 | 72 | } |
| 73 | 73 | |
| 74 | 74 | $process = new Process($cmd, $this->rootPath, null, null, 9600); |
| 75 | - $process->run(function ($type, $buffer): void { |
|
| 75 | + $process->run(function($type, $buffer): void { |
|
| 76 | 76 | echo $buffer; |
| 77 | 77 | }); |
| 78 | 78 | |
@@ -103,7 +103,7 @@ discard block |
||
| 103 | 103 | $filesJson = json_decode(file_get_contents($projectDir . '/theme/frontend/js/files.json'), true); |
| 104 | 104 | $ownFiles = $filesJson['files']; |
| 105 | 105 | |
| 106 | - $ownFiles = array_map(function ($file) use ($applicationJsPath) { |
|
| 106 | + $ownFiles = array_map(function($file) use ($applicationJsPath) { |
|
| 107 | 107 | if (strpos($file, '**') !== false) { |
| 108 | 108 | return null; |
| 109 | 109 | } |
@@ -116,7 +116,7 @@ discard block |
||
| 116 | 116 | $finder = new Finder(); |
| 117 | 117 | $finder->in($applicationJsPath . '/plugins/')->name('*.js'); |
| 118 | 118 | |
| 119 | - $jsPlugins = array_map(function ($file) { |
|
| 119 | + $jsPlugins = array_map(function($file) { |
|
| 120 | 120 | return $file->getRealPath(); |
| 121 | 121 | }, iterator_to_array($finder->files())); |
| 122 | 122 | |
@@ -147,7 +147,7 @@ discard block |
||
| 147 | 147 | $scss = new Compiler(); |
| 148 | 148 | $scss->setIgnoreErrors(true); |
| 149 | 149 | $scss->addImportPath($applicationScssPath); |
| 150 | - $scss->addImportPath(function ($path) use ($projectDir) { |
|
| 150 | + $scss->addImportPath(function($path) use ($projectDir) { |
|
| 151 | 151 | //Check for tilde as this refers to the node_modules dir |
| 152 | 152 | if (strpos($path, '~') === 0) { |
| 153 | 153 | $path = str_replace( |
@@ -25,7 +25,7 @@ |
||
| 25 | 25 | { |
| 26 | 26 | [$uSec, $sec] = explode(' ', microtime()); |
| 27 | 27 | |
| 28 | - return ((float) $uSec + (float) $sec); |
|
| 28 | + return ((float)$uSec + (float)$sec); |
|
| 29 | 29 | } |
| 30 | 30 | |
| 31 | 31 | /** |
@@ -51,7 +51,7 @@ |
||
| 51 | 51 | if ($opt['session']['check_referer']) { |
| 52 | 52 | if (isset($_SERVER['REFERER'])) { |
| 53 | 53 | // TODO fix the following if statement, seems corrupted |
| 54 | - if (stripos('http' + strstr($_SERVER['REFERER'], '://'), strtolower($opt['page']['absolute_http_url'])) !== 0 |
|
| 54 | + if (stripos('http' +strstr($_SERVER['REFERER'], '://'), strtolower($opt['page']['absolute_http_url'])) !== 0 |
|
| 55 | 55 | ) { |
| 56 | 56 | $this->createNewSession(); |
| 57 | 57 | } |
@@ -13,14 +13,14 @@ |
||
| 13 | 13 | |
| 14 | 14 | public function push_pos(&$pos): void |
| 15 | 15 | { |
| 16 | - $this->stack[count($this->stack)] =& $pos; |
|
| 17 | - $this->stack_ref =& $pos; |
|
| 16 | + $this->stack[count($this->stack)] = & $pos; |
|
| 17 | + $this->stack_ref = & $pos; |
|
| 18 | 18 | } |
| 19 | 19 | |
| 20 | 20 | public function pop_pos(): void |
| 21 | 21 | { |
| 22 | 22 | unset($this->stack[count($this->stack) - 1]); |
| 23 | - $this->stack_ref =& $this->stack[count($this->stack) - 1]; |
|
| 23 | + $this->stack_ref = & $this->stack[count($this->stack) - 1]; |
|
| 24 | 24 | } |
| 25 | 25 | |
| 26 | 26 | /** |