Completed
Push — master ( d44482...964528 )
by Jan
01:44
created
JanDrda/LaravelGoogleCustomSearchEngine/LaravelGoogleCustomSearchEngine.php 2 patches
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
      *
48 48
      * @param $engineId
49 49
      */
50
-    public function setEngineId($engineId){
50
+    public function setEngineId($engineId) {
51 51
         $this->engineId = $engineId;
52 52
     }
53 53
 
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
      *
57 57
      * @param $engineId
58 58
      */
59
-    public function setApiKey($apiKey){
59
+    public function setApiKey($apiKey) {
60 60
         $this->apiKey = $apiKey;
61 61
     }
62 62
 
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
          */
138 138
         if ($output === false || $info['http_code'] != 200) {
139 139
 
140
-            throw new \Exception("No data returned, code [". $info['http_code']. "] - " . curl_error($ch));
140
+            throw new \Exception("No data returned, code [" . $info['http_code'] . "] - " . curl_error($ch));
141 141
         }
142 142
 
143 143
         /**
@@ -148,10 +148,10 @@  discard block
 block discarded – undo
148 148
         /**
149 149
          * If there are some results, return them, otherwise return blank array
150 150
          */
151
-        if(isset($this->originalResponse->items)){
151
+        if (isset($this->originalResponse->items)) {
152 152
             return $this->originalResponse->items;
153 153
         }
154
-        else{
154
+        else {
155 155
             return array();
156 156
         }
157 157
 
@@ -168,7 +168,7 @@  discard block
 block discarded – undo
168 168
      * @return \stdClass
169 169
      * @url https://developers.google.com/custom-search/json-api/v1/reference/cse/list#response
170 170
      */
171
-    public function getRawResult(){
171
+    public function getRawResult() {
172 172
         return $this->originalResponse;
173 173
     }
174 174
 
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
      *
184 184
      * @return \stdClass
185 185
      */
186
-    public function getSearchInformation(){
186
+    public function getSearchInformation() {
187 187
         return $this->originalResponse->searchInformation;
188 188
     }
189 189
 
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
      *
193 193
      * @return integer
194 194
      */
195
-    public function getTotalNumberOfpages(){
195
+    public function getTotalNumberOfpages() {
196 196
         return $this->originalResponse->searchInformation->totalResults;
197 197
     }
198 198
 
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -150,8 +150,7 @@
 block discarded – undo
150 150
          */
151 151
         if(isset($this->originalResponse->items)){
152 152
             return $this->originalResponse->items;
153
-        }
154
-        else{
153
+        } else{
155 154
             return array();
156 155
         }
157 156
 
Please login to merge, or discard this patch.
LaravelGoogleCustomSearchEngine/LaravelGoogleCustomSearchEngineProvider.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -9,13 +9,13 @@
 block discarded – undo
9 9
     public function boot()
10 10
     {
11 11
         $this->publishes([
12
-            __DIR__.'/../../config/laravelGoogleCustomSearchEngine.php' => config_path('laravelGoogleCustomSearchEngine.php'),
12
+            __DIR__ . '/../../config/laravelGoogleCustomSearchEngine.php' => config_path('laravelGoogleCustomSearchEngine.php'),
13 13
         ]);
14 14
     }
15 15
 
16 16
     public function register()
17 17
     {
18
-        $this->app->bind('laravelGoogleCustomSearchEngine', function () {
18
+        $this->app->bind('laravelGoogleCustomSearchEngine', function() {
19 19
 
20 20
             return new LaravelGoogleCustomSearchEngine(config('laravelGoogleCustomSearchEngine.engineId'),
21 21
                 config('laravelGoogleCustomSearchEngine.apiKey'));
Please login to merge, or discard this patch.