@@ -59,7 +59,7 @@ discard block |
||
| 59 | 59 | * |
| 60 | 60 | * @throws TDBMException |
| 61 | 61 | * |
| 62 | - * @return \string[] the list of tables |
|
| 62 | + * @return string[] the list of tables |
|
| 63 | 63 | */ |
| 64 | 64 | public function generateAllDaosAndBeans($daoFactoryClassName, $daonamespace, $beannamespace, $support, $storeInUtc, $castDatesToDateTime) |
| 65 | 65 | { |
@@ -87,7 +87,12 @@ discard block |
||
| 87 | 87 | /** |
| 88 | 88 | * Generates in one method call the daos and the beans for one table. |
| 89 | 89 | * |
| 90 | - * @param $tableName |
|
| 90 | + * @param string $tableName |
|
| 91 | + * @param string $daonamespace |
|
| 92 | + * @param string $beannamespace |
|
| 93 | + * @param boolean $support |
|
| 94 | + * @param boolean $storeInUtc |
|
| 95 | + * @param boolean $castDatesToDateTime |
|
| 91 | 96 | */ |
| 92 | 97 | public function generateDaoAndBean($tableName, $daonamespace, $beannamespace, ClassNameMapper $classNameMapper, $support, $storeInUtc, $castDatesToDateTime) |
| 93 | 98 | { |
@@ -415,9 +420,10 @@ discard block |
||
| 415 | 420 | /** |
| 416 | 421 | * Writes the PHP bean DAO with simple functions to create/get/save objects. |
| 417 | 422 | * |
| 418 | - * @param string $fileName The file that will be written (without the directory) |
|
| 419 | 423 | * @param string $className The name of the class |
| 420 | 424 | * @param string $tableName The name of the table |
| 425 | + * @param string $baseClassName |
|
| 426 | + * @param string $beanClassName |
|
| 421 | 427 | */ |
| 422 | 428 | public function generateDao($className, $baseClassName, $beanClassName, $tableName, ClassNameMapper $classNameMapper, $support) |
| 423 | 429 | { |
@@ -706,7 +712,9 @@ discard block |
||
| 706 | 712 | /** |
| 707 | 713 | * Generates the factory bean. |
| 708 | 714 | * |
| 709 | - * @param $tableList |
|
| 715 | + * @param string[] $tableList |
|
| 716 | + * @param string $daoFactoryClassName |
|
| 717 | + * @param string $daoNamespace |
|
| 710 | 718 | */ |
| 711 | 719 | private function generateFactory($tableList, $daoFactoryClassName, $daoNamespace, ClassNameMapper $classNameMapper) |
| 712 | 720 | { |
@@ -778,7 +786,6 @@ discard block |
||
| 778 | 786 | * Transforms the property name in a setter name. |
| 779 | 787 | * For instance, phone => getPhone or name => getName. |
| 780 | 788 | * |
| 781 | - * @param string $methodName |
|
| 782 | 789 | * |
| 783 | 790 | * @return string |
| 784 | 791 | */ |
@@ -874,7 +881,7 @@ discard block |
||
| 874 | 881 | * Tries to put string to the singular form (if it is plural). |
| 875 | 882 | * Obviously, this can't be perfect, be we do the best we can. |
| 876 | 883 | * |
| 877 | - * @param $str string |
|
| 884 | + * @param string $str string |
|
| 878 | 885 | * |
| 879 | 886 | * @return string |
| 880 | 887 | */ |
@@ -898,7 +905,7 @@ discard block |
||
| 898 | 905 | * Put the first letter of the string in lower case. |
| 899 | 906 | * Very useful to transform a class name into a variable name. |
| 900 | 907 | * |
| 901 | - * @param $str string |
|
| 908 | + * @param string $str string |
|
| 902 | 909 | * |
| 903 | 910 | * @return string |
| 904 | 911 | */ |
@@ -863,7 +863,7 @@ discard block |
||
| 863 | 863 | $pos = strpos($str, ' '); |
| 864 | 864 | } |
| 865 | 865 | $before = substr($str, 0, $pos); |
| 866 | - $after = substr($str, $pos + 1); |
|
| 866 | + $after = substr($str, $pos+1); |
|
| 867 | 867 | $str = $before.strtoupper(substr($after, 0, 1)).substr($after, 1); |
| 868 | 868 | } |
| 869 | 869 | |
@@ -881,14 +881,14 @@ discard block |
||
| 881 | 881 | public static function toSingular($str) |
| 882 | 882 | { |
| 883 | 883 | // First, ignore "ss" words (like access). |
| 884 | - if (strpos($str, 'ss', strlen($str) - 2) !== false) { |
|
| 884 | + if (strpos($str, 'ss', strlen($str)-2) !== false) { |
|
| 885 | 885 | return $str; |
| 886 | 886 | } |
| 887 | 887 | |
| 888 | 888 | // Now, let's see if the string ends with s: |
| 889 | - if (strpos($str, 's', strlen($str) - 1) !== false) { |
|
| 889 | + if (strpos($str, 's', strlen($str)-1) !== false) { |
|
| 890 | 890 | // Yes? Let's remove the s. |
| 891 | - return substr($str, 0, strlen($str) - 1); |
|
| 891 | + return substr($str, 0, strlen($str)-1); |
|
| 892 | 892 | } |
| 893 | 893 | |
| 894 | 894 | return $str; |