Completed
Branch master (9d2c3d)
by Fabio
05:26
created
framework/Data/Common/TDbCommandBuilder.php 2 patches
Upper-Lower-Casing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -318,7 +318,7 @@  discard block
 block discarded – undo
318 318
 	{
319 319
 		$table = $this->getTableInfo()->getTableFullName();
320 320
 		$fields = implode(', ', $this -> getSelectFieldList($select));
321
-		$sql = "SELECT {$fields} FROM {$table}";
321
+		$sql = "select {$fields} FROM {$table}";
322 322
 		if (!empty($where)) {
323 323
 			$sql .= " WHERE {$where}";
324 324
 		}
@@ -405,7 +405,7 @@  discard block
 block discarded – undo
405 405
 		if (!empty($where)) {
406 406
 			$where = ' WHERE ' . $where;
407 407
 		}
408
-		$command = $this->createCommand("UPDATE {$table} SET {$fields}" . $where);
408
+		$command = $this->createCommand("update {$table} SET {$fields}" . $where);
409 409
 		$this->bindArrayValues($command, array_merge($data, $parameters));
410 410
 		return $command;
411 411
 	}
Please login to merge, or discard this patch.
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
 	}
47 47
 
48 48
 	/**
49
-	 * @param TDbConnection $value database connection.
49
+	 * @param null|TDbConnection $value database connection.
50 50
 	 */
51 51
 	public function setDbConnection($value)
52 52
 	{
@@ -194,7 +194,7 @@  discard block
 block discarded – undo
194 194
 	 * array('col1' => 'NULL', '*')
195 195
 	 * // SELECT `col1`, `col2`, `col3`, NULL AS `col1` FROM...
196 196
 	 * </code>
197
-	 * @param mixed $data
197
+	 * @param string $data
198 198
 	 * @return array of generated fields - use implode(', ', $selectfieldlist) to collapse field list for usage
199 199
 	 * @since 3.1.7
200 200
 	 * @todo add support for table aliasing
@@ -420,7 +420,7 @@  discard block
 block discarded – undo
420 420
 	/**
421 421
 	 * Returns a list of insert field name and a list of binding names.
422 422
 	 * @param object $values array or object to be inserted.
423
-	 * @return array tuple ($fields, $bindings)
423
+	 * @return string[] tuple ($fields, $bindings)
424 424
 	 */
425 425
 	protected function getInsertFieldBindings($values)
426 426
 	{
Please login to merge, or discard this patch.
framework/Data/Common/Oracle/TOracleMetaData.php 1 patch
Upper-Lower-Casing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
 			TABLE_NAME = '{$tableName}'
98 98
 			AND OWNER = '{$schemaName}'
99 99
 		ORDER BY a.COLUMN_ID
100
-EOD;
100
+eod;
101 101
 		$this->getDbConnection()->setActive(true);
102 102
 		$this->getDbConnection()->setAttribute(PDO::ATTR_CASE, PDO::CASE_LOWER);
103 103
 		$command = $this->getDbConnection()->createCommand($sql);
@@ -161,7 +161,7 @@  discard block
 block discarded – undo
161 161
 		from 	ALL_OBJECTS
162 162
 		where	OBJECT_NAME = '{$tableName}'
163 163
 		and 	OWNER = '{$schemaName}'
164
-EOD;
164
+eod;
165 165
 		$this->getDbConnection()->setActive(true);
166 166
 		$command = $this->getDbConnection()->createCommand($sql);
167 167
 		//$command->bindValue(':schema',$schemaName);
@@ -269,7 +269,7 @@  discard block
 block discarded – undo
269 269
 		and	  a.TABLE_NAME = '{$tableName}'
270 270
 		and   a.OWNER = '{$schemaName}'
271 271
 		and   a.CONSTRAINT_TYPE in ('P','R')
272
-EOD;
272
+eod;
273 273
 		$this->getDbConnection()->setActive(true);
274 274
 		$command = $this->getDbConnection()->createCommand($sql);
275 275
 		//$command->bindValue(':table', $tableName);
@@ -359,13 +359,13 @@  discard block
 block discarded – undo
359 359
 		if ($schema === '') {
360 360
 			$sql = <<<EOD
361 361
 SELECT table_name, '{$schema}' as table_schema FROM user_tables
362
-EOD;
362
+eod;
363 363
 			$command = $this->getDbConnection()->createCommand($sql);
364 364
 		} else {
365 365
 			$sql = <<<EOD
366 366
 SELECT object_name as table_name, owner as table_schema FROM all_objects
367 367
 WHERE object_type = 'TABLE' AND owner=:schema
368
-EOD;
368
+eod;
369 369
 			$command = $this->getDbConnection()->createCommand($sql);
370 370
 			$command->bindParam(':schema', $schema);
371 371
 		}
Please login to merge, or discard this patch.
framework/Data/Common/Mysql/TMysqlMetaData.php 1 patch
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -319,7 +319,7 @@
 block discarded – undo
319 319
 				REFERENCED_TABLE_NAME IS NOT NULL
320 320
 				AND TABLE_NAME LIKE :table
321 321
 				$andSchema
322
-EOD;
322
+eod;
323 323
 		$command = $this->getDbConnection()->createCommand($sql);
324 324
 		$command->bindValue(':table', $tableName);
325 325
 		if ($schemaName !== null) {
Please login to merge, or discard this patch.
framework/Data/Common/Mssql/TMssqlMetaData.php 1 patch
Upper-Lower-Casing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
 												INFORMATION_SCHEMA.COLUMNS c
83 83
 									WHERE t.table_name = c.table_name
84 84
 										AND t.table_name = :table
85
-EOD;
85
+eod;
86 86
 		if ($schemaName !== null) {
87 87
 			$sql .= ' AND t.table_schema = :schema';
88 88
 		}
@@ -208,7 +208,7 @@  discard block
 block discarded – undo
208 208
 		AND
209 209
 			c.constraint_type ='PRIMARY KEY'
210 210
 				AND k.table_name = :table
211
-EOD;
211
+eod;
212 212
 		$command = $this->getDbConnection()->createCommand($sql);
213 213
 		$command->bindValue(':table', $col['TABLE_NAME']);
214 214
 		$primary = [];
@@ -252,7 +252,7 @@  discard block
 block discarded – undo
252 252
 		RC.UNIQUE_CONSTRAINT_NAME
253 253
 			AND KCU2.ORDINAL_POSITION = KCU1.ORDINAL_POSITION
254 254
 		WHERE KCU1.TABLE_NAME = :table
255
-EOD;
255
+eod;
256 256
 		$command = $this->getDbConnection()->createCommand($sql);
257 257
 		$command->bindValue(':table', $col['TABLE_NAME']);
258 258
 		$fkeys = [];
@@ -291,7 +291,7 @@  discard block
 block discarded – undo
291 291
 		$sql = <<<EOD
292 292
 SELECT TABLE_NAME, TABLE_SCHEMA FROM [INFORMATION_SCHEMA].[TABLES]
293 293
 WHERE TABLE_SCHEMA=:schema AND $condition
294
-EOD;
294
+eod;
295 295
 		$command = $this->getDbConnection()->createCommand($sql);
296 296
 		$command->bindParam(":schema", $schema);
297 297
 		$rows = $command->queryAll();
Please login to merge, or discard this patch.
framework/Data/ActiveRecord/Relations/TActiveRecordHasManyAssociation.php 2 patches
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -233,7 +233,7 @@
 block discarded – undo
233 233
 		if (($where = $criteria->getCondition()) === null) {
234 234
 			$where = '1=1';
235 235
 		}
236
-		$sql = "SELECT {$fkTable}.*, {$srcColumns} FROM {$fkTable} {$innerJoin} WHERE {$where}";
236
+		$sql = "select {$fkTable}.*, {$srcColumns} FROM {$fkTable} {$innerJoin} WHERE {$where}";
237 237
 
238 238
 		$parameters = $criteria->getParameters()->toArray();
239 239
 		$ordering = $criteria->getOrdersBy();
Please login to merge, or discard this patch.
Doc Comments   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
 	}
161 161
 
162 162
 	/**
163
-	 * @return TDataGatewayCommand
163
+	 * @return \Prado\Data\DataGateway\TDataGatewayCommand
164 164
 	 */
165 165
 	protected function getCommandBuilder()
166 166
 	{
@@ -168,7 +168,7 @@  discard block
 block discarded – undo
168 168
 	}
169 169
 
170 170
 	/**
171
-	 * @return TDataGatewayCommand
171
+	 * @return \Prado\Data\DataGateway\TDataGatewayCommand
172 172
 	 */
173 173
 	protected function getForeignCommandBuilder()
174 174
 	{
@@ -227,6 +227,7 @@  discard block
 block discarded – undo
227 227
 	 * @param array $foreignKeys field names
228 228
 	 * @param array $indexValues field values
229 229
 	 * @param array $sourceKeys source table column names.
230
+	 * @return \Prado\Data\DataGateway\TDataGatewayCommand
230 231
 	 */
231 232
 	public function createCommand($criteria, $foreignKeys, $indexValues, $sourceKeys)
232 233
 	{
@@ -344,6 +345,9 @@  discard block
 block discarded – undo
344 345
 		return $this->getCommandBuilder()->onExecuteCommand($command, $command->execute()) > 0;
345 346
 	}
346 347
 
348
+	/**
349
+	 * @param TActiveRecord $obj
350
+	 */
347 351
 	private function updateAssociationTable($obj, $fkObjects, $builder)
348 352
 	{
349 353
 		$source = $this->getSourceRecordValues($obj);
Please login to merge, or discard this patch.
framework/Data/ActiveRecord/TActiveRecordInvalidFinderResult.php 1 patch
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,6 +29,6 @@
 block discarded – undo
29 29
  */
30 30
 class TActiveRecordInvalidFinderResult extends \Prado\TEnumerable
31 31
 {
32
-	const Null = 'Null';
32
+	const null = 'Null';
33 33
 	const Exception = 'Exception';
34 34
 }
Please login to merge, or discard this patch.
framework/I18N/core/MessageSource.php 1 patch
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -140,7 +140,7 @@
 block discarded – undo
140 140
 		}
141 141
 
142 142
 		if (is_file($filename) == false) {
143
-			throw new Exception("File $filename not found");
143
+			throw new Exception("file $filename not found");
144 144
 		}
145 145
 
146 146
 		include_once $filename;
Please login to merge, or discard this patch.
framework/Wsat/TWsatScaffoldingGenerator.php 1 patch
Upper-Lower-Casing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
        $pageContent
82 82
 
83 83
 </com:TContent>
84
-EOD;
84
+eod;
85 85
 	}
86 86
 
87 87
 	private function getPageContent($tableName, $type)
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
 {
151 151
 
152 152
 }
153
-EOD;
153
+eod;
154 154
 	}
155 155
 
156 156
 	// </editor-fold>
Please login to merge, or discard this patch.
framework/Wsat/TWsatARGenerator.php 2 patches
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -231,7 +231,7 @@
 block discarded – undo
231 231
 
232 232
 $toString
233 233
 }
234
-EOD;
234
+eod;
235 235
 	}
236 236
 
237 237
 	// </editor-fold>
Please login to merge, or discard this patch.
Doc Comments   +4 added lines patch added patch discarded remove patch
@@ -205,6 +205,10 @@
 block discarded – undo
205 205
 		return $code;
206 206
 	}
207 207
 
208
+	/**
209
+	 * @param string $classname
210
+	 * @param string $toString
211
+	 */
208 212
 	protected function generateClass($properties, $tablename, $classname, $toString)
209 213
 	{
210 214
 		$props = implode("\n", $properties);
Please login to merge, or discard this patch.