Passed
Push — develop ( 7309f3...74bb04 )
by Andrew
04:39 queued 02:20
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
@@ -88,12 +88,12 @@
 block discarded – undo
88 88
         }
89 89
 
90 90
         // We need to modify the actual craft\db\Query after the ElementQuery has been prepared
91
-        $query->on(ElementQuery::EVENT_AFTER_PREPARE, function (CancelableEvent $event) {
91
+        $query->on(ElementQuery::EVENT_AFTER_PREPARE, function(CancelableEvent $event) {
92 92
             /** @var ElementQuery $query */
93 93
             $query = $event->sender;
94 94
             // Add in the `count` param so we know how many were fetched
95 95
             $query->query->addSelect(['COUNT(*) as count']);
96
-            $query->query->orderBy('count DESC, '.str_replace('`', '', $this->preOrder));
96
+            $query->query->orderBy('count DESC, ' . str_replace('`', '', $this->preOrder));
97 97
             $query->query->groupBy('{{%relations}}.sourceId');
98 98
             $query->subQuery->groupBy('{{%elements}}.id');
99 99
             $event->isValid = true;
Please login to merge, or discard this patch.