@@ -170,6 +170,9 @@ |
||
| 170 | 170 | |
| 171 | 171 | protected $errorMsg; |
| 172 | 172 | |
| 173 | + /** |
|
| 174 | + * @param string $msg |
|
| 175 | + */ |
|
| 173 | 176 | private function displayErrorMsg($msg) { |
| 174 | 177 | $this->errorMsg = $msg; |
| 175 | 178 | $this->content->addFile(dirname(__FILE__)."/../../../../views/installError.php", $this); |
@@ -238,6 +238,9 @@ discard block |
||
| 238 | 238 | } |
| 239 | 239 | } |
| 240 | 240 | |
| 241 | + /** |
|
| 242 | + * @param string $var |
|
| 243 | + */ |
|
| 241 | 244 | public function __get($var) { |
| 242 | 245 | $this->_dbLoadIfNotLoaded(); |
| 243 | 246 | |
@@ -290,6 +293,10 @@ discard block |
||
| 290 | 293 | return isset($this->db_row[$var]); |
| 291 | 294 | } |
| 292 | 295 | |
| 296 | + /** |
|
| 297 | + * @param string $var |
|
| 298 | + * @param string|null $value |
|
| 299 | + */ |
|
| 293 | 300 | public function __set($var, $value) { |
| 294 | 301 | $this->_dbLoadIfNotLoaded(); |
| 295 | 302 | |
@@ -642,7 +649,7 @@ discard block |
||
| 642 | 649 | /** |
| 643 | 650 | * Returns the tables used in the filter in an array. |
| 644 | 651 | * |
| 645 | - * @return array<string> |
|
| 652 | + * @return string[] |
|
| 646 | 653 | */ |
| 647 | 654 | public function getUsedTables() { |
| 648 | 655 | return array($this->db_table_name); |
@@ -166,7 +166,7 @@ |
||
| 166 | 166 | } |
| 167 | 167 | /** |
| 168 | 168 | * Returns the current result's _id |
| 169 | - * @return string The current result's _id as a string. |
|
| 169 | + * @return integer The current result's _id as a string. |
|
| 170 | 170 | */ |
| 171 | 171 | public function key() |
| 172 | 172 | { |
@@ -711,10 +711,10 @@ discard block |
||
| 711 | 711 | |
| 712 | 712 | /** |
| 713 | 713 | * Returns a generator for the database. |
| 714 | - * @param unknown $result |
|
| 714 | + * @param \PDOStatement $result |
|
| 715 | 715 | * @param unknown $table_name |
| 716 | - * @param unknown $className |
|
| 717 | - * @param unknown $sql |
|
| 716 | + * @param string $className |
|
| 717 | + * @param string $sql |
|
| 718 | 718 | */ |
| 719 | 719 | private function getObjectsFromSQLGenerator($result, $table_name, $className, $sql) { |
| 720 | 720 | $keysStandardCased = array(); |
@@ -1100,7 +1100,7 @@ discard block |
||
| 1100 | 1100 | * @param unknown_type $target_tables |
| 1101 | 1101 | * @param unknown_type $path |
| 1102 | 1102 | * @param unknown_type $queue |
| 1103 | - * @return unknown |
|
| 1103 | + * @return boolean |
|
| 1104 | 1104 | */ |
| 1105 | 1105 | private function find_paths_iter(&$target_tables, &$path, &$queue) { |
| 1106 | 1106 | // Get table to look at: |
@@ -1569,7 +1569,7 @@ discard block |
||
| 1569 | 1569 | * Takes in input a filter_bag (which can be about anything from a string to an array of TDBMObjects... see above from documentation), |
| 1570 | 1570 | * and gives back a proper Filter object. |
| 1571 | 1571 | * |
| 1572 | - * @param unknown_type $filter_bag |
|
| 1572 | + * @param unknown_type|null $filter_bag |
|
| 1573 | 1573 | * @return FilterInterface |
| 1574 | 1574 | */ |
| 1575 | 1575 | public function buildFilterFromFilterBag($filter_bag) { |
@@ -1634,7 +1634,7 @@ discard block |
||
| 1634 | 1634 | * Takes in input an order_bag (which can be about anything from a string to an array of OrderByColumn objects... see above from documentation), |
| 1635 | 1635 | * and gives back an array of OrderByColumn / OrderBySQLString objects. |
| 1636 | 1636 | * |
| 1637 | - * @param unknown_type $orderby_bag |
|
| 1637 | + * @param unknown_type|null $orderby_bag |
|
| 1638 | 1638 | * @return array |
| 1639 | 1639 | */ |
| 1640 | 1640 | public function buildOrderArrayFromOrderBag($orderby_bag) { |
@@ -1851,7 +1851,7 @@ discard block |
||
| 1851 | 1851 | * @param bool $support If the generated daos should keep support for old functions (eg : getUserList and getList) |
| 1852 | 1852 | * @param bool $storeInUtc If the generated daos should store the date in UTC timezone instead of user's timezone. |
| 1853 | 1853 | * @param bool $castDatesToDateTime |
| 1854 | - * @return \string[] the list of tables |
|
| 1854 | + * @return string[] the list of tables |
|
| 1855 | 1855 | */ |
| 1856 | 1856 | public function generateAllDaosAndBeans($daoFactoryClassName, $daonamespace, $beannamespace, $support, $storeInUtc, $castDatesToDateTime) { |
| 1857 | 1857 | $tdbmDaoGenerator = new TDBMDaoGenerator($this->dbConnection); |
@@ -56,7 +56,7 @@ discard block |
||
| 56 | 56 | * @param bool $support If the generated daos should keep support for old functions (eg : getUserList and getList) |
| 57 | 57 | * @param bool $storeInUtc If the generated daos should store the date in UTC timezone instead of user's timezone. |
| 58 | 58 | * @param bool $castDatesToDateTime Whether dates are converted to DateTimeImmutable or to timestamp |
| 59 | - * @return \string[] the list of tables |
|
| 59 | + * @return string[] the list of tables |
|
| 60 | 60 | * @throws TDBMException |
| 61 | 61 | */ |
| 62 | 62 | public function generateAllDaosAndBeans($daoFactoryClassName, $daonamespace, $beannamespace, $support, $storeInUtc, $castDatesToDateTime) { |
@@ -84,7 +84,12 @@ discard block |
||
| 84 | 84 | /** |
| 85 | 85 | * Generates in one method call the daos and the beans for one table. |
| 86 | 86 | * |
| 87 | - * @param $tableName |
|
| 87 | + * @param string $tableName |
|
| 88 | + * @param string $daonamespace |
|
| 89 | + * @param string $beannamespace |
|
| 90 | + * @param boolean $support |
|
| 91 | + * @param boolean $storeInUtc |
|
| 92 | + * @param boolean $castDatesToDateTime |
|
| 88 | 93 | */ |
| 89 | 94 | public function generateDaoAndBean($tableName, $daonamespace, $beannamespace, ClassNameMapper $classNameMapper, $support, $storeInUtc, $castDatesToDateTime) { |
| 90 | 95 | $daoName = $this->getDaoNameFromTableName($tableName); |
@@ -412,9 +417,10 @@ discard block |
||
| 412 | 417 | /** |
| 413 | 418 | * Writes the PHP bean DAO with simple functions to create/get/save objects. |
| 414 | 419 | * |
| 415 | - * @param string $fileName The file that will be written (without the directory) |
|
| 416 | 420 | * @param string $className The name of the class |
| 417 | 421 | * @param string $tableName The name of the table |
| 422 | + * @param string $baseClassName |
|
| 423 | + * @param string $beanClassName |
|
| 418 | 424 | */ |
| 419 | 425 | public function generateDao($className, $baseClassName, $beanClassName, $tableName, ClassNameMapper $classNameMapper, $support) { |
| 420 | 426 | $info = $this->dbConnection->getTableInfo($tableName); |
@@ -702,7 +708,9 @@ discard block |
||
| 702 | 708 | /** |
| 703 | 709 | * Generates the factory bean. |
| 704 | 710 | * |
| 705 | - * @param $tableList |
|
| 711 | + * @param string[] $tableList |
|
| 712 | + * @param string $daoFactoryClassName |
|
| 713 | + * @param string $daoNamespace |
|
| 706 | 714 | */ |
| 707 | 715 | private function generateFactory($tableList, $daoFactoryClassName, $daoNamespace, ClassNameMapper $classNameMapper) { |
| 708 | 716 | // For each table, let's write a property. |
@@ -774,7 +782,6 @@ discard block |
||
| 774 | 782 | * Transforms the property name in a setter name. |
| 775 | 783 | * For instance, phone => getPhone or name => getName |
| 776 | 784 | * |
| 777 | - * @param string $methodName |
|
| 778 | 785 | * @return string |
| 779 | 786 | */ |
| 780 | 787 | public static function getSetterNameForPropertyName($propertyName) { |
@@ -854,7 +861,7 @@ discard block |
||
| 854 | 861 | * Tries to put string to the singular form (if it is plural). |
| 855 | 862 | * Obviously, this can't be perfect, be we do the best we can. |
| 856 | 863 | * |
| 857 | - * @param $str string |
|
| 864 | + * @param string $str string |
|
| 858 | 865 | * @return string |
| 859 | 866 | */ |
| 860 | 867 | public static function toSingular($str) { |
@@ -875,7 +882,7 @@ discard block |
||
| 875 | 882 | * Put the first letter of the string in lower case. |
| 876 | 883 | * Very useful to transform a class name into a variable name. |
| 877 | 884 | * |
| 878 | - * @param $str string |
|
| 885 | + * @param string $str string |
|
| 879 | 886 | * @return string |
| 880 | 887 | */ |
| 881 | 888 | public static function toVariableName($str) { |