Completed
Push — master ( 00307b...1dd238 )
by Andreas
02:16
created
src/PersistenceLayer/CfpPersistenceLayer.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
                 $cfp->getEventUri()
56 56
             ), 400);
57 57
         }
58
-        $statement = 'INSERT into `cfp`(`dateCfpStart`, `dateCfpEnd`, `dateEventStart`, `dateEventEnd`, `name`, `uri`, `hash`, `timezone`, `description`, `eventUri`, `iconUri`, `latitude`, `longitude`, `location`, `tags`, `lastUpdate`) ' .
58
+        $statement = 'INSERT into `cfp`(`dateCfpStart`, `dateCfpEnd`, `dateEventStart`, `dateEventEnd`, `name`, `uri`, `hash`, `timezone`, `description`, `eventUri`, `iconUri`, `latitude`, `longitude`, `location`, `tags`, `lastUpdate`) '.
59 59
                      'VALUES (:dateCfpStart, :dateCfpEnd, :dateEventStart, :dateEventEnd, :name, :uri, :hash, :timezone, :description, :eventUri, :iconUri, :latitude, :longitude, :location, :tags, :lastUpdate);';
60 60
         $statement = $this->pdo->prepare($statement);
61 61
 
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
 
89 89
     public function update(Cfp $cfp, $fetchHash)
90 90
     {
91
-        if (! $fetchHash) {
91
+        if (!$fetchHash) {
92 92
             throw new \UnexpectedValueException('No Hash given', 400);
93 93
         }
94 94
         $oldValues = $this->select($fetchHash);
@@ -117,9 +117,9 @@  discard block
 block discarded – undo
117 117
         ];
118 118
 
119 119
         foreach ($options as $option) {
120
-            $method = 'get' . $option;
120
+            $method = 'get'.$option;
121 121
             if ($cfp->$method() != $oldValues->$method()) {
122
-                $statementElements[] = '`' . $option . '` = :' . $option;
122
+                $statementElements[] = '`'.$option.'` = :'.$option;
123 123
                 $values[$option]     = $cfp->$method();
124 124
                 if ($values[$option] instanceof \DateTimeInterface) {
125 125
                     $values[$option] = $values[$option]->format('c');
@@ -131,12 +131,12 @@  discard block
 block discarded – undo
131 131
         }
132 132
 
133 133
         // No values to update, just, return
134
-        if (! $values) {
134
+        if (!$values) {
135 135
             return $cfp->getHash();
136 136
         }
137 137
 
138 138
         $statement = 'UPDATE `cfp` SET '
139
-                   . implode(',', $statementElements) . ','
139
+                   . implode(',', $statementElements).','
140 140
                    . '`lastUpdate` = :lastUpdate '
141 141
                    . 'WHERE `hash` = :fetchHash';
142 142
         $statement = $this->pdo->prepare($statement);
Please login to merge, or discard this patch.