@@ -515,7 +515,7 @@ |
||
| 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); |
@@ -138,9 +138,7 @@ discard block |
||
| 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 |
||
| 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); |
@@ -328,7 +328,7 @@ |
||
| 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); |
@@ -63,6 +63,9 @@ discard block |
||
| 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 |
||
| 108 | 111 | } |
| 109 | 112 | |
| 110 | 113 | /** |
| 111 | - * @return int |
|
| 114 | + * @return double |
|
| 112 | 115 | */ |
| 113 | 116 | public function getCurrentPage() |
| 114 | 117 | { |
@@ -35,6 +35,9 @@ discard block |
||
| 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 |
||
| 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); |
@@ -27,8 +27,7 @@ |
||
| 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; |
@@ -46,7 +46,6 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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. |
@@ -230,7 +230,7 @@ |
||
| 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 | } |
@@ -441,10 +441,11 @@ discard block |
||
| 441 | 441 | /*$data =*/ $this->connection->getTableInfo($table_name); |
| 442 | 442 | } catch (TDBMException $exception) { |
| 443 | 443 | $probable_table_name = $this->connection->checkTableExist($table_name); |
| 444 | - if ($probable_table_name == null) |
|
| 445 | - throw new TDBMException("Error while calling TDBMObject::getNewObject(): The table named '$table_name' does not exist."); |
|
| 446 | - else |
|
| 447 | - throw new TDBMException("Error while calling TDBMObject::getNewObject(): The table named '$table_name' does not exist. Maybe you meant the table '$probable_table_name'."); |
|
| 444 | + if ($probable_table_name == null) { |
|
| 445 | + throw new TDBMException("Error while calling TDBMObject::getNewObject(): The table named '$table_name' does not exist."); |
|
| 446 | + } else { |
|
| 447 | + throw new TDBMException("Error while calling TDBMObject::getNewObject(): The table named '$table_name' does not exist. Maybe you meant the table '$probable_table_name'."); |
|
| 448 | + } |
|
| 448 | 449 | } |
| 449 | 450 | |
| 450 | 451 | if ($className === null) { |
@@ -886,8 +887,9 @@ discard block |
||
| 886 | 887 | // Fourth, let's apply the same steps to the orderby_bag |
| 887 | 888 | // 4-1 orderby_bag should be an array, if it is a singleton, let's put it in an array. |
| 888 | 889 | |
| 889 | - if (!is_array($orderby_bag)) |
|
| 890 | - $orderby_bag = array($orderby_bag); |
|
| 890 | + if (!is_array($orderby_bag)) { |
|
| 891 | + $orderby_bag = array($orderby_bag); |
|
| 892 | + } |
|
| 891 | 893 | |
| 892 | 894 | // 4-2, let's take all the objects out of the orderby bag, and let's make objects from them |
| 893 | 895 | $orderby_bag2 = array(); |
@@ -985,7 +985,7 @@ discard block |
||
| 985 | 985 | * This is used internally by TDBM to add an object to the list of objects that have been |
| 986 | 986 | * created/updated but not saved yet. |
| 987 | 987 | * |
| 988 | - * @param AbstractTDBMObject $myObject |
|
| 988 | + * @param DbRow $myObject |
|
| 989 | 989 | */ |
| 990 | 990 | public function _addToToSaveObjectList(DbRow $myObject) { |
| 991 | 991 | $this->toSaveObjects[] = $myObject; |
@@ -1621,7 +1621,7 @@ discard block |
||
| 1621 | 1621 | } |
| 1622 | 1622 | |
| 1623 | 1623 | /** |
| 1624 | - * @param $table |
|
| 1624 | + * @param string $table |
|
| 1625 | 1625 | * @param array $primaryKeys |
| 1626 | 1626 | * @param array $additionalTablesFetch |
| 1627 | 1627 | * @param bool $lazy Whether to perform lazy loading on this object or not. |
@@ -1778,7 +1778,7 @@ discard block |
||
| 1778 | 1778 | /** |
| 1779 | 1779 | * @param $pivotTableName |
| 1780 | 1780 | * @param AbstractTDBMObject $bean |
| 1781 | - * @return AbstractTDBMObject[] |
|
| 1781 | + * @return ResultIterator |
|
| 1782 | 1782 | */ |
| 1783 | 1783 | public function _getRelatedBeans($pivotTableName, AbstractTDBMObject $bean) { |
| 1784 | 1784 | |
@@ -70,6 +70,13 @@ discard block |
||
| 70 | 70 | |
| 71 | 71 | private $mode; |
| 72 | 72 | |
| 73 | + /** |
|
| 74 | + * @param string $magicSql |
|
| 75 | + * @param string $magicSqlCount |
|
| 76 | + * @param WeakrefObjectStorage $objectStorage |
|
| 77 | + * @param string|null $className |
|
| 78 | + * @param integer $mode |
|
| 79 | + */ |
|
| 73 | 80 | public function __construct($magicSql, $magicSqlCount, array $parameters, array $columnDescriptors, $objectStorage, $className, TDBMService $tdbmService, MagicQuery $magicQuery, $mode) |
| 74 | 81 | { |
| 75 | 82 | $this->magicSql = $magicSql; |
@@ -166,6 +173,7 @@ discard block |
||
| 166 | 173 | |
| 167 | 174 | /** |
| 168 | 175 | * @param int $offset |
| 176 | + * @param integer $limit |
|
| 169 | 177 | * @return PageIterator |
| 170 | 178 | */ |
| 171 | 179 | public function take($offset, $limit) |