@@ -17,7 +17,7 @@ discard block |
||
17 | 17 | { |
18 | 18 | protected function createControl($container, $column, $record) |
19 | 19 | { |
20 | - $dbtype = trim(str_replace(['unsigned', 'zerofill'], ['','',], strtolower($column->getDbType()))); |
|
20 | + $dbtype = trim(str_replace(['unsigned', 'zerofill'], ['', '', ], strtolower($column->getDbType()))); |
|
21 | 21 | switch($dbtype) |
22 | 22 | { |
23 | 23 | case 'date': |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | |
47 | 47 | protected function getControlValue($container, $column, $record) |
48 | 48 | { |
49 | - $dbtype = trim(str_replace(['unsigned', 'zerofill'], ['','',], strtolower($column->getDbType()))); |
|
49 | + $dbtype = trim(str_replace(['unsigned', 'zerofill'], ['', '', ], strtolower($column->getDbType()))); |
|
50 | 50 | switch($dbtype) |
51 | 51 | { |
52 | 52 | case 'date': |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | protected function getIntBooleanValue($container, $column, $record) |
80 | 80 | { |
81 | 81 | if($column->getColumnSize() == 1) |
82 | - return (int)$container->findControl(self::DEFAULT_ID)->getChecked(); |
|
82 | + return (int) $container->findControl(self::DEFAULT_ID)->getChecked(); |
|
83 | 83 | else |
84 | 84 | return $this->getDefaultControlValue($container, $column, $record); |
85 | 85 | } |
@@ -129,7 +129,7 @@ |
||
129 | 129 | public function setGatewayClass($value) |
130 | 130 | { |
131 | 131 | $this->_gateway = null; |
132 | - $this->_gatewayClass = (string)$value; |
|
132 | + $this->_gatewayClass = (string) $value; |
|
133 | 133 | } |
134 | 134 | |
135 | 135 | /** |
@@ -294,7 +294,7 @@ discard block |
||
294 | 294 | $class = new ReflectionClass($className); |
295 | 295 | $relations = []; |
296 | 296 | foreach($class->getStaticPropertyValue('RELATIONS') as $key => $value) |
297 | - $relations[strtolower($key)] = [$key,$value]; |
|
297 | + $relations[strtolower($key)] = [$key, $value]; |
|
298 | 298 | self::$_relations[$className] = $relations; |
299 | 299 | } |
300 | 300 | } |
@@ -495,7 +495,7 @@ discard block |
||
495 | 495 | { |
496 | 496 | if(func_num_args() > 1) |
497 | 497 | $keys = func_get_args(); |
498 | - return $this->getRecordGateway()->deleteRecordsByPk($this, (array)$keys); |
|
498 | + return $this->getRecordGateway()->deleteRecordsByPk($this, (array) $keys); |
|
499 | 499 | } |
500 | 500 | |
501 | 501 | /** |
@@ -647,7 +647,7 @@ discard block |
||
647 | 647 | { |
648 | 648 | if(func_num_args() > 1) |
649 | 649 | $keys = func_get_args(); |
650 | - $result = $this->getRecordGateway()->findRecordsByPks($this, (array)$keys); |
|
650 | + $result = $this->getRecordGateway()->findRecordsByPks($this, (array) $keys); |
|
651 | 651 | return $this->populateObjects($result); |
652 | 652 | } |
653 | 653 | |
@@ -1010,7 +1010,7 @@ discard block |
||
1010 | 1010 | { |
1011 | 1011 | $className = get_class($this); |
1012 | 1012 | $property = strtolower($property); |
1013 | - return isset(self::$_relations[$className][$property])?self::$_relations[$className][$property]:null; |
|
1013 | + return isset(self::$_relations[$className][$property]) ?self::$_relations[$className][$property] : null; |
|
1014 | 1014 | } |
1015 | 1015 | |
1016 | 1016 | /** |
@@ -1037,9 +1037,9 @@ discard block |
||
1037 | 1037 | * @return array of column name and column values |
1038 | 1038 | * @since 3.2.4 |
1039 | 1039 | */ |
1040 | - public function toArray(){ |
|
1040 | + public function toArray() { |
|
1041 | 1041 | $result = []; |
1042 | - foreach($this->getRecordTableInfo()->getLowerCaseColumnNames() as $columnName){ |
|
1042 | + foreach($this->getRecordTableInfo()->getLowerCaseColumnNames() as $columnName) { |
|
1043 | 1043 | $result[$columnName] = $this->getColumnValue($columnName); |
1044 | 1044 | } |
1045 | 1045 | |
@@ -1051,7 +1051,7 @@ discard block |
||
1051 | 1051 | * @return JSON |
1052 | 1052 | * @since 3.2.4 |
1053 | 1053 | */ |
1054 | - public function toJSON(){ |
|
1054 | + public function toJSON() { |
|
1055 | 1055 | return json_encode($this->toArray()); |
1056 | 1056 | } |
1057 | 1057 | } |
1058 | 1058 | \ No newline at end of file |
@@ -79,7 +79,7 @@ |
||
79 | 79 | public function setFetchMode($mode) |
80 | 80 | { |
81 | 81 | $params = func_get_args(); |
82 | - call_user_func_array([$this->_statement,'setFetchMode'], $params); |
|
82 | + call_user_func_array([$this->_statement, 'setFetchMode'], $params); |
|
83 | 83 | } |
84 | 84 | |
85 | 85 | /** |
@@ -138,12 +138,12 @@ |
||
138 | 138 | public function __sleep() |
139 | 139 | { |
140 | 140 | $exprops = []; $cn = 'TParameterProperty'; |
141 | - if ($this->_typeHandler === null) $exprops[] = "\0$cn\0_typeHandler"; |
|
142 | - if ($this->_type === null) $exprops[] = "\0$cn\0_type"; |
|
143 | - if ($this->_column === null) $exprops[] = "\0$cn\0_column"; |
|
144 | - if ($this->_dbType === null) $exprops[] = "\0$cn\0_dbType"; |
|
145 | - if ($this->_property === null) $exprops[] = "\0$cn\0_property"; |
|
146 | - if ($this->_nullValue === null) $exprops[] = "\0$cn\0_nullValue"; |
|
141 | + if($this->_typeHandler === null) $exprops[] = "\0$cn\0_typeHandler"; |
|
142 | + if($this->_type === null) $exprops[] = "\0$cn\0_type"; |
|
143 | + if($this->_column === null) $exprops[] = "\0$cn\0_column"; |
|
144 | + if($this->_dbType === null) $exprops[] = "\0$cn\0_dbType"; |
|
145 | + if($this->_property === null) $exprops[] = "\0$cn\0_property"; |
|
146 | + if($this->_nullValue === null) $exprops[] = "\0$cn\0_nullValue"; |
|
147 | 147 | return array_diff(parent::__sleep(), $exprops); |
148 | 148 | } |
149 | 149 | } |
@@ -334,16 +334,16 @@ |
||
334 | 334 | public function __sleep() |
335 | 335 | { |
336 | 336 | $exprops = []; $cn = 'TResultProperty'; |
337 | - if ($this->_nullValue === null) $exprops[] = "\0$cn\0_nullValue"; |
|
338 | - if ($this->_propertyName === null) $exprops[] = "\0$cn\0_propertyNama"; |
|
339 | - if ($this->_columnName === null) $exprops[] = "\0$cn\0_columnName"; |
|
340 | - if ($this->_columnIndex == -1) $exprops[] = "\0$cn\0_columnIndex"; |
|
341 | - if ($this->_nestedResultMapName === null) $exprops[] = "\0$cn\0_nestedResultMapName"; |
|
342 | - if ($this->_nestedResultMap === null) $exprops[] = "\0$cn\0_nestedResultMap"; |
|
343 | - if ($this->_valueType === null) $exprops[] = "\0$cn\0_valueType"; |
|
344 | - if ($this->_typeHandler === null) $exprops[] = "\0$cn\0_typeHandler"; |
|
345 | - if ($this->_isLazyLoad === false) $exprops[] = "\0$cn\0_isLazyLoad"; |
|
346 | - if ($this->_select === null) $exprops[] = "\0$cn\0_select"; |
|
337 | + if($this->_nullValue === null) $exprops[] = "\0$cn\0_nullValue"; |
|
338 | + if($this->_propertyName === null) $exprops[] = "\0$cn\0_propertyNama"; |
|
339 | + if($this->_columnName === null) $exprops[] = "\0$cn\0_columnName"; |
|
340 | + if($this->_columnIndex == -1) $exprops[] = "\0$cn\0_columnIndex"; |
|
341 | + if($this->_nestedResultMapName === null) $exprops[] = "\0$cn\0_nestedResultMapName"; |
|
342 | + if($this->_nestedResultMap === null) $exprops[] = "\0$cn\0_nestedResultMap"; |
|
343 | + if($this->_valueType === null) $exprops[] = "\0$cn\0_valueType"; |
|
344 | + if($this->_typeHandler === null) $exprops[] = "\0$cn\0_typeHandler"; |
|
345 | + if($this->_isLazyLoad === false) $exprops[] = "\0$cn\0_isLazyLoad"; |
|
346 | + if($this->_select === null) $exprops[] = "\0$cn\0_select"; |
|
347 | 347 | return array_diff(parent::__sleep(), $exprops); |
348 | 348 | } |
349 | 349 | } |
@@ -297,18 +297,18 @@ |
||
297 | 297 | { |
298 | 298 | $cn = __CLASS__; |
299 | 299 | $exprops = ["\0$cn\0_resultMap"]; |
300 | - if (!$this->_parameterMapName) $exprops[] = "\0$cn\0_parameterMapName"; |
|
301 | - if (!$this->_parameterMap) $exprops[] = "\0$cn\0_parameterMap"; |
|
302 | - if (!$this->_parameterClassName) $exprops[] = "\0$cn\0_parameterClassName"; |
|
303 | - if (!$this->_resultMapName) $exprops[] = "\0$cn\0_resultMapName"; |
|
304 | - if (!$this->_resultMap) $exprops[] = "\0$cn\0_resultMap"; |
|
305 | - if (!$this->_resultClassName) $exprops[] = "\0$cn\0_resultClassName"; |
|
306 | - if (!$this->_cacheModelName) $exprops[] = "\0$cn\0_cacheModelName"; |
|
307 | - if (!$this->_SQL) $exprops[] = "\0$cn\0_SQL"; |
|
308 | - if (!$this->_listClass) $exprops[] = "\0$cn\0_listClass"; |
|
309 | - if (!$this->_typeHandler) $exprops[] = "\0$cn\0_typeHandler"; |
|
310 | - if (!$this->_extendStatement) $exprops[] = "\0$cn\0_extendStatement"; |
|
311 | - if (!$this->_cache) $exprops[] = "\0$cn\0_cache"; |
|
300 | + if(!$this->_parameterMapName) $exprops[] = "\0$cn\0_parameterMapName"; |
|
301 | + if(!$this->_parameterMap) $exprops[] = "\0$cn\0_parameterMap"; |
|
302 | + if(!$this->_parameterClassName) $exprops[] = "\0$cn\0_parameterClassName"; |
|
303 | + if(!$this->_resultMapName) $exprops[] = "\0$cn\0_resultMapName"; |
|
304 | + if(!$this->_resultMap) $exprops[] = "\0$cn\0_resultMap"; |
|
305 | + if(!$this->_resultClassName) $exprops[] = "\0$cn\0_resultClassName"; |
|
306 | + if(!$this->_cacheModelName) $exprops[] = "\0$cn\0_cacheModelName"; |
|
307 | + if(!$this->_SQL) $exprops[] = "\0$cn\0_SQL"; |
|
308 | + if(!$this->_listClass) $exprops[] = "\0$cn\0_listClass"; |
|
309 | + if(!$this->_typeHandler) $exprops[] = "\0$cn\0_typeHandler"; |
|
310 | + if(!$this->_extendStatement) $exprops[] = "\0$cn\0_extendStatement"; |
|
311 | + if(!$this->_cache) $exprops[] = "\0$cn\0_cache"; |
|
312 | 312 | |
313 | 313 | return array_diff(parent::__sleep(), $exprops); |
314 | 314 | } |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | */ |
82 | 82 | public function setImplementation($value) |
83 | 83 | { |
84 | - if (isset(self::$_cacheTypes[$value])) |
|
84 | + if(isset(self::$_cacheTypes[$value])) |
|
85 | 85 | $this->_implementation = $value; |
86 | 86 | else |
87 | 87 | $this->_implementation = TPropertyValue::ensureEnum($value, 'Prado\\Data\\SqlMap\\Configuration\\TSqlMapCacheTypes'); |
@@ -121,7 +121,7 @@ discard block |
||
121 | 121 | public function getImplementationClass() |
122 | 122 | { |
123 | 123 | $implementation = $this->_implementation; |
124 | - if (isset(self::$_cacheTypes[$implementation])) return self::$_cacheTypes[$implementation]; |
|
124 | + if(isset(self::$_cacheTypes[$implementation])) return self::$_cacheTypes[$implementation]; |
|
125 | 125 | |
126 | 126 | switch(TPropertyValue::ensureEnum($implementation, 'Prado\\Data\\SqlMap\\Configuration\\TSqlMapCacheTypes')) |
127 | 127 | { |
@@ -199,9 +199,9 @@ |
||
199 | 199 | public function __sleep() |
200 | 200 | { |
201 | 201 | $exprops = []; $cn = __CLASS__; |
202 | - if (!count($this->_tree)) $exprops[] = "\0$cn\0_tree"; |
|
203 | - if (!count($this->_entries)) $exprops[] = "\0$cn\0_entries"; |
|
204 | - if (!count($this->_list)) $exprops[] = "\0$cn\0_list"; |
|
202 | + if(!count($this->_tree)) $exprops[] = "\0$cn\0_tree"; |
|
203 | + if(!count($this->_entries)) $exprops[] = "\0$cn\0_entries"; |
|
204 | + if(!count($this->_list)) $exprops[] = "\0$cn\0_list"; |
|
205 | 205 | return array_diff(parent::__sleep(), $exprops); |
206 | 206 | } |
207 | 207 | } |
208 | 208 | \ No newline at end of file |