Commit f8496233 by Alexander Mohorev

code style. FOR

parent 95ea1c20
...@@ -70,7 +70,7 @@ class ApiMarkdown extends GithubMarkdown ...@@ -70,7 +70,7 @@ class ApiMarkdown extends GithubMarkdown
if (!empty($language)) { if (!empty($language)) {
$block['language'] = $language; $block['language'] = $language;
} }
for($i = $current + 1, $count = count($lines); $i < $count; $i++) { for ($i = $current + 1, $count = count($lines); $i < $count; $i++) {
if (rtrim($line = $lines[$i]) !== $fence) { if (rtrim($line = $lines[$i]) !== $fence) {
$block['content'][] = $line; $block['content'][] = $line;
} else { } else {
......
...@@ -90,7 +90,7 @@ class ActiveQuery extends \yii\base\Component implements ActiveQueryInterface ...@@ -90,7 +90,7 @@ class ActiveQuery extends \yii\base\Component implements ActiveQueryInterface
foreach ($data as $dataRow) { foreach ($data as $dataRow) {
$row = []; $row = [];
$c = count($dataRow); $c = count($dataRow);
for($i = 0; $i < $c; ) { for ($i = 0; $i < $c; ) {
$row[$dataRow[$i++]] = $dataRow[$i++]; $row[$dataRow[$i++]] = $dataRow[$i++];
} }
$rows[] = $row; $rows[] = $row;
...@@ -128,7 +128,7 @@ class ActiveQuery extends \yii\base\Component implements ActiveQueryInterface ...@@ -128,7 +128,7 @@ class ActiveQuery extends \yii\base\Component implements ActiveQueryInterface
} }
$row = []; $row = [];
$c = count($data); $c = count($data);
for($i = 0; $i < $c; ) { for ($i = 0; $i < $c; ) {
$row[$data[$i++]] = $data[$i++]; $row[$data[$i++]] = $data[$i++];
} }
if ($this->asArray) { if ($this->asArray) {
...@@ -383,7 +383,7 @@ class ActiveQuery extends \yii\base\Component implements ActiveQueryInterface ...@@ -383,7 +383,7 @@ class ActiveQuery extends \yii\base\Component implements ActiveQueryInterface
foreach ($data as $dataRow) { foreach ($data as $dataRow) {
$row = []; $row = [];
$c = count($dataRow); $c = count($dataRow);
for($i = 0; $i < $c; ) { for ($i = 0; $i < $c; ) {
$row[$dataRow[$i++]] = $dataRow[$i++]; $row[$dataRow[$i++]] = $dataRow[$i++];
} }
$column[] = $row[$columnName]; $column[] = $row[$columnName];
...@@ -393,7 +393,7 @@ class ActiveQuery extends \yii\base\Component implements ActiveQueryInterface ...@@ -393,7 +393,7 @@ class ActiveQuery extends \yii\base\Component implements ActiveQueryInterface
$sum = 0; $sum = 0;
foreach ($data as $dataRow) { foreach ($data as $dataRow) {
$c = count($dataRow); $c = count($dataRow);
for($i = 0; $i < $c; ) { for ($i = 0; $i < $c; ) {
if ($dataRow[$i++] == $columnName) { if ($dataRow[$i++] == $columnName) {
$sum += $dataRow[$i]; $sum += $dataRow[$i];
break; break;
...@@ -407,7 +407,7 @@ class ActiveQuery extends \yii\base\Component implements ActiveQueryInterface ...@@ -407,7 +407,7 @@ class ActiveQuery extends \yii\base\Component implements ActiveQueryInterface
foreach ($data as $dataRow) { foreach ($data as $dataRow) {
$count++; $count++;
$c = count($dataRow); $c = count($dataRow);
for($i = 0; $i < $c; ) { for ($i = 0; $i < $c; ) {
if ($dataRow[$i++] == $columnName) { if ($dataRow[$i++] == $columnName) {
$sum += $dataRow[$i]; $sum += $dataRow[$i];
break; break;
...@@ -419,7 +419,7 @@ class ActiveQuery extends \yii\base\Component implements ActiveQueryInterface ...@@ -419,7 +419,7 @@ class ActiveQuery extends \yii\base\Component implements ActiveQueryInterface
$min = null; $min = null;
foreach ($data as $dataRow) { foreach ($data as $dataRow) {
$c = count($dataRow); $c = count($dataRow);
for($i = 0; $i < $c; ) { for ($i = 0; $i < $c; ) {
if ($dataRow[$i++] == $columnName && ($min == null || $dataRow[$i] < $min)) { if ($dataRow[$i++] == $columnName && ($min == null || $dataRow[$i] < $min)) {
$min = $dataRow[$i]; $min = $dataRow[$i];
break; break;
...@@ -431,7 +431,7 @@ class ActiveQuery extends \yii\base\Component implements ActiveQueryInterface ...@@ -431,7 +431,7 @@ class ActiveQuery extends \yii\base\Component implements ActiveQueryInterface
$max = null; $max = null;
foreach ($data as $dataRow) { foreach ($data as $dataRow) {
$c = count($dataRow); $c = count($dataRow);
for($i = 0; $i < $c; ) { for ($i = 0; $i < $c; ) {
if ($dataRow[$i++] == $columnName && ($max == null || $dataRow[$i] > $max)) { if ($dataRow[$i++] == $columnName && ($max == null || $dataRow[$i] > $max)) {
$max = $dataRow[$i]; $max = $dataRow[$i];
break; break;
......
...@@ -158,7 +158,7 @@ yii = (function ($) { ...@@ -158,7 +158,7 @@ yii = (function ($) {
return {}; return {};
} }
var qs = url.substring(pos + 1).split('&'); var qs = url.substring(pos + 1).split('&');
for(var i = 0, result = {}; i < qs.length; i++){ for (var i = 0, result = {}; i < qs.length; i++) {
qs[i] = qs[i].split('='); qs[i] = qs[i].split('=');
result[decodeURIComponent(qs[i][0])] = decodeURIComponent(qs[i][1]); result[decodeURIComponent(qs[i][0])] = decodeURIComponent(qs[i][1]);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment