Passed
Push — master ( 98c903...053c59 )
by Anthony
05:12 queued 02:17
created
core/Querybuilder.class.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
 		 * pour intialiser la ou les clauses where d'une requete
112 112
 		 */
113 113
 		public function where($champ, $cond, $champ_test, $closure = null) {
114
-			if ( $closure === null) {
114
+			if ($closure === null) {
115 115
 				$this->conditions[] = $champ.$cond.$champ_test;
116 116
 			}
117 117
 			else {
@@ -127,10 +127,10 @@  discard block
 block discarded – undo
127 127
 		 * fonction qui permet de récupérer un select fait sur une table
128 128
 		 */
129 129
 		public function get() {
130
-			$requete = $this->req_beginning . implode(",", $this->champs) . " FROM " . implode(",", $this->table);
130
+			$requete = $this->req_beginning.implode(",", $this->champs)." FROM ".implode(",", $this->table);
131 131
 
132 132
 			if (!empty($this->conditions)) {
133
-				$requete .= " WHERE ". implode(" ", $this->conditions);
133
+				$requete .= " WHERE ".implode(" ", $this->conditions);
134 134
 			}
135 135
 
136 136
 			$this->unsetQueryBuilder();
@@ -145,15 +145,15 @@  discard block
 block discarded – undo
145 145
 
146 146
 			$datas = [];
147 147
 			$count = count($this->champs);
148
-			for ($i=0 ; $i<$count ; $i++) {
148
+			for ($i = 0; $i < $count; $i++) {
149 149
 				$datas[] = $this->champs[$i]."=:".$this->champs[$i];
150 150
 			}
151 151
 
152 152
 			//si on a des conditions alors on sera dans un insert
153
-			$requete = $this->req_beginning . implode(",", $this->table) . " SET " . implode(", ", $datas);
153
+			$requete = $this->req_beginning.implode(",", $this->table)." SET ".implode(", ", $datas);
154 154
 
155 155
 			if (!empty($this->conditions)) {
156
-				$requete .= " WHERE " . implode(" ", $this->conditions);
156
+				$requete .= " WHERE ".implode(" ", $this->conditions);
157 157
 			}
158 158
 
159 159
 			$this->prepare($requete, $values);
@@ -164,10 +164,10 @@  discard block
 block discarded – undo
164 164
 		 * fonction utilisée pour finir un delete
165 165
 		 */
166 166
 		public function del() {
167
-			$requete = $this->req_beginning . implode(",", $this->table);
167
+			$requete = $this->req_beginning.implode(",", $this->table);
168 168
 
169 169
 			if (!empty($this->conditions)) {
170
-				$requete .= " WHERE " . implode(" ", $this->conditions);
170
+				$requete .= " WHERE ".implode(" ", $this->conditions);
171 171
 			}
172 172
 
173 173
 			$this->query($requete);
Please login to merge, or discard this patch.