@@ -54,7 +54,7 @@ discard block |
||
| 54 | 54 | $cfp->getEventUri() |
| 55 | 55 | ), 400); |
| 56 | 56 | } |
| 57 | - $statement = 'INSERT into `cfp`(`dateCfpStart`, `dateCfpEnd`, `dateEventStart`, `dateEventEnd`, `name`, `uri`, `hash`, `timezone`, `description`, `eventUri`, `iconUri`, `latitude`, `longitude`, `location`, `tags`, `lastUpdate`) ' . |
|
| 57 | + $statement = 'INSERT into `cfp`(`dateCfpStart`, `dateCfpEnd`, `dateEventStart`, `dateEventEnd`, `name`, `uri`, `hash`, `timezone`, `description`, `eventUri`, `iconUri`, `latitude`, `longitude`, `location`, `tags`, `lastUpdate`) '. |
|
| 58 | 58 | 'VALUES (:dateCfpStart, :dateCfpEnd, :dateEventStart, :dateEventEnd, :name, :uri, :hash, :timezone, :description, :eventUri, :iconUri, :latitude, :longitude, :location, :tags, :lastUpdate);'; |
| 59 | 59 | $statement = $this->pdo->prepare($statement); |
| 60 | 60 | |
@@ -87,7 +87,7 @@ discard block |
||
| 87 | 87 | |
| 88 | 88 | public function update(Cfp $cfp, $fetchHash) |
| 89 | 89 | { |
| 90 | - if (! $fetchHash) { |
|
| 90 | + if (!$fetchHash) { |
|
| 91 | 91 | throw new \UnexpectedValueException('No Hash given', 400); |
| 92 | 92 | } |
| 93 | 93 | $oldValues = $this->select($fetchHash); |
@@ -117,15 +117,15 @@ discard block |
||
| 117 | 117 | ]; |
| 118 | 118 | |
| 119 | 119 | foreach ($options as $option) { |
| 120 | - $method = 'get' . $option; |
|
| 120 | + $method = 'get'.$option; |
|
| 121 | 121 | // Merge values from tags and source before comparing! |
| 122 | 122 | if (in_array($option, ['tags', 'source'])) { |
| 123 | - $setter = 'set' . $option; |
|
| 123 | + $setter = 'set'.$option; |
|
| 124 | 124 | $cfp->$setter(array_merge($oldValues->$method(), $cfp->$method())); |
| 125 | 125 | |
| 126 | 126 | } |
| 127 | 127 | if ($cfp->$method() != $oldValues->$method()) { |
| 128 | - $statementElements[] = '`' . $option . '` = :' . $option; |
|
| 128 | + $statementElements[] = '`'.$option.'` = :'.$option; |
|
| 129 | 129 | $values[$option] = $cfp->$method(); |
| 130 | 130 | if ($values[$option] instanceof \DateTimeInterface) { |
| 131 | 131 | $values[$option] = $values[$option]->format('c'); |
@@ -142,7 +142,7 @@ discard block |
||
| 142 | 142 | } |
| 143 | 143 | |
| 144 | 144 | $statement = 'UPDATE `cfp` SET ' |
| 145 | - . implode(',', $statementElements) . ',' |
|
| 145 | + . implode(',', $statementElements).',' |
|
| 146 | 146 | . '`lastUpdate` = :lastUpdate ' |
| 147 | 147 | . 'WHERE `hash` = :fetchHash'; |
| 148 | 148 | $statement = $this->pdo->prepare($statement); |
@@ -246,7 +246,7 @@ discard block |
||
| 246 | 246 | |
| 247 | 247 | public function setTimezone($timezone) |
| 248 | 248 | { |
| 249 | - if (! $timezone instanceof \DateTimeZone) { |
|
| 249 | + if (!$timezone instanceof \DateTimeZone) { |
|
| 250 | 250 | $timezone = new \DateTimeZone($timezone); |
| 251 | 251 | } |
| 252 | 252 | |
@@ -295,7 +295,7 @@ discard block |
||
| 295 | 295 | |
| 296 | 296 | public function addSource($source) |
| 297 | 297 | { |
| 298 | - if (! in_array($source)) { |
|
| 298 | + if (!in_array($source)) { |
|
| 299 | 299 | $this->source[] = $source; |
| 300 | 300 | } |
| 301 | 301 | } |
@@ -51,7 +51,7 @@ |
||
| 51 | 51 | callable $next |
| 52 | 52 | ) { |
| 53 | 53 | $query = $request->getQueryParams(); |
| 54 | - if (! isset($query['type'])) { |
|
| 54 | + if (!isset($query['type'])) { |
|
| 55 | 55 | return $next($request, $response); |
| 56 | 56 | } |
| 57 | 57 | |