| 1 | <?php |
||||
| 2 | |||||
| 3 | namespace shweshi\LaravelUnsplashWrapper; |
||||
| 4 | |||||
| 5 | use GuzzleHttp\Client; |
||||
| 6 | |||||
| 7 | class BaseClass |
||||
| 8 | { |
||||
| 9 | /** |
||||
| 10 | * Base url of unsplash api. |
||||
| 11 | * |
||||
| 12 | * @var string |
||||
| 13 | */ |
||||
| 14 | private $baseUrl = 'https://api.unsplash.com/'; |
||||
| 15 | |||||
| 16 | /** |
||||
| 17 | * Response from unsplash api. |
||||
| 18 | */ |
||||
| 19 | private $response; |
||||
| 20 | |||||
| 21 | /** |
||||
| 22 | * Calls unsplash api. |
||||
| 23 | * |
||||
| 24 | * @param string $url |
||||
| 25 | * @param array $params |
||||
| 26 | * |
||||
| 27 | * @return mix |
||||
|
0 ignored issues
–
show
|
|||||
| 28 | */ |
||||
| 29 | protected function call($url, $params) |
||||
| 30 | { |
||||
| 31 | $client = new Client([ |
||||
| 32 | 'base_uri' => $this->baseUrl, |
||||
| 33 | ]); |
||||
| 34 | $response = $client->request('GET', $url, [ |
||||
| 35 | 'headers' => [ |
||||
| 36 | 'Authorization' => 'Client-ID '.config('unsplash.ApplicationID'), |
||||
|
0 ignored issues
–
show
The function
config was not found. Maybe you did not declare it correctly or list all dependencies?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
Loading history...
|
|||||
| 37 | ], |
||||
| 38 | 'form_params' => $params, |
||||
| 39 | 'query' => $params, |
||||
| 40 | ]); |
||||
| 41 | |||||
| 42 | return $response->getBody(); |
||||
|
0 ignored issues
–
show
|
|||||
| 43 | } |
||||
| 44 | } |
||||
| 45 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths