Completed
Push — master ( 10890d...dbd4c3 )
by Juuso
05:13
created
src/AlgoliaManager.php 3 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -205,7 +205,7 @@
 block discarded – undo
205 205
     /**
206 206
      * Checks if the given class implements SearchableInterface.
207 207
      *
208
-     * @param mixed $class Either name or instance of the class to be checked.
208
+     * @param string $class Either name or instance of the class to be checked.
209 209
      */
210 210
     private function checkImplementsSearchableInterface($class)
211 211
     {
Please login to merge, or discard this patch.
Indentation   -1 removed lines patch added patch discarded remove patch
@@ -191,7 +191,6 @@
 block discarded – undo
191 191
 
192 192
     /**
193 193
      * Dynamically pass methods to the Algolia Client.
194
-
195 194
      * @param string $method
196 195
      * @param array  $parameters
197 196
      *
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -161,7 +161,7 @@  discard block
 block discarded – undo
161 161
         }
162 162
 
163 163
         foreach ($indices as $index) {
164
-            $temporaryIndexName = 'tmp_' . $index;
164
+            $temporaryIndexName = 'tmp_'.$index;
165 165
 
166 166
             /** @var Index $temporaryIndex */
167 167
             $temporaryIndex = $this->initIndex($temporaryIndexName);
@@ -211,7 +211,7 @@  discard block
 block discarded – undo
211 211
     {
212 212
         $reflectionClass = new \ReflectionClass($class);
213 213
 
214
-        if (! $reflectionClass->implementsInterface(SearchableInterface::class)) {
214
+        if ( ! $reflectionClass->implementsInterface(SearchableInterface::class)) {
215 215
             throw new \InvalidArgumentException("The class: {$reflectionClass->getName()} doesn't implement leinonen\\Yii2Algolia\\SearchableInterface");
216 216
         }
217 217
     }
Please login to merge, or discard this patch.
src/AlgoliaComponent.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@
 block discarded – undo
43 43
     public function bootstrap($app)
44 44
     {
45 45
         Yii::$container->set(AlgoliaManager::class, function () {
46
-             return $this->createManager();
46
+                return $this->createManager();
47 47
         });
48 48
     }
49 49
 
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@
 block discarded – undo
42 42
      */
43 43
     public function bootstrap($app)
44 44
     {
45
-        Yii::$container->set(AlgoliaManager::class, function () {
45
+        Yii::$container->set(AlgoliaManager::class, function() {
46 46
              return $this->createManager();
47 47
         });
48 48
     }
Please login to merge, or discard this patch.
src/ActiveRecord/SynchronousAutoIndexBehavior.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -37,21 +37,21 @@
 block discarded – undo
37 37
     public function events()
38 38
     {
39 39
         return [
40
-            ActiveRecord::EVENT_AFTER_INSERT => function (Event $event) {
40
+            ActiveRecord::EVENT_AFTER_INSERT => function(Event $event) {
41 41
                 if ($this->afterInsert) {
42 42
                     /** @var $manager AlgoliaManager */
43 43
                     $manager = Yii::$container->get(AlgoliaManager::class);
44 44
                     $manager->pushToIndices($event->sender);
45 45
                 }
46 46
             },
47
-            ActiveRecord::EVENT_AFTER_DELETE => function (Event $event) {
47
+            ActiveRecord::EVENT_AFTER_DELETE => function(Event $event) {
48 48
                 if ($this->afterDelete) {
49 49
                     /** @var $manager AlgoliaManager */
50 50
                     $manager = Yii::$container->get(AlgoliaManager::class);
51 51
                     $manager->removeFromIndices($event->sender);
52 52
                 }
53 53
             },
54
-            ActiveRecord::EVENT_AFTER_UPDATE => function (Event $event) {
54
+            ActiveRecord::EVENT_AFTER_UPDATE => function(Event $event) {
55 55
                 if ($this->afterUpdate) {
56 56
                     /** @var $manager AlgoliaManager */
57 57
                     $manager = Yii::$container->get(AlgoliaManager::class);
Please login to merge, or discard this patch.
src/ActiveRecord/ActiveRecordFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@
 block discarded – undo
15 15
      */
16 16
     public function make($className)
17 17
     {
18
-        if (! (new \ReflectionClass($className))->implementsInterface(ActiveRecordInterface::class)) {
18
+        if ( ! (new \ReflectionClass($className))->implementsInterface(ActiveRecordInterface::class)) {
19 19
             throw new \InvalidArgumentException("Cannot initiate a class ({$className}) which doesn't implement \\yii\\db\\ActiveRecordInterface");
20 20
         }
21 21
 
Please login to merge, or discard this patch.
src/AlgoliaFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@
 block discarded – undo
44 44
      */
45 45
     protected function getConfig(array $config)
46 46
     {
47
-        if (! array_key_exists('applicationId', $config) || ! array_key_exists('apiKey', $config)) {
47
+        if ( ! array_key_exists('applicationId', $config) || ! array_key_exists('apiKey', $config)) {
48 48
             throw new InvalidArgumentException('Configuration keys applicationId and apiKey are required');
49 49
         }
50 50
 
Please login to merge, or discard this patch.