Completed
Pull Request — 3.4 (#46)
by David
07:34 queued 01:29
created
src/Mouf/Database/TDBM/AbstractTDBMObject.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -515,7 +515,7 @@
 block discarded – undo
515 515
 	/**
516 516
 	 * Returns the tables used in the filter in an array.
517 517
 	 *
518
-	 * @return array<string>
518
+	 * @return integer[]
519 519
 	 */
520 520
 	public function getUsedTables() {
521 521
 		return array_keys($this->dbRows);
Please login to merge, or discard this patch.
src/Mouf/Database/TDBM/Controllers/TdbmInstallController.php 1 patch
Doc Comments   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -138,9 +138,7 @@  discard block
 block discarded – undo
138 138
 	 * @Action
139 139
 	 * @param string $daonamespace
140 140
 	 * @param string $beannamespace
141
-	 * @param int $keepSupport
142 141
 	 * @param int $storeInUtc
143
-	 * @param int $castDatesToDateTime
144 142
 	 * @param string $selfedit
145 143
 	 * @throws \Mouf\MoufException
146 144
 	 */
@@ -168,6 +166,9 @@  discard block
 block discarded – undo
168 166
 	
169 167
 	protected $errorMsg;
170 168
 	
169
+	/**
170
+	 * @param string $msg
171
+	 */
171 172
 	private function displayErrorMsg($msg) {
172 173
 		$this->errorMsg = $msg;
173 174
 		$this->content->addFile(dirname(__FILE__)."/../../../../views/installError.php", $this);
Please login to merge, or discard this patch.
src/Mouf/Database/TDBM/DbRow.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -328,7 +328,7 @@
 block discarded – undo
328 328
 	/**
329 329
 	 * Returns the tables used in the filter in an array.
330 330
 	 *
331
-	 * @return array<string>
331
+	 * @return string[]
332 332
 	 */
333 333
 	public function getUsedTables() {
334 334
 		return array($this->dbTableName);
Please login to merge, or discard this patch.
src/Mouf/Database/TDBM/PageIterator.php 1 patch
Doc Comments   +4 added lines, -1 removed lines patch added patch discarded remove patch
@@ -63,6 +63,9 @@  discard block
 block discarded – undo
63 63
 
64 64
 	private $innerResultIterator;
65 65
 
66
+	/**
67
+	 * @param integer $offset
68
+	 */
66 69
 	public function __construct(ResultIterator $parentResult, $magicSql, array $parameters, $limit, $offset, array $columnDescriptors, $objectStorage, $className, TDBMService $tdbmService, MagicQuery $magicQuery, $mode)
67 70
 	{
68 71
 		$this->parentResult = $parentResult;
@@ -108,7 +111,7 @@  discard block
 block discarded – undo
108 111
 	}
109 112
 
110 113
 	/**
111
-	 * @return int
114
+	 * @return double
112 115
 	 */
113 116
 	public function getCurrentPage()
114 117
 	{
Please login to merge, or discard this patch.
src/Mouf/Database/TDBM/TDBMObject.php 1 patch
Doc Comments   +7 added lines patch added patch discarded remove patch
@@ -35,6 +35,9 @@  discard block
 block discarded – undo
35 35
 class TDBMObject extends AbstractTDBMObject implements \ArrayAccess, \Iterator
36 36
 {
37 37
 
38
+    /**
39
+     * @param string $var
40
+     */
38 41
     public function __get($var)
39 42
     {
40 43
         return $this->get($var);
@@ -51,6 +54,10 @@  discard block
 block discarded – undo
51 54
         return $this->has($var);
52 55
     }
53 56
 
57
+    /**
58
+     * @param string $var
59
+     * @param string|null $value
60
+     */
54 61
     public function __set($var, $value)
55 62
     {
56 63
         $this->set($var, $value);
Please login to merge, or discard this patch.
src/Mouf/Database/TDBM/Utils/ScalarBeanPropertyDescriptor.php 1 patch
Doc Comments   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -27,8 +27,7 @@
 block discarded – undo
27 27
     /**
28 28
      * Returns the foreignkey the column is part of, if any. null otherwise.
29 29
      *
30
-     * @param Column $column
31
-     * @return ForeignKeyConstraint|null
30
+     * @return boolean
32 31
      */
33 32
     public function getForeignKey() {
34 33
         return false;
Please login to merge, or discard this patch.
src/Mouf/Database/TDBM/Utils/TDBMDaoGenerator.php 2 patches
Doc Comments   +11 added lines, -6 removed lines patch added patch discarded remove patch
@@ -46,7 +46,6 @@  discard block
 block discarded – undo
46 46
     /**
47 47
      * Constructor.
48 48
      *
49
-     * @param Connection $dbConnection The connection to the database.
50 49
      */
51 50
     public function __construct(SchemaAnalyzer $schemaAnalyzer, Schema $schema, TDBMSchemaAnalyzer $tdbmSchemaAnalyzer) {
52 51
         $this->schemaAnalyzer = $schemaAnalyzer;
@@ -99,6 +98,9 @@  discard block
 block discarded – undo
99 98
      * Generates in one method call the daos and the beans for one table.
100 99
      * 
101 100
      * @param $tableName
101
+     * @param string $daonamespace
102
+     * @param string $beannamespace
103
+     * @param boolean $storeInUtc
102 104
      */
103 105
     public function generateDaoAndBean(Table $table, $daonamespace, $beannamespace, ClassNameMapper $classNameMapper, $storeInUtc) {
104 106
 		$tableName = $table->getName();
@@ -134,7 +136,7 @@  discard block
 block discarded – undo
134 136
     /**
135 137
      * Returns the name of the base bean class from the table name.
136 138
      * 
137
-     * @param $tableName
139
+     * @param string $tableName
138 140
      * @return string
139 141
      */
140 142
     public static function getBaseBeanNameFromTableName($tableName) {
@@ -144,7 +146,7 @@  discard block
 block discarded – undo
144 146
     /**
145 147
      * Returns the name of the base DAO class from the table name.
146 148
      *
147
-     * @param $tableName
149
+     * @param string $tableName
148 150
      * @return string
149 151
      */
150 152
     public static function getBaseDaoNameFromTableName($tableName) {
@@ -156,7 +158,7 @@  discard block
 block discarded – undo
156 158
      *
157 159
      * @param string $className The name of the class
158 160
      * @param string $baseClassName The name of the base class which will be extended (name only, no directory)
159
-     * @param string $tableName The name of the table
161
+     * @param string $table The name of the table
160 162
      * @param string $beannamespace The namespace of the bean
161 163
      * @param ClassNameMapper $classNameMapper
162 164
      * @throws TDBMException
@@ -214,9 +216,10 @@  discard block
 block discarded – undo
214 216
     /**
215 217
      * Writes the PHP bean DAO with simple functions to create/get/save objects.
216 218
      *
217
-     * @param string $fileName The file that will be written (without the directory)
218 219
      * @param string $className The name of the class
219
-     * @param string $tableName The name of the table
220
+     * @param string $table The name of the table
221
+     * @param string $baseClassName
222
+     * @param string $beanClassName
220 223
      */
221 224
     public function generateDao($className, $baseClassName, $beanClassName, Table $table, $daonamespace, $beannamespace, ClassNameMapper $classNameMapper) {
222 225
         $tableName = $table->getName();
@@ -458,6 +461,8 @@  discard block
 block discarded – undo
458 461
      * Generates the factory bean.
459 462
      * 
460 463
      * @param Table[] $tableList
464
+     * @param string $daoFactoryClassName
465
+     * @param string $daoNamespace
461 466
      */
462 467
     private function generateFactory(array $tableList, $daoFactoryClassName, $daoNamespace, ClassNameMapper $classNameMapper) {
463 468
         // For each table, let's write a property.
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -230,7 +230,7 @@
 block discarded – undo
230 230
                 $defaultSort = $data['column_name'];
231 231
                 if (count($matches == 3)){
232 232
                     $defaultSortDirection = $matches[2];
233
-                }else{
233
+                } else{
234 234
                     $defaultSortDirection = 'ASC';
235 235
                 }
236 236
             }
Please login to merge, or discard this patch.
src/Mouf/Database/TDBM/Filters/OrderBySQLString.php 1 patch
Braces   +19 added lines, -14 removed lines patch added patch discarded remove patch
@@ -87,8 +87,9 @@  discard block
 block discarded – undo
87 87
 			while (true) {
88 88
 				$result = strrpos($phrase, "'", $result+1);
89 89
 				if ($result===false) {
90
-					if ($sentence!='')
91
-					$sentence .= ',';
90
+					if ($sentence!='') {
91
+										$sentence .= ',';
92
+					}
92 93
 					$sentence .= $phrase;
93 94
 
94 95
 					if ($is_inside_quotes) {
@@ -98,15 +99,15 @@  discard block
 block discarded – undo
98 99
 						$sentence = '';
99 100
 						break;
100 101
 					}
101
-				}
102
-				else
102
+				} else
103 103
 				{
104 104
 					$valid_result = true;
105 105
 					if ($result>0 && $phrase{$result-1}=='\\') {
106 106
 						$valid_result = false;
107 107
 					}
108
-					if ($valid_result)
109
-					$is_inside_quotes = !$is_inside_quotes;
108
+					if ($valid_result) {
109
+										$is_inside_quotes = !$is_inside_quotes;
110
+					}
110 111
 				}
111 112
 			}
112 113
 
@@ -132,23 +133,27 @@  discard block
 block discarded – undo
132 133
 		// Now, let's split the string using '
133 134
 		$work_table = explode("'", $work_str);
134 135
 
135
-		if (count($work_table) == 0)
136
-		    return '';
136
+		if (count($work_table) == 0) {
137
+				    return '';
138
+		}
137 139
 
138 140
 		// if we start with a ', let's remove the first text
139
-		if (strstr($work_str,"'") === 0)
140
-		    array_shift($work_table);
141
+		if (strstr($work_str,"'") === 0) {
142
+				    array_shift($work_table);
143
+		}
141 144
 			
142
-		if (count($work_table) == 0)
143
-		    return '';
145
+		if (count($work_table) == 0) {
146
+				    return '';
147
+		}
144 148
 
145 149
 		// Now, let's take only the stuff outside the quotes.
146 150
 		$work_str2 = '';
147 151
 
148 152
 		$i = 0;
149 153
 		foreach ($work_table as $str_fragment) {
150
-			if (($i % 2) == 0)
151
-			$work_str2 .= $str_fragment.' ';
154
+			if (($i % 2) == 0) {
155
+						$work_str2 .= $str_fragment.' ';
156
+			}
152 157
 			$i++;
153 158
 		}
154 159
 
Please login to merge, or discard this patch.
src/Mouf/Database/TDBM/Filters/SqlStringFilter.php 1 patch
Braces   +12 added lines, -8 removed lines patch added patch discarded remove patch
@@ -99,23 +99,27 @@
 block discarded – undo
99 99
 		// Now, let's split the string using '
100 100
 		$work_table = explode("'", $work_str);
101 101
 
102
-		if (count($work_table)==0)
103
-		return '';
102
+		if (count($work_table)==0) {
103
+				return '';
104
+		}
104 105
 
105 106
 		// if we start with a ', let's remove the first text
106
-		if (strstr($work_str,"'")===0)
107
-		array_shift($work_table);
107
+		if (strstr($work_str,"'")===0) {
108
+				array_shift($work_table);
109
+		}
108 110
 			
109
-		if (count($work_table)==0)
110
-		return '';
111
+		if (count($work_table)==0) {
112
+				return '';
113
+		}
111 114
 
112 115
 		// Now, let's take only the stuff outside the quotes.
113 116
 		$work_str2 = '';
114 117
 
115 118
 		$i=0;
116 119
 		foreach ($work_table as $str_fragment) {
117
-			if (($i % 2) == 0)
118
-			$work_str2 .= $str_fragment.' ';
120
+			if (($i % 2) == 0) {
121
+						$work_str2 .= $str_fragment.' ';
122
+			}
119 123
 			$i++;
120 124
 		}
121 125
 
Please login to merge, or discard this patch.