@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | $hexLength = strlen($hex); |
63 | 63 | $base = strlen($alphabet); |
64 | 64 | $result = ''; |
65 | - for ($i = 0;$i < $hexLength;$i += 6) { |
|
65 | + for ($i = 0; $i < $hexLength; $i += 6) { |
|
66 | 66 | $number = hexdec(substr($hex, $i, 6)); |
67 | 67 | while ($number) { |
68 | 68 | $result .= $alphabet[$number % $base]; |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | } |
107 | 107 | |
108 | 108 | $hasShadow = ($theme & THEME_SHADOWED_TEXT); |
109 | - for ($i = 0;$i < $length;$i++) { |
|
109 | + for ($i = 0; $i < $length; $i++) { |
|
110 | 110 | $color = imagecolorallocate($image, rand(150, 220), rand(150, 220), rand(150, 220)); |
111 | 111 | $size = rand($fontWidth - 10, $fontWidth); |
112 | 112 | $angle = rand(-30, 30); |
@@ -159,8 +159,8 @@ discard block |
||
159 | 159 | |
160 | 160 | function addNoise($image, $width, $height) |
161 | 161 | { |
162 | - for ($x = 0;$x < $width;++$x) { |
|
163 | - for ($y = 0;$y < $height;++$y) { |
|
162 | + for ($x = 0; $x < $width; ++$x) { |
|
163 | + for ($y = 0; $y < $height; ++$y) { |
|
164 | 164 | if (rand(0, 100) < 25) { |
165 | 165 | $color = imagecolorallocate($image, rand(150, 220), rand(150, 220), rand(150, 220)); |
166 | 166 | imagesetpixel($image, $x, $y, $color); |
@@ -172,13 +172,13 @@ discard block |
||
172 | 172 | |
173 | 173 | function addGrid($image, $width, $height) |
174 | 174 | { |
175 | - for ($i = 0;$i < $width;$i += rand(15, 25)) { |
|
175 | + for ($i = 0; $i < $width; $i += rand(15, 25)) { |
|
176 | 176 | imagesetthickness($image, rand(2, 6)); |
177 | 177 | $color = imagecolorallocate($image, rand(100, 180), rand(100, 180), rand(100, 180)); |
178 | 178 | imageline($image, $i + rand(-10, 20), 0, $i + rand(-10, 20), $height, $color); |
179 | 179 | imagecolordeallocate($image, $color); |
180 | 180 | } |
181 | - for ($i = 0;$i < $height;$i += rand(15, 25)) { |
|
181 | + for ($i = 0; $i < $height; $i += rand(15, 25)) { |
|
182 | 182 | imagesetthickness($image, rand(2, 6)); |
183 | 183 | $color = imagecolorallocate($image, rand(100, 180), rand(100, 180), rand(100, 180)); |
184 | 184 | imageline($image, 0, $i + rand(-10, 20), $width, $i + rand(-10, 20), $color); |
@@ -188,10 +188,10 @@ discard block |
||
188 | 188 | |
189 | 189 | function addScribble($image, $width, $height) |
190 | 190 | { |
191 | - for ($i = 0;$i < 8;$i++) { |
|
191 | + for ($i = 0; $i < 8; $i++) { |
|
192 | 192 | $color = imagecolorallocate($image, rand(100, 180), rand(100, 180), rand(100, 180)); |
193 | 193 | $points = []; |
194 | - for ($j = 1;$j < rand(5, 10);$j++) { |
|
194 | + for ($j = 1; $j < rand(5, 10); $j++) { |
|
195 | 195 | $points[] = rand(2 * (20 * ($i + 1)), 2 * (50 * ($i + 1))); |
196 | 196 | $points[] = rand(30, $height + 30); |
197 | 197 | } |
@@ -205,7 +205,7 @@ discard block |
||
205 | 205 | { |
206 | 206 | $tempImage = imagecreatetruecolor($width, $height); |
207 | 207 | $chunk = rand(1, 5); |
208 | - for ($x = $y = 0;$x < $width;$x += $chunk) { |
|
208 | + for ($x = $y = 0; $x < $width; $x += $chunk) { |
|
209 | 209 | $chunk = rand(1, 5); |
210 | 210 | $y += rand(-1, 1); |
211 | 211 | if ($y >= $height) { |
@@ -216,7 +216,7 @@ discard block |
||
216 | 216 | } |
217 | 217 | imagecopy($tempImage, $image, $x, 0, $x, $y, $chunk, $height); |
218 | 218 | } |
219 | - for ($x = $y = 0;$y < $height;$y += $chunk) { |
|
219 | + for ($x = $y = 0; $y < $height; $y += $chunk) { |
|
220 | 220 | $chunk = rand(1, 5); |
221 | 221 | $x += rand(-1, 1); |
222 | 222 | if ($x >= $width) { |
@@ -193,8 +193,7 @@ discard block |
||
193 | 193 | public function runQueryForList($connection, $parameter, $sql, $result, $delegate = null) |
194 | 194 | { |
195 | 195 | $registry = $this->getManager()->getTypeHandlers(); |
196 | - $list = $result instanceof \ArrayAccess ? $result : |
|
197 | - $this->_statement->createInstanceOfListClass($registry); |
|
196 | + $list = $result instanceof \ArrayAccess ? $result : $this->_statement->createInstanceOfListClass($registry); |
|
198 | 197 | $connection->setActive(true); |
199 | 198 | $reader = $sql->query(); |
200 | 199 | if ($delegate !== null) { |
@@ -267,8 +266,7 @@ discard block |
||
267 | 266 | foreach ($reader as $row) { |
268 | 267 | $obj = $this->applyResultMap($row); |
269 | 268 | $key = TPropertyAccess::get($obj, $keyProperty); |
270 | - $value = ($valueProperty === null) ? $obj : |
|
271 | - TPropertyAccess::get($obj, $valueProperty); |
|
269 | + $value = ($valueProperty === null) ? $obj : TPropertyAccess::get($obj, $valueProperty); |
|
272 | 270 | $param = new TResultSetMapItemParameter($key, $value, $parameter, $map); |
273 | 271 | $this->raiseRowDelegate($delegate, $param); |
274 | 272 | } |
@@ -276,8 +274,7 @@ discard block |
||
276 | 274 | foreach ($reader as $row) { |
277 | 275 | $obj = $this->applyResultMap($row); |
278 | 276 | $key = TPropertyAccess::get($obj, $keyProperty); |
279 | - $map[$key] = ($valueProperty === null) ? $obj : |
|
280 | - TPropertyAccess::get($obj, $valueProperty); |
|
277 | + $map[$key] = ($valueProperty === null) ? $obj : TPropertyAccess::get($obj, $valueProperty); |
|
281 | 278 | } |
282 | 279 | } |
283 | 280 | $this->onExecuteQuery($command); |
@@ -257,7 +257,7 @@ discard block |
||
257 | 257 | */ |
258 | 258 | public function getScriptUrls() |
259 | 259 | { |
260 | - $scripts = array_values(array_map(function ($v) { |
|
260 | + $scripts = array_values(array_map(function($v) { |
|
261 | 261 | return $v->getUrl(); |
262 | 262 | }, $this->_headScriptFiles)); |
263 | 263 | $scripts = array_merge($scripts, array_values($this->_scriptFiles)); |
@@ -550,7 +550,7 @@ discard block |
||
550 | 550 | public function getStyleSheetUrls() |
551 | 551 | { |
552 | 552 | $stylesheets = array_values( |
553 | - array_map(function ($e) { |
|
553 | + array_map(function($e) { |
|
554 | 554 | return is_array($e) ? $e[0] : $e; |
555 | 555 | }, $this->_styleSheetFiles) |
556 | 556 | ); |
@@ -28,6 +28,6 @@ |
||
28 | 28 | */ |
29 | 29 | class TActiveRecordInvalidFinderResult extends \Prado\TEnumerable |
30 | 30 | { |
31 | - public const Null = 'Null'; |
|
31 | + public const null = 'Null'; |
|
32 | 32 | public const Exception = 'Exception'; |
33 | 33 | } |
@@ -113,17 +113,17 @@ discard block |
||
113 | 113 | * Indexes for the rare fields. |
114 | 114 | * In order to save memory, rare fields will only be created if they are needed. |
115 | 115 | */ |
116 | - public const RF_CONTROLS = 0; // child controls |
|
117 | - public const RF_CHILD_STATE = 1; // child state field |
|
118 | - public const RF_NAMED_CONTROLS = 2; // list of controls whose namingcontainer is this control |
|
119 | - public const RF_NAMED_CONTROLS_ID = 3; // counter for automatic id |
|
120 | - public const RF_SKIN_ID = 4; // skin ID |
|
121 | - public const RF_DATA_BINDINGS = 5; // data bindings |
|
122 | - public const RF_EVENTS = 6; // event handlers |
|
123 | - public const RF_CONTROLSTATE = 7; // controlstate |
|
124 | - public const RF_NAMED_OBJECTS = 8; // controls declared with ID on template |
|
125 | - public const RF_ADAPTER = 9; // adapter |
|
126 | - public const RF_AUTO_BINDINGS = 10; // auto data bindings |
|
116 | + public const RF_CONTROLS = 0; // child controls |
|
117 | + public const RF_CHILD_STATE = 1; // child state field |
|
118 | + public const RF_NAMED_CONTROLS = 2; // list of controls whose namingcontainer is this control |
|
119 | + public const RF_NAMED_CONTROLS_ID = 3; // counter for automatic id |
|
120 | + public const RF_SKIN_ID = 4; // skin ID |
|
121 | + public const RF_DATA_BINDINGS = 5; // data bindings |
|
122 | + public const RF_EVENTS = 6; // event handlers |
|
123 | + public const RF_CONTROLSTATE = 7; // controlstate |
|
124 | + public const RF_NAMED_OBJECTS = 8; // controls declared with ID on template |
|
125 | + public const RF_ADAPTER = 9; // adapter |
|
126 | + public const RF_AUTO_BINDINGS = 10; // auto data bindings |
|
127 | 127 | |
128 | 128 | /** |
129 | 129 | * @var string control ID |
@@ -413,7 +413,7 @@ discard block |
||
413 | 413 | public function getUniqueID() |
414 | 414 | { |
415 | 415 | if ($this->_uid === '' || $this->_uid === null) { // need to build the UniqueID |
416 | - $this->_uid = ''; // set to not-null, so that clearCachedUniqueID() may take action |
|
416 | + $this->_uid = ''; // set to not-null, so that clearCachedUniqueID() may take action |
|
417 | 417 | if ($namingContainer = $this->getNamingContainer()) { |
418 | 418 | if ($this->getPage() === $namingContainer) { |
419 | 419 | return ($this->_uid = $this->_id); |
@@ -45,7 +45,7 @@ |
||
45 | 45 | public const CYAN = 36; |
46 | 46 | public const LIGHT_GRAY = 37; |
47 | 47 | // '256' => '38', // 38:2:<red>:<green>:<blue> or 38:5:<256-color> |
48 | - public const DEFAULT = 39; |
|
48 | + public const default = 39; |
|
49 | 49 | |
50 | 50 | public const DARK_GRAY = 90; |
51 | 51 | public const LIGHT_RED = 91; |
@@ -379,7 +379,7 @@ |
||
379 | 379 | */ |
380 | 380 | protected function logCron($numtasks) |
381 | 381 | { |
382 | - Prado::log("Processing {$numtasks} Cron Tasks", TLogger::INFO, 'Prado.Cron.TCronModule'); |
|
382 | + Prado::log("processing {$numtasks} Cron Tasks", TLogger::INFO, 'Prado.Cron.TCronModule'); |
|
383 | 383 | $this->dyLogCron($numtasks); |
384 | 384 | $this->setLastCronTime(microtime(true)); |
385 | 385 | } |
@@ -110,7 +110,7 @@ |
||
110 | 110 | } |
111 | 111 | } |
112 | 112 | $password = $this->_password; |
113 | - $this->_password = ''; //Do not store the Password. |
|
113 | + $this->_password = ''; //Do not store the Password. |
|
114 | 114 | if (!$this->getOwner()->login($this->_username, $password)) { |
115 | 115 | $writer->writeError("Could not Authenticate the user"); |
116 | 116 | $writer->flush(); |
@@ -198,7 +198,7 @@ discard block |
||
198 | 198 | |
199 | 199 | $where = ($this->_autoLoadField ? " WHERE {$this->_autoLoadField}={$this->_autoLoadValue}" : ''); |
200 | 200 | $cmd = $db->createCommand( |
201 | - "SELECT {$this->_keyField} as keyField, {$this->_valueField} as valueField FROM {$this->_tableName}{$where}" |
|
201 | + "select {$this->_keyField} as keyField, {$this->_valueField} as valueField FROM {$this->_tableName}{$where}" |
|
202 | 202 | ); |
203 | 203 | $results = $cmd->query(); |
204 | 204 | |
@@ -345,7 +345,7 @@ discard block |
||
345 | 345 | |
346 | 346 | $db = $this->getDbConnection(); |
347 | 347 | $cmd = $db->createCommand( |
348 | - "SELECT {$this->_valueField} as valueField FROM {$this->_tableName} WHERE {$this->_keyField}=:key LIMIT 1" |
|
348 | + "select {$this->_valueField} as valueField FROM {$this->_tableName} WHERE {$this->_keyField}=:key LIMIT 1" |
|
349 | 349 | ); |
350 | 350 | $cmd->bindParameter(":key", $key, PDO::PARAM_STR); |
351 | 351 | $results = $cmd->queryRow(); |