| 
                                                        @@ -113,7 +113,7 @@  discard block  | 
                                                    
                                                    
                                                         | 
                                                         | 
                                                         block discarded – undo  | 
                                                    
                                                                                                                                                                                                                    
                                                            | 
                                                                                                                                    113
                                                                                                                                                                                                 | 
                                                            
                                                                                                                                    113
                                                                                                                                                                                                 | 
                                                                      * no json returned?  | 
                                                        
                                                                                                            
                                                            | 
                                                                                                                                    114
                                                                                                                                                                                                 | 
                                                            
                                                                                                                                    114
                                                                                                                                                                                                 | 
                                                                      */  | 
                                                        
                                                                                                            
                                                            | 
                                                                                                                                    115
                                                                                                                                                                                                 | 
                                                            
                                                                                                                                    115
                                                                                                                                                                                                 | 
                                                                     $contentType = $response->getHeader('Content-Type'); | 
                                                        
                                                                                                            
                                                            | 
                                                                                                                                    116
                                                                                                                                                                                                 | 
                                                            
                                                                                                                             | 
                                                            -        if (! isset($contentType[0]) || $contentType[0] != 'application/json') { | 
                                                        
                                                                                                            
                                                            | 
                                                                                                                             | 
                                                            
                                                                                                                                    116
                                                                                                                                                                                                 | 
                                                            +        if (!isset($contentType[0]) || $contentType[0] != 'application/json') { | 
                                                        
                                                                                                            
                                                            | 
                                                                                                                                    117
                                                                                                                                                                                                 | 
                                                            
                                                                                                                                    117
                                                                                                                                                                                                 | 
                                                                         throw new Exception\RequestException('Could not get valid "application/json" response from "' . $request->getUri() . '". Response is "' . $response->getBody()->getContents() . '"'); | 
                                                        
                                                                                                            
                                                            | 
                                                                                                                                    118
                                                                                                                                                                                                 | 
                                                            
                                                                                                                                    118
                                                                                                                                                                                                 | 
                                                                     }  | 
                                                        
                                                                                                            
                                                            | 
                                                                                                                                    119
                                                                                                                                                                                                 | 
                                                            
                                                                                                                                    119
                                                                                                                                                                                                 | 
                                                               | 
                                                        
                                                                                                                                                        
                                                         | 
                                                        @@ -144,14 +144,14 @@  discard block  | 
                                                    
                                                    
                                                         | 
                                                         | 
                                                         block discarded – undo  | 
                                                    
                                                                                                                                                                                                                    
                                                            | 
                                                                                                                                    144
                                                                                                                                                                                                 | 
                                                            
                                                                                                                                    144
                                                                                                                                                                                                 | 
                                                                         throw new Exception\InvalidCredentialsException('Your API key "' . $this->apiKey . '" is not valid for ' . $this->getName()); | 
                                                        
                                                                                                            
                                                            | 
                                                                                                                                    145
                                                                                                                                                                                                 | 
                                                            
                                                                                                                                    145
                                                                                                                                                                                                 | 
                                                                     }  | 
                                                        
                                                                                                            
                                                            | 
                                                                                                                                    146
                                                                                                                                                                                                 | 
                                                            
                                                                                                                                    146
                                                                                                                                                                                                 | 
                                                               | 
                                                        
                                                                                                            
                                                            | 
                                                                                                                                    147
                                                                                                                                                                                                 | 
                                                            
                                                                                                                             | 
                                                            -        if (! isset($content->result) || $content->result !== 'success') { | 
                                                        
                                                                                                            
                                                            | 
                                                                                                                             | 
                                                            
                                                                                                                                    147
                                                                                                                                                                                                 | 
                                                            +        if (!isset($content->result) || $content->result !== 'success') { | 
                                                        
                                                                                                            
                                                            | 
                                                                                                                                    148
                                                                                                                                                                                                 | 
                                                            
                                                                                                                                    148
                                                                                                                                                                                                 | 
                                                                         throw new Exception\RequestException('Could not get valid response from "' . $request->getUri() . '". Response is "' . $response->getBody()->getContents() . '"'); | 
                                                        
                                                                                                            
                                                            | 
                                                                                                                                    149
                                                                                                                                                                                                 | 
                                                            
                                                                                                                                    149
                                                                                                                                                                                                 | 
                                                                     }  | 
                                                        
                                                                                                            
                                                            | 
                                                                                                                                    150
                                                                                                                                                                                                 | 
                                                            
                                                                                                                                    150
                                                                                                                                                                                                 | 
                                                               | 
                                                        
                                                                                                            
                                                            | 
                                                                                                                                    151
                                                                                                                                                                                                 | 
                                                            
                                                                                                                                    151
                                                                                                                                                                                                 | 
                                                                     /*  | 
                                                        
                                                                                                            
                                                            | 
                                                                                                                                    152
                                                                                                                                                                                                 | 
                                                            
                                                                                                                                    152
                                                                                                                                                                                                 | 
                                                                      * Missing data?  | 
                                                        
                                                                                                            
                                                            | 
                                                                                                                                    153
                                                                                                                                                                                                 | 
                                                            
                                                                                                                                    153
                                                                                                                                                                                                 | 
                                                                      */  | 
                                                        
                                                                                                            
                                                            | 
                                                                                                                                    154
                                                                                                                                                                                                 | 
                                                            
                                                                                                                             | 
                                                            -        if (! $content instanceof stdClass || ! isset($content->parse) || ! $content->parse instanceof stdClass) { | 
                                                        
                                                                                                            
                                                            | 
                                                                                                                             | 
                                                            
                                                                                                                                    154
                                                                                                                                                                                                 | 
                                                            +        if (!$content instanceof stdClass || !isset($content->parse) || !$content->parse instanceof stdClass) { | 
                                                        
                                                                                                            
                                                            | 
                                                                                                                                    155
                                                                                                                                                                                                 | 
                                                            
                                                                                                                                    155
                                                                                                                                                                                                 | 
                                                                         throw new Exception\RequestException('Could not get valid response from "' . $request->getUri() . '". Response is "' . print_r($content, true) . '"'); | 
                                                        
                                                                                                            
                                                            | 
                                                                                                                                    156
                                                                                                                                                                                                 | 
                                                            
                                                                                                                                    156
                                                                                                                                                                                                 | 
                                                                     }  | 
                                                        
                                                                                                            
                                                            | 
                                                                                                                                    157
                                                                                                                                                                                                 | 
                                                            
                                                                                                                                    157
                                                                                                                                                                                                 | 
                                                               | 
                                                        
                                                                                                                                                
                                         
                                        
                                            
                                                                                                    Please login to merge, or discard this patch.