@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | class TDBMObjectArray extends \ArrayObject implements \JsonSerializable { |
29 | 29 | public function __get($var) { |
30 | 30 | $cnt = count($this); |
31 | - if ($cnt==1) |
|
31 | + if ($cnt == 1) |
|
32 | 32 | { |
33 | 33 | return $this[0]->__get($var); |
34 | 34 | } |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | |
45 | 45 | public function __set($var, $value) { |
46 | 46 | $cnt = count($this); |
47 | - if ($cnt==1) |
|
47 | + if ($cnt == 1) |
|
48 | 48 | { |
49 | 49 | return $this[0]->__set($var, $value); |
50 | 50 | } |
@@ -69,13 +69,13 @@ discard block |
||
69 | 69 | */ |
70 | 70 | public function __call($func_name, $values) { |
71 | 71 | |
72 | - if (strpos($func_name,"getarray_") === 0) { |
|
72 | + if (strpos($func_name, "getarray_") === 0) { |
|
73 | 73 | $column = substr($func_name, 9); |
74 | 74 | return $this->getarray($column); |
75 | - } elseif (strpos($func_name,"setarray_") === 0) { |
|
75 | + } elseif (strpos($func_name, "setarray_") === 0) { |
|
76 | 76 | $column = substr($func_name, 9); |
77 | 77 | return $this->setarray($column, $values[0]); |
78 | - } elseif (count($this)==1) { |
|
78 | + } elseif (count($this) == 1) { |
|
79 | 79 | $this[0]->__call($func_name, $values); |
80 | 80 | } |
81 | 81 | else |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | } |
100 | 100 | } |
101 | 101 | |
102 | - public function jsonSerialize(){ |
|
102 | + public function jsonSerialize() { |
|
103 | 103 | return (array) $this; |
104 | 104 | } |
105 | 105 | } |
@@ -85,7 +85,7 @@ |
||
85 | 85 | * @param string $columnName |
86 | 86 | * @param string $value |
87 | 87 | */ |
88 | - public function __construct($tableName=null, $columnName=null, $value=null) { |
|
88 | + public function __construct($tableName = null, $columnName = null, $value = null) { |
|
89 | 89 | $this->tableName = $tableName; |
90 | 90 | $this->columnName = $columnName; |
91 | 91 | $this->value = $value; |
@@ -85,7 +85,7 @@ |
||
85 | 85 | * @param string $columnName |
86 | 86 | * @param string $value |
87 | 87 | */ |
88 | - public function __construct($tableName=null, $columnName=null, $value=null) { |
|
88 | + public function __construct($tableName = null, $columnName = null, $value = null) { |
|
89 | 89 | $this->tableName = $tableName; |
90 | 90 | $this->columnName = $columnName; |
91 | 91 | $this->value = $value; |
@@ -85,7 +85,7 @@ |
||
85 | 85 | * @param string $columnName |
86 | 86 | * @param string $value |
87 | 87 | */ |
88 | - public function __construct($tableName=null, $columnName=null, $value=null) { |
|
88 | + public function __construct($tableName = null, $columnName = null, $value = null) { |
|
89 | 89 | $this->tableName = $tableName; |
90 | 90 | $this->columnName = $columnName; |
91 | 91 | $this->value = $value; |
@@ -85,7 +85,7 @@ |
||
85 | 85 | * @param string $columnName |
86 | 86 | * @param string $value |
87 | 87 | */ |
88 | - public function __construct($tableName=null, $columnName=null, $value=null) { |
|
88 | + public function __construct($tableName = null, $columnName = null, $value = null) { |
|
89 | 89 | $this->tableName = $tableName; |
90 | 90 | $this->columnName = $columnName; |
91 | 91 | $this->value = $value; |
@@ -85,7 +85,7 @@ |
||
85 | 85 | * @param string $columnName |
86 | 86 | * @param string $value |
87 | 87 | */ |
88 | - public function __construct($tableName=null, $columnName=null, $value=null) { |
|
88 | + public function __construct($tableName = null, $columnName = null, $value = null) { |
|
89 | 89 | $this->tableName = $tableName; |
90 | 90 | $this->columnName = $columnName; |
91 | 91 | $this->value = $value; |
@@ -85,7 +85,7 @@ |
||
85 | 85 | * @param string $columnName |
86 | 86 | * @param string $value |
87 | 87 | */ |
88 | - public function __construct($tableName=null, $columnName=null, $value=null) { |
|
88 | + public function __construct($tableName = null, $columnName = null, $value = null) { |
|
89 | 89 | $this->tableName = $tableName; |
90 | 90 | $this->columnName = $columnName; |
91 | 91 | $this->value = $value; |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | * @Action |
43 | 43 | * //@Admin |
44 | 44 | */ |
45 | - public function defaultAction($name, $selfedit="false") { |
|
45 | + public function defaultAction($name, $selfedit = "false") { |
|
46 | 46 | $this->initController($name, $selfedit); |
47 | 47 | |
48 | 48 | // Fill variables |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | * @param string $name |
94 | 94 | * @param bool $selfedit |
95 | 95 | */ |
96 | - public function generate($name, $daonamespace, $beannamespace, $daofactoryclassname, $daofactoryinstancename, $keepSupport = 0, $storeInUtc = 0, $castDatesToDateTime = 0, $selfedit="false") { |
|
96 | + public function generate($name, $daonamespace, $beannamespace, $daofactoryclassname, $daofactoryinstancename, $keepSupport = 0, $storeInUtc = 0, $castDatesToDateTime = 0, $selfedit = "false") { |
|
97 | 97 | $this->initController($name, $selfedit); |
98 | 98 | |
99 | 99 | self::generateDaos($this->moufManager, $name, $daonamespace, $beannamespace, $daofactoryclassname, $daofactoryinstancename, $selfedit, $keepSupport, $storeInUtc, $castDatesToDateTime); |
@@ -116,7 +116,7 @@ discard block |
||
116 | 116 | * @param bool $castDatesToDateTime |
117 | 117 | * @throws \Mouf\MoufException |
118 | 118 | */ |
119 | - public static function generateDaos(MoufManager $moufManager, $name, $daonamespace, $beannamespace, $daofactoryclassname, $daofactoryinstancename, $selfedit="false", $keepSupport = null, $storeInUtc = null, $castDatesToDateTime = null) { |
|
119 | + public static function generateDaos(MoufManager $moufManager, $name, $daonamespace, $beannamespace, $daofactoryclassname, $daofactoryinstancename, $selfedit = "false", $keepSupport = null, $storeInUtc = null, $castDatesToDateTime = null) { |
|
120 | 120 | $moufManager->setVariable("tdbmDefaultDaoNamespace_".$name, $daonamespace); |
121 | 121 | $moufManager->setVariable("tdbmDefaultBeanNamespace_".$name, $beannamespace); |
122 | 122 | $moufManager->setVariable("tdbmDefaultDaoFactoryName_".$name, $daofactoryclassname); |
@@ -167,7 +167,7 @@ discard block |
||
167 | 167 | $moufManager->bindComponentViaSetter($instanceName, "setTdbmService", $name); |
168 | 168 | $moufManager->bindComponentViaSetter($daofactoryinstancename, "set".$daoName, $instanceName); |
169 | 169 | |
170 | - $tableToBeanMap[$table] = $beannamespace . "\\" . TDBMDaoGenerator::getBeanNameFromTableName($table); |
|
170 | + $tableToBeanMap[$table] = $beannamespace."\\".TDBMDaoGenerator::getBeanNameFromTableName($table); |
|
171 | 171 | } |
172 | 172 | $tdbmServiceDescriptor = $moufManager->getInstanceDescriptor($name); |
173 | 173 | $tdbmServiceDescriptor->getSetterProperty("setTableToBeanMap")->setValue($tableToBeanMap); |
@@ -146,7 +146,7 @@ |
||
146 | 146 | * @param string $selfedit |
147 | 147 | * @throws \Mouf\MoufException |
148 | 148 | */ |
149 | - public function generate($daonamespace, $beannamespace, $keepSupport = 0, $storeInUtc = 0, $castDatesToDateTime = 1, $selfedit="false") { |
|
149 | + public function generate($daonamespace, $beannamespace, $keepSupport = 0, $storeInUtc = 0, $castDatesToDateTime = 1, $selfedit = "false") { |
|
150 | 150 | $this->selfedit = $selfedit; |
151 | 151 | |
152 | 152 | if ($selfedit == "true") { |