@@ -62,7 +62,7 @@ |
||
| 62 | 62 | $object = new $class(); |
| 63 | 63 | |
| 64 | 64 | // Populate |
| 65 | - if($config) { |
|
| 65 | + if ($config) { |
|
| 66 | 66 | static::populate($object, $config); |
| 67 | 67 | } |
| 68 | 68 | |
@@ -33,7 +33,7 @@ |
||
| 33 | 33 | */ |
| 34 | 34 | public static function prefixSessionData() |
| 35 | 35 | { |
| 36 | - return function ($message) { |
|
| 36 | + return function($message) { |
|
| 37 | 37 | $request = Craft::$app->getRequest(); |
| 38 | 38 | $ip = $request instanceof Request ? $request->getUserIP() : '-'; |
| 39 | 39 | |
@@ -23,7 +23,7 @@ |
||
| 23 | 23 | public static function resolveSiteId(int $siteId = null): int |
| 24 | 24 | { |
| 25 | 25 | |
| 26 | - if(is_null($siteId)) { |
|
| 26 | + if (is_null($siteId)) { |
|
| 27 | 27 | |
| 28 | 28 | $siteId = Craft::$app->getSites()->currentSite->id; |
| 29 | 29 | |
@@ -25,12 +25,12 @@ |
||
| 25 | 25 | { |
| 26 | 26 | |
| 27 | 27 | // No bueno |
| 28 | - if(empty($config)) { |
|
| 28 | + if (empty($config)) { |
|
| 29 | 29 | return $query; |
| 30 | 30 | } |
| 31 | 31 | |
| 32 | 32 | // Force array |
| 33 | - if(!is_array($config)) { |
|
| 33 | + if (!is_array($config)) { |
|
| 34 | 34 | $config = ArrayHelper::toArray($config, [], false); |
| 35 | 35 | } |
| 36 | 36 | |
@@ -106,7 +106,7 @@ |
||
| 106 | 106 | public static function conditionToCriteria($condition) |
| 107 | 107 | { |
| 108 | 108 | |
| 109 | - if(empty($condition)){ |
|
| 109 | + if (empty($condition)) { |
|
| 110 | 110 | return $condition; |
| 111 | 111 | } |
| 112 | 112 | |
@@ -65,7 +65,7 @@ discard block |
||
| 65 | 65 | |
| 66 | 66 | $query = $recordClass::find(); |
| 67 | 67 | |
| 68 | - if($criteria) { |
|
| 68 | + if ($criteria) { |
|
| 69 | 69 | |
| 70 | 70 | QueryHelper::configure( |
| 71 | 71 | $query, |
@@ -123,7 +123,7 @@ discard block |
||
| 123 | 123 | // Do we need to set properties too |
| 124 | 124 | if ($properties) { |
| 125 | 125 | |
| 126 | - if(!is_array($properties)) { |
|
| 126 | + if (!is_array($properties)) { |
|
| 127 | 127 | $properties = ArrayHelper::toArray($properties, [], false); |
| 128 | 128 | } |
| 129 | 129 | |
@@ -211,7 +211,7 @@ |
||
| 211 | 211 | // Resolve siteId |
| 212 | 212 | $siteId = $this->resolveSiteId($siteId); |
| 213 | 213 | |
| 214 | - if(!isset($this->_cacheByString[$siteId])) { |
|
| 214 | + if (!isset($this->_cacheByString[$siteId])) { |
|
| 215 | 215 | $this->_cacheByString[$siteId] = []; |
| 216 | 216 | } |
| 217 | 217 | |
@@ -561,7 +561,7 @@ |
||
| 561 | 561 | // Resolve siteId |
| 562 | 562 | $siteId = SiteHelper::resolveSiteId($siteId); |
| 563 | 563 | |
| 564 | - if(!isset($this->_cacheById[$siteId])) { |
|
| 564 | + if (!isset($this->_cacheById[$siteId])) { |
|
| 565 | 565 | $this->_cacheById[$siteId] = []; |
| 566 | 566 | } |
| 567 | 567 | |