@@ -162,7 +162,7 @@ discard block |
||
| 162 | 162 | |
| 163 | 163 | foreach ($agenda['events'] as $day => $events) { |
| 164 | 164 | // Sort by desc first line |
| 165 | - usort($events, function ($a, $b) { |
|
| 165 | + usort($events, function($a, $b) { |
|
| 166 | 166 | return strcmp($a['desc'][0], $b['desc'][0]); |
| 167 | 167 | }); |
| 168 | 168 | |
@@ -390,7 +390,7 @@ discard block |
||
| 390 | 390 | 'right' => ((1 - ($e['position'] + 1) / $e['overlaps']) * 100).'%', |
| 391 | 391 | 'background-color' => $this->getColor($e['desc'][0]), |
| 392 | 392 | ]; |
| 393 | - $styleStr = implode('; ', array_map(function ($k, $v) { |
|
| 393 | + $styleStr = implode('; ', array_map(function($k, $v) { |
|
| 394 | 394 | return $k.':'.$v; |
| 395 | 395 | }, array_keys($style), $style)); |
| 396 | 396 | |
@@ -24,7 +24,7 @@ |
||
| 24 | 24 | 'template' => '{toggle}', |
| 25 | 25 | 'header' => Yii::t('app', 'Enabled'), |
| 26 | 26 | 'buttons' => [ |
| 27 | - 'toggle' => function ($url, $model) { |
|
| 27 | + 'toggle' => function($url, $model) { |
|
| 28 | 28 | return Html::a('<span class="glyphicon glyphicon-'.($model->enabled ? 'pause' : 'play').'"></span>', $url); |
| 29 | 29 | }, |
| 30 | 30 | ], |
@@ -23,7 +23,7 @@ |
||
| 23 | 23 | 'class' => 'yii\grid\ActionColumn', |
| 24 | 24 | 'template' => '{view} {update} {delete} {toggle}', |
| 25 | 25 | 'buttons' => [ |
| 26 | - 'toggle' => function ($url, $model) { |
|
| 26 | + 'toggle' => function($url, $model) { |
|
| 27 | 27 | return Html::a('<span class="glyphicon glyphicon-'.($model->enabled ? 'pause' : 'play').'"></span>', $url); |
| 28 | 28 | }, |
| 29 | 29 | ], |
@@ -27,7 +27,7 @@ |
||
| 27 | 27 | 'template' => '{link}', |
| 28 | 28 | 'header' => Yii::t('app', 'Link'), |
| 29 | 29 | 'buttons' => [ |
| 30 | - 'link' => function ($url, $_model) use ($model) { |
|
| 30 | + 'link' => function($url, $_model) use ($model) { |
|
| 31 | 31 | return Html::a('<span class="glyphicon glyphicon-plus"></span>', Url::to(['link', 'id' => $model->id, 'flowId' => $_model->id])); |
| 32 | 32 | }, |
| 33 | 33 | ], |
@@ -174,12 +174,12 @@ discard block |
||
| 174 | 174 | $flows = $screen->allFlows(); |
| 175 | 175 | |
| 176 | 176 | // Get all flow ids |
| 177 | - $flowIds = array_map(function ($e) { |
|
| 177 | + $flowIds = array_map(function($e) { |
|
| 178 | 178 | return $e->id; |
| 179 | 179 | }, $flows); |
| 180 | 180 | |
| 181 | 181 | // Get all content type ids |
| 182 | - $contentTypes = array_map(function ($e) { |
|
| 182 | + $contentTypes = array_map(function($e) { |
|
| 183 | 183 | return $e->id; |
| 184 | 184 | }, $field->contentTypes); |
| 185 | 185 | |
@@ -194,7 +194,7 @@ discard block |
||
| 194 | 194 | ->orderBy('duration ASC') |
| 195 | 195 | ->all(); |
| 196 | 196 | |
| 197 | - $next = array_map(function ($c) use ($field) { |
|
| 197 | + $next = array_map(function($c) use ($field) { |
|
| 198 | 198 | return [ |
| 199 | 199 | 'id' => $c->id, |
| 200 | 200 | 'data' => $field->mergeData($c->getData()), |
@@ -275,7 +275,7 @@ |
||
| 275 | 275 | /** |
| 276 | 276 | * Get client device based on session & cookie. |
| 277 | 277 | * |
| 278 | - * @return \app\models\Device|null device |
|
| 278 | + * @return Device device |
|
| 279 | 279 | */ |
| 280 | 280 | private function getClientDevice() |
| 281 | 281 | { |
@@ -52,7 +52,7 @@ discard block |
||
| 52 | 52 | [ |
| 53 | 53 | 'label' => Yii::t('app', 'Preview'), |
| 54 | 54 | 'format' => 'raw', |
| 55 | - 'content' => function ($model) { |
|
| 55 | + 'content' => function($model) { |
|
| 56 | 56 | return Html::a(Yii::t('app', 'Preview'), ['content/preview', 'id' => $model->id], ['class' => 'btn btn-primary']); |
| 57 | 57 | }, |
| 58 | 58 | ], |
@@ -61,7 +61,7 @@ discard block |
||
| 61 | 61 | 'controller' => 'content', |
| 62 | 62 | 'template' => '{view} {update} {delete} {toggle}', |
| 63 | 63 | 'buttons' => [ |
| 64 | - 'toggle' => function ($url, $model) { |
|
| 64 | + 'toggle' => function($url, $model) { |
|
| 65 | 65 | return Html::a('<span class="glyphicon glyphicon-'.($model->enabled ? 'pause' : 'play').'"></span>', $url); |
| 66 | 66 | }, |
| 67 | 67 | ], |
@@ -29,7 +29,7 @@ |
||
| 29 | 29 | |
| 30 | 30 | // Content types |
| 31 | 31 | // Weather widget |
| 32 | - 'weather' => [ // Get an API key at https://darksky.net/dev |
|
| 32 | + 'weather' => [// Get an API key at https://darksky.net/dev |
|
| 33 | 33 | 'language' => 'en', |
| 34 | 34 | 'units' => 'us', |
| 35 | 35 | 'apikey' => '', |
@@ -23,7 +23,7 @@ discard block |
||
| 23 | 23 | 'label' => Yii::t('app', 'Flow'), |
| 24 | 24 | 'attribute' => 'flow.name', |
| 25 | 25 | 'format' => 'html', |
| 26 | - 'value' => function ($model) { |
|
| 26 | + 'value' => function($model) { |
|
| 27 | 27 | return Html::a($model->flow->name, ['flow/view', 'id' => $model->flow->id]); |
| 28 | 28 | }, |
| 29 | 29 | ], |
@@ -31,7 +31,7 @@ discard block |
||
| 31 | 31 | 'class' => 'yii\grid\ActionColumn', |
| 32 | 32 | 'template' => '{view} {update} {delete} {toggle}', |
| 33 | 33 | 'buttons' => [ |
| 34 | - 'toggle' => function ($url, $model) { |
|
| 34 | + 'toggle' => function($url, $model) { |
|
| 35 | 35 | return Html::a('<span class="glyphicon glyphicon-'.($model->enabled ? 'pause' : 'play').'"></span>', $url); |
| 36 | 36 | }, |
| 37 | 37 | ], |
@@ -39,11 +39,11 @@ |
||
| 39 | 39 | $js[] = str_replace('%field%', '#field_'.$field->id, $field->js); |
| 40 | 40 | } |
| 41 | 41 | |
| 42 | - $contentTypes = array_map(function ($ct) { |
|
| 42 | + $contentTypes = array_map(function($ct) { |
|
| 43 | 43 | return $ct->id; |
| 44 | 44 | }, $field->contentTypes); |
| 45 | 45 | |
| 46 | - $classes = array_map(function ($ct) { |
|
| 46 | + $classes = array_map(function($ct) { |
|
| 47 | 47 | return 'field_'.$ct; |
| 48 | 48 | }, $contentTypes); |
| 49 | 49 | |