Passed
Push — develop ( 445848...e7085d )
by Andrew
07:17 queued 04:18
created
src/Similar.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
         Event::on(
59 59
             CraftVariable::class,
60 60
             CraftVariable::EVENT_INIT,
61
-            function (Event $event) {
61
+            function(Event $event) {
62 62
                 /** @var CraftVariable $variable */
63 63
                 $variable = $event->sender;
64 64
                 $variable->set('similar', SimilarVariable::class);
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
         Event::on(
78 78
             Plugins::class,
79 79
             Plugins::EVENT_AFTER_INSTALL_PLUGIN,
80
-            function (PluginEvent $event) {
80
+            function(PluginEvent $event) {
81 81
                 if ($event->plugin === $this) {
82 82
                 }
83 83
             }
Please login to merge, or discard this patch.
src/services/Similar.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
         $elements = Craft::$app->getElements();
106 106
         $models = [];
107 107
         foreach ($results as $config) {
108
-            if($config['id'] && $config['siteId']) {
108
+            if ($config['id'] && $config['siteId']) {
109 109
                 $model = $elements->getElementById($config['id'], $elementClass, $config['siteId']);
110 110
                 if ($model) {
111 111
                     // The `count` property is added dynamically by our CountBehavior behavior
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
         $query->query->limit($this->limit); // or whatever limit is set
140 140
 
141 141
         $query->subQuery->groupBy('elements.id');
142
-        if($query->elementType == 'craft\elements\Entry') {
142
+        if ($query->elementType == 'craft\elements\Entry') {
143 143
             $query->subQuery->addGroupBy('structureelements.lft');
144 144
         }
145 145
         $event->isValid = true;
Please login to merge, or discard this patch.