@@ -62,7 +62,7 @@ |
||
| 62 | 62 | public static function ul($objectRoot, $maxDeep = 0, $hrefFunc = null, $order = [], $activeFunc = '', $activeClass = 'active') { |
| 63 | 63 | $count = 0; |
| 64 | 64 | if (!$hrefFunc) { |
| 65 | - $hrefFunc = function($object) { |
|
| 65 | + $hrefFunc = function ($object) { |
|
| 66 | 66 | return "<a href='#'> {$object->name()}</a>"; |
| 67 | 67 | }; |
| 68 | 68 | } |
@@ -8,7 +8,7 @@ |
||
| 8 | 8 | * @covers Inji::unlisten |
| 9 | 9 | */ |
| 10 | 10 | public function testNotSavingEvent() { |
| 11 | - \Inji::$inst->listen('testEvent', 'testCallback', function() { |
|
| 11 | + \Inji::$inst->listen('testEvent', 'testCallback', function () { |
|
| 12 | 12 | return true; |
| 13 | 13 | }); |
| 14 | 14 | $this->assertEquals(true, Inji::$inst->event('testEvent')); |
@@ -5,6 +5,6 @@ |
||
| 5 | 5 | 'file' => 'index.html', |
| 6 | 6 | 'css' => ['style.css'], |
| 7 | 7 | 'libs' => [ |
| 8 | - 'JqueryUi', 'PaperTheme','FancyBox' |
|
| 8 | + 'JqueryUi', 'PaperTheme', 'FancyBox' |
|
| 9 | 9 | ] |
| 10 | 10 | ]; |
@@ -23,7 +23,7 @@ |
||
| 23 | 23 | } |
| 24 | 24 | |
| 25 | 25 | public function parseColsForModel($cols = []) { |
| 26 | - $modelCols = [ 'labels' => [], 'cols' => [], 'relations' => []]; |
|
| 26 | + $modelCols = ['labels' => [], 'cols' => [], 'relations' => []]; |
|
| 27 | 27 | foreach ($cols as $col) { |
| 28 | 28 | $modelCols['labels'][$col['code']] = $col['label']; |
| 29 | 29 | $colType = !empty($col['type']['primary']) ? $col['type']['primary'] : $col['type']; |
@@ -1,7 +1,7 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | 3 | return [ |
| 4 | - 'up' => function() { |
|
| 4 | + 'up' => function () { |
|
| 5 | 5 | Materials\Material::createCol('date_publish'); |
| 6 | 6 | foreach (Materials\Material::getList() as $material) { |
| 7 | 7 | $material->date_publish = $material->date_create; |
@@ -64,7 +64,7 @@ |
||
| 64 | 64 | 'type' => 'many', |
| 65 | 65 | 'model' => 'Menu\Item', |
| 66 | 66 | 'col' => 'Menu_id', |
| 67 | - 'where'=>[['parent_id',0]] |
|
| 67 | + 'where'=>[['parent_id', 0]] |
|
| 68 | 68 | ], |
| 69 | 69 | 'group' => [ |
| 70 | 70 | 'col' => 'group_id', |
@@ -6,7 +6,7 @@ discard block |
||
| 6 | 6 | $code = 'main'; |
| 7 | 7 | } |
| 8 | 8 | $uid = Tools::randomString(); |
| 9 | -$childDraws = function($item, $childDraws, $uid, $activeFind) { |
|
| 9 | +$childDraws = function ($item, $childDraws, $uid, $activeFind) { |
|
| 10 | 10 | if ($item->childs(['order' => ['weight', 'asc']])) { |
| 11 | 11 | echo "<ul class ='dropdown-menu'>"; |
| 12 | 12 | |
@@ -23,7 +23,7 @@ discard block |
||
| 23 | 23 | echo "</ul>"; |
| 24 | 24 | } |
| 25 | 25 | }; |
| 26 | -$activeFind = function($item, $activeFind) { |
|
| 26 | +$activeFind = function ($item, $activeFind) { |
|
| 27 | 27 | foreach ($item->childs(['order' => ['weight', 'asc']]) as $item) { |
| 28 | 28 | if (urldecode($_SERVER['REQUEST_URI']) == $item->href) { |
| 29 | 29 | return true; |
@@ -32,7 +32,7 @@ |
||
| 32 | 32 | |
| 33 | 33 | |
| 34 | 34 | $options = []; |
| 35 | - $itemParams = \Ecommerce\Item\Param::getList(['where' => ['item_id', $this->model->id],'key'=>'item_option_id']); |
|
| 35 | + $itemParams = \Ecommerce\Item\Param::getList(['where' => ['item_id', $this->model->id], 'key'=>'item_option_id']); |
|
| 36 | 36 | foreach ($this->object->object->params as $param) { |
| 37 | 37 | if ($param->type == 'paramValue' && isset($itemParams[$param->value])) { |
| 38 | 38 | $options[$param->value] = $itemParams[$param->value]->value; |
@@ -11,7 +11,7 @@ |
||
| 11 | 11 | class ServerController extends Controller { |
| 12 | 12 | function csrfAction($key = '') { |
| 13 | 13 | $result = new \Server\Result(); |
| 14 | - $key = (string)$key; |
|
| 14 | + $key = (string) $key; |
|
| 15 | 15 | if (!$key) { |
| 16 | 16 | $result->success = false; |
| 17 | 17 | return $result->send(); |