Passed
Push — master ( caf566...d31b80 )
by Mina
03:05
created
src/ElasticClient.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
      *
66 66
      * @return array
67 67
      */
68
-    public function createIndex($params = [])
68
+    public function createIndex($params = [ ])
69 69
     {
70 70
         return $this->client->indices()->create($this->mergeParams($params));
71 71
     }
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
      *
78 78
      * @return array
79 79
      */
80
-    public function dropIndex($params = [])
80
+    public function dropIndex($params = [ ])
81 81
     {
82 82
         return $this->client->indices()->delete($this->mergeParams($params));
83 83
     }
Please login to merge, or discard this patch.
src/ElasticSearcher.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
     {
18 18
         $query = self::buildQuery($params);
19 19
 
20
-        if(isset($object))
20
+        if (isset($object))
21 21
         {
22 22
             $query = static::addType($object) + $query;
23 23
         }
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
                 'query' => $params
39 39
             ]
40 40
         ];
41
-        if(isset($object))
41
+        if (isset($object))
42 42
         {
43 43
             $query = static::addType($object) + $query;
44 44
         }
@@ -67,13 +67,13 @@  discard block
 block discarded – undo
67 67
      */
68 68
     protected static function addType($object)
69 69
     {
70
-        if(is_object($object)){
70
+        if (is_object($object)) {
71 71
             $type = static::checkValidEloquent($object);
72 72
         }
73
-        else{
73
+        else {
74 74
             $type = (new $object)->getTable();
75 75
         }
76
-        return ["type"=>$type];
76
+        return [ "type"=>$type ];
77 77
     }
78 78
 
79 79
     /**
Please login to merge, or discard this patch.
src/Console/IndexInitializationTrait.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
     {
67 67
         $password = str_random(7);
68 68
         $input = $this->ask('For safety please enter this text "'.$password.'"');
69
-        if($input == $password){
69
+        if ($input == $password) {
70 70
             return $this->buildIndex();
71 71
         }
72 72
         else {
@@ -86,11 +86,11 @@  discard block
 block discarded – undo
86 86
         $this->client->dropIndex();
87 87
         $response = $this->client->createIndex($this->params);
88 88
 
89
-        if(is_array($response) && $response['acknowledged'] == true)
89
+        if (is_array($response) && $response[ 'acknowledged' ] == true)
90 90
         {
91 91
             $this->info('Index Initialization Successful');
92 92
         }
93
-        else{
93
+        else {
94 94
             $this->error('Index Initialization Failed');
95 95
         }
96 96
     }
Please login to merge, or discard this patch.