@@ -30,7 +30,7 @@ |
||
30 | 30 | */ |
31 | 31 | public static function prefixSessionData() |
32 | 32 | { |
33 | - return function () { |
|
33 | + return function() { |
|
34 | 34 | $request = Craft::$app->getRequest(); |
35 | 35 | $ip = $request instanceof Request ? $request->getUserIP() : '-'; |
36 | 36 |
@@ -43,11 +43,11 @@ |
||
43 | 43 | public function find($identifier, string $toScenario = null) |
44 | 44 | { |
45 | 45 | |
46 | - if($model = parent::find($identifier, $toScenario)) { |
|
46 | + if ($model = parent::find($identifier, $toScenario)) { |
|
47 | 47 | return $model; |
48 | 48 | } |
49 | 49 | |
50 | - if(!is_string($identifier)) { |
|
50 | + if (!is_string($identifier)) { |
|
51 | 51 | return null; |
52 | 52 | } |
53 | 53 |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | $isNew = (null === $model->id); |
59 | 59 | |
60 | 60 | // a 'beforeSave' event |
61 | - if(!$this->beforeSave($model, $isNew)) { |
|
61 | + if (!$this->beforeSave($model, $isNew)) { |
|
62 | 62 | return false; |
63 | 63 | } |
64 | 64 | |
@@ -159,8 +159,8 @@ discard block |
||
159 | 159 | |
160 | 160 | Craft::info(sprintf( |
161 | 161 | "Model '%s' with ID '%s' was saved successfully.", |
162 | - (string) get_class($model), |
|
163 | - (string) $model->id |
|
162 | + (string)get_class($model), |
|
163 | + (string)$model->id |
|
164 | 164 | ), __METHOD__); |
165 | 165 | |
166 | 166 | } |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | { |
48 | 48 | |
49 | 49 | // a 'beforeSave' event |
50 | - if(!$this->beforeDelete($model)) { |
|
50 | + if (!$this->beforeDelete($model)) { |
|
51 | 51 | return false; |
52 | 52 | } |
53 | 53 | |
@@ -128,8 +128,8 @@ discard block |
||
128 | 128 | |
129 | 129 | Craft::info(sprintf( |
130 | 130 | "Model '%s' with ID '%s' was deleted successfully.", |
131 | - (string) get_class($model), |
|
132 | - (string) $model->id |
|
131 | + (string)get_class($model), |
|
132 | + (string)$model->id |
|
133 | 133 | ), __METHOD__); |
134 | 134 | |
135 | 135 | } |