Skip to content

Commit

Permalink
Code checkstyle
Browse files Browse the repository at this point in the history
  • Loading branch information
webeweb committed May 28, 2024
1 parent 1d78c6b commit 67195a4
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 25 deletions.
1 change: 0 additions & 1 deletion src/Provider/AbstractProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,6 @@ private function callApi(string $uri, array $queryData): string {

return $response->getBody()->getContents();
} catch (Throwable $ex) {

throw new ProviderException("Call Pexels API failed", 500, $ex);
}
}
Expand Down
24 changes: 0 additions & 24 deletions tests/Provider/ApiProviderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,8 @@ public function testCollection(): void {
try {

$res = $obj->sendRequest($request);

$this->assertInstanceOf(CollectionResponse::class, $res);
} catch (Throwable $ex) {

$this->assertInstanceOf(ProviderException::class, $ex);
}
}
Expand All @@ -107,10 +105,8 @@ public function testCollections(): void {
try {

$res = $obj->sendRequest($request);

$this->assertInstanceOf(CollectionsResponse::class, $res);
} catch (Throwable $ex) {

$this->assertInstanceOf(ProviderException::class, $ex);
}
}
Expand All @@ -133,10 +129,8 @@ public function testCuratedPhotos(): void {
try {

$res = $obj->sendRequest($request);

$this->assertInstanceOf(PhotosResponse::class, $res);
} catch (Throwable $ex) {

$this->assertInstanceOf(ProviderException::class, $ex);
}
}
Expand Down Expand Up @@ -178,10 +172,8 @@ public function testGetPhoto(): void {
try {

$res = $obj->sendRequest($request);

$this->assertInstanceOf(PhotoResponse::class, $res);
} catch (Throwable $ex) {

$this->assertInstanceOf(ProviderException::class, $ex);
}
}
Expand Down Expand Up @@ -224,10 +216,8 @@ public function testGetVideo(): void {
try {

$res = $obj->sendRequest($request);

$this->assertInstanceOf(VideoResponse::class, $res);
} catch (Throwable $ex) {

$this->assertInstanceOf(ProviderException::class, $ex);
}
}
Expand All @@ -247,10 +237,8 @@ public function testPopularVideos(): void {
try {

$res = $obj->sendRequest($request);

$this->assertInstanceOf(VideosResponse::class, $res);
} catch (Throwable $ex) {

$this->assertInstanceOf(ProviderException::class, $ex);
}
}
Expand Down Expand Up @@ -292,10 +280,8 @@ public function testRequestNextPageWithPhotosResponse(): void {
$arg = $obj->sendRequest($request);

$res = $obj->requestNextPage($arg);

$this->assertInstanceOf(PhotosResponse::class, $res);
} catch (Throwable $ex) {

$this->assertInstanceOf(ProviderException::class, $ex);
}
}
Expand All @@ -319,10 +305,8 @@ public function testRequestNextPageWithVideosResponse(): void {
$arg = $obj->sendRequest($request);

$res = $obj->requestNextPage($arg);

$this->assertInstanceOf(VideosResponse::class, $res);
} catch (Throwable $ex) {

$this->assertInstanceOf(ProviderException::class, $ex);
}
}
Expand All @@ -347,10 +331,8 @@ public function testRequestPrevPageWithPhotosResponse(): void {
$arg = $obj->sendRequest($request);

$res = $obj->requestPrevPage($arg);

$this->assertInstanceOf(PhotosResponse::class, $res);
} catch (Throwable $ex) {

$this->assertInstanceOf(ProviderException::class, $ex);
}
}
Expand All @@ -375,10 +357,8 @@ public function testRequestPrevPageWithVideosResponse(): void {
$arg = $obj->sendRequest($request);

$res = $obj->requestPrevPage($arg);

$this->assertInstanceOf(VideosResponse::class, $res);
} catch (Throwable $ex) {

$this->assertInstanceOf(ProviderException::class, $ex);
}
}
Expand All @@ -400,10 +380,8 @@ public function testSearchPhotos(): void {
try {

$res = $obj->sendRequest($request);

$this->assertInstanceOf(PhotosResponse::class, $res);
} catch (Throwable $ex) {

$this->assertInstanceOf(ProviderException::class, $ex);
}
}
Expand All @@ -424,10 +402,8 @@ public function testSearchVideos(): void {
try {

$res = $obj->sendRequest($request);

$this->assertInstanceOf(VideosResponse::class, $res);
} catch (Throwable $ex) {

$this->assertInstanceOf(ProviderException::class, $ex);
}
}
Expand Down

0 comments on commit 67195a4

Please sign in to comment.