@@ -102,7 +102,7 @@ discard block |
||
102 | 102 | * @param string $username |
103 | 103 | * @param string $password |
104 | 104 | * |
105 | - * @return \User|null created user |
|
105 | + * @return User|null created user |
|
106 | 106 | */ |
107 | 107 | public static function create($username, $password) |
108 | 108 | { |
@@ -137,7 +137,7 @@ discard block |
||
137 | 137 | * |
138 | 138 | * @param string $id user ID |
139 | 139 | * |
140 | - * @return \User|null found user |
|
140 | + * @return User|null found user |
|
141 | 141 | */ |
142 | 142 | public static function findInLdap($id) |
143 | 143 | { |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | { |
114 | 114 | $types = self::find()->all(); |
115 | 115 | |
116 | - return array_filter($types, function ($t) use ($selfUpdate, $usableOnly) { |
|
116 | + return array_filter($types, function($t) use ($selfUpdate, $usableOnly) { |
|
117 | 117 | return ($selfUpdate === null || $t->selfUpdate == $selfUpdate) && (!$usableOnly || $t->usable); |
118 | 118 | }); |
119 | 119 | } |
@@ -148,7 +148,7 @@ discard block |
||
148 | 148 | { |
149 | 149 | $types = self::find()->all(); |
150 | 150 | |
151 | - return array_filter(array_map(function ($t) { |
|
151 | + return array_filter(array_map(function($t) { |
|
152 | 152 | return $t->input == self::KINDS['FILE'] ? $t->id : null; |
153 | 153 | }, $types)); |
154 | 154 | } |
@@ -175,12 +175,12 @@ discard block |
||
175 | 175 | $flows = $screen->allFlows(); |
176 | 176 | |
177 | 177 | // Get all flow ids |
178 | - $flowIds = array_map(function ($e) { |
|
178 | + $flowIds = array_map(function($e) { |
|
179 | 179 | return $e->id; |
180 | 180 | }, $flows); |
181 | 181 | |
182 | 182 | // Get all content type ids |
183 | - $contentTypes = array_map(function ($e) { |
|
183 | + $contentTypes = array_map(function($e) { |
|
184 | 184 | return $e->id; |
185 | 185 | }, $field->contentTypes); |
186 | 186 | |
@@ -194,7 +194,7 @@ discard block |
||
194 | 194 | ->andWhere(['or', ['end_ts' => null], ['>', 'end_ts', new Expression('NOW()')]]) |
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()), |
@@ -44,11 +44,11 @@ |
||
44 | 44 | $js[] = $field->js; |
45 | 45 | } |
46 | 46 | |
47 | - $contentTypes = array_map(function ($ct) { |
|
47 | + $contentTypes = array_map(function($ct) { |
|
48 | 48 | return $ct->id; |
49 | 49 | }, $field->contentTypes); |
50 | 50 | |
51 | - $classes = array_map(function ($ct) { |
|
51 | + $classes = array_map(function($ct) { |
|
52 | 52 | return 'field_'.$ct; |
53 | 53 | }, $contentTypes); |
54 | 54 |
@@ -33,7 +33,7 @@ |
||
33 | 33 | 'class' => 'yii\grid\ActionColumn', |
34 | 34 | 'template' => '{view} {update} {delete} {toggle}', |
35 | 35 | 'buttons' => [ |
36 | - 'toggle' => function ($url, $model, $key) { |
|
36 | + 'toggle' => function($url, $model, $key) { |
|
37 | 37 | return Html::a('<span class="glyphicon glyphicon-'.($model->enabled ? 'pause' : 'play').'"></span>', $url); |
38 | 38 | }, |
39 | 39 | ], |
@@ -27,7 +27,7 @@ |
||
27 | 27 | 'template' => '{link}', |
28 | 28 | 'header' => Yii::t('app', 'Link'), |
29 | 29 | 'buttons' => [ |
30 | - 'link' => function ($url, $_model, $key) use ($model) { |
|
30 | + 'link' => function($url, $_model, $key) 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 | ], |
@@ -57,7 +57,7 @@ |
||
57 | 57 | 'controller' => 'flow', |
58 | 58 | 'template' => '{view} {update} {unlink}', |
59 | 59 | 'buttons' => [ |
60 | - 'unlink' => function ($url, $_model, $key) use ($model) { |
|
60 | + 'unlink' => function($url, $_model, $key) use ($model) { |
|
61 | 61 | return Html::a('<span class="glyphicon glyphicon-remove"></span>', Url::to(['unlink', 'id' => $model->id, 'flowId' => $_model->id])); |
62 | 62 | }, |
63 | 63 | ], |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | 'last_login_at', |
27 | 27 | [ |
28 | 28 | 'attribute' => 'role', |
29 | - 'value' => function ($model, $key, $index, $column) { |
|
29 | + 'value' => function($model, $key, $index, $column) { |
|
30 | 30 | return $model->role ? Yii::t('app', $model->role->name) : null; |
31 | 31 | }, |
32 | 32 | ], |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | ['class' => 'yii\grid\ActionColumn', |
35 | 35 | 'template' => '{view} {set-roles} {delete}', |
36 | 36 | 'buttons' => [ |
37 | - 'set-roles' => function ($url, $model, $key) { |
|
37 | + 'set-roles' => function($url, $model, $key) { |
|
38 | 38 | return Html::a('<span class="glyphicon glyphicon-cog"></span>', $url); |
39 | 39 | }, |
40 | 40 | ], |
@@ -36,7 +36,7 @@ |
||
36 | 36 | ], |
37 | 37 | [ |
38 | 38 | 'attribute' => 'flows', |
39 | - 'value' => count($model->flows) ? implode(', ', array_map(function ($f) { |
|
39 | + 'value' => count($model->flows) ? implode(', ', array_map(function($f) { |
|
40 | 40 | return $f->name; |
41 | 41 | }, $model->flows)) : null, |
42 | 42 | 'visible' => $model->needsFlow, |