@@ -51,7 +51,7 @@ |
||
51 | 51 | return true; |
52 | 52 | } |
53 | 53 | |
54 | - /** |
|
54 | + /** |
|
55 | 55 | * @inheritdoc |
56 | 56 | */ |
57 | 57 | public function safeDown() |
@@ -39,8 +39,8 @@ |
||
39 | 39 | public function rules() |
40 | 40 | { |
41 | 41 | return [ |
42 | - ['someAttribute', 'string'], |
|
43 | - ['someAttribute', 'default', 'value' => 'Some Default'], |
|
42 | + [ 'someAttribute', 'string' ], |
|
43 | + [ 'someAttribute', 'default', 'value' => 'Some Default' ], |
|
44 | 44 | ]; |
45 | 45 | } |
46 | 46 | } |
@@ -39,8 +39,8 @@ |
||
39 | 39 | public function rules() |
40 | 40 | { |
41 | 41 | return [ |
42 | - ['someAttribute', 'string'], |
|
43 | - ['someAttribute', 'default', 'value' => 'Some Default'], |
|
42 | + [ 'someAttribute', 'string' ], |
|
43 | + [ 'someAttribute', 'default', 'value' => 'Some Default' ], |
|
44 | 44 | ]; |
45 | 45 | } |
46 | 46 | } |
@@ -39,8 +39,8 @@ |
||
39 | 39 | public function rules() |
40 | 40 | { |
41 | 41 | return [ |
42 | - ['someAttribute', 'string'], |
|
43 | - ['someAttribute', 'default', 'value' => 'Some Default'], |
|
42 | + [ 'someAttribute', 'string' ], |
|
43 | + [ 'someAttribute', 'default', 'value' => 'Some Default' ], |
|
44 | 44 | ]; |
45 | 45 | } |
46 | 46 | } |
@@ -70,39 +70,39 @@ discard block |
||
70 | 70 | Event::on( |
71 | 71 | UrlManager::class, |
72 | 72 | UrlManager::EVENT_REGISTER_SITE_URL_RULES, |
73 | - function (RegisterUrlRulesEvent $event) { |
|
74 | - $event->rules['siteActionTrigger1'] = 'retour/retour'; |
|
73 | + function(RegisterUrlRulesEvent $event) { |
|
74 | + $event->rules[ 'siteActionTrigger1' ] = 'retour/retour'; |
|
75 | 75 | } |
76 | 76 | ); |
77 | 77 | |
78 | 78 | Event::on( |
79 | 79 | UrlManager::class, |
80 | 80 | UrlManager::EVENT_REGISTER_CP_URL_RULES, |
81 | - function (RegisterUrlRulesEvent $event) { |
|
82 | - $event->rules['cpActionTrigger1'] = 'retour/retour/do-something'; |
|
81 | + function(RegisterUrlRulesEvent $event) { |
|
82 | + $event->rules[ 'cpActionTrigger1' ] = 'retour/retour/do-something'; |
|
83 | 83 | } |
84 | 84 | ); |
85 | 85 | |
86 | 86 | Event::on( |
87 | 87 | Fields::class, |
88 | 88 | Fields::EVENT_REGISTER_FIELD_TYPES, |
89 | - function (RegisterComponentTypesEvent $event) { |
|
90 | - $event->types[] = RetourField::class; |
|
89 | + function(RegisterComponentTypesEvent $event) { |
|
90 | + $event->types[ ] = RetourField::class; |
|
91 | 91 | } |
92 | 92 | ); |
93 | 93 | |
94 | 94 | Event::on( |
95 | 95 | Dashboard::class, |
96 | 96 | Dashboard::EVENT_REGISTER_WIDGET_TYPES, |
97 | - function (RegisterComponentTypesEvent $event) { |
|
98 | - $event->types[] = RetourWidget::class; |
|
97 | + function(RegisterComponentTypesEvent $event) { |
|
98 | + $event->types[ ] = RetourWidget::class; |
|
99 | 99 | } |
100 | 100 | ); |
101 | 101 | |
102 | 102 | Event::on( |
103 | 103 | CraftVariable::class, |
104 | 104 | CraftVariable::EVENT_INIT, |
105 | - function (Event $event) { |
|
105 | + function(Event $event) { |
|
106 | 106 | /** @var CraftVariable $variable */ |
107 | 107 | $variable = $event->sender; |
108 | 108 | $variable->set('retour', RetourVariable::class); |
@@ -112,7 +112,7 @@ discard block |
||
112 | 112 | Event::on( |
113 | 113 | Plugins::class, |
114 | 114 | Plugins::EVENT_AFTER_INSTALL_PLUGIN, |
115 | - function (PluginEvent $event) { |
|
115 | + function(PluginEvent $event) { |
|
116 | 116 | if ($event->plugin === $this) { |
117 | 117 | } |
118 | 118 | } |
@@ -122,7 +122,7 @@ discard block |
||
122 | 122 | Craft::t( |
123 | 123 | 'retour', |
124 | 124 | '{name} plugin loaded', |
125 | - ['name' => $this->name] |
|
125 | + [ 'name' => $this->name ] |
|
126 | 126 | ), |
127 | 127 | __METHOD__ |
128 | 128 | ); |
@@ -31,7 +31,7 @@ |
||
31 | 31 | * The actions must be in 'kebab-case' |
32 | 32 | * @access protected |
33 | 33 | */ |
34 | - protected $allowAnonymous = ['index', 'do-something']; |
|
34 | + protected $allowAnonymous = [ 'index', 'do-something' ]; |
|
35 | 35 | |
36 | 36 | // Public Methods |
37 | 37 | // ========================================================================= |
@@ -56,8 +56,8 @@ |
||
56 | 56 | { |
57 | 57 | $rules = parent::rules(); |
58 | 58 | $rules = array_merge($rules, [ |
59 | - ['someAttribute', 'string'], |
|
60 | - ['someAttribute', 'default', 'value' => 'Some Default'], |
|
59 | + [ 'someAttribute', 'string' ], |
|
60 | + [ 'someAttribute', 'default', 'value' => 'Some Default' ], |
|
61 | 61 | ]); |
62 | 62 | return $rules; |
63 | 63 | } |
@@ -73,8 +73,8 @@ |
||
73 | 73 | $rules = array_merge( |
74 | 74 | $rules, |
75 | 75 | [ |
76 | - ['message', 'string'], |
|
77 | - ['message', 'default', 'value' => 'Hello, world.'], |
|
76 | + [ 'message', 'string' ], |
|
77 | + [ 'message', 'default', 'value' => 'Hello, world.' ], |
|
78 | 78 | ] |
79 | 79 | ); |
80 | 80 | return $rules; |