Skip to content

Commit

Permalink
Apply fixes from StyleCI (koel#799)
Browse files Browse the repository at this point in the history
  • Loading branch information
phanan authored Aug 31, 2018
1 parent d88dd79 commit 40d4174
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 10 deletions.
4 changes: 2 additions & 2 deletions app/Services/ApiClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

use GuzzleHttp\Client;
use GuzzleHttp\Exception\ClientException;
use Illuminate\Log\Logger;
use Illuminate\Contracts\Cache\Repository as Cache;
use Illuminate\Log\Logger;
use InvalidArgumentException;
use SimpleXMLElement;

Expand Down Expand Up @@ -71,7 +71,7 @@ public function request(string $method, string $uri, bool $appendKey = true, arr
} catch (ClientException $e) {
$this->logger->error($e);

return null;
return;
}
}

Expand Down
2 changes: 2 additions & 0 deletions app/Services/ApiConsumerInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
interface ApiConsumerInterface
{
public function getEndpoint(): ?string;

public function getKey(): ?string;

public function getSecret(): ?string;
}
2 changes: 1 addition & 1 deletion app/Services/YouTubeService.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public function searchVideosRelatedToSong(Song $song, string $pageToken = '')
public function search(string $q, string $pageToken = '', int $perPage = 10)
{
if (!$this->enabled()) {
return null;
return;
}

$uri = sprintf('search?part=snippet&type=video&maxResults=%s&pageToken=%s&q=%s',
Expand Down
1 change: 0 additions & 1 deletion tests/CreatesApplication.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
namespace Tests;

use App\Models\User;

use Illuminate\Contracts\Console\Kernel as Artisan;
use Illuminate\Foundation\Application;

Expand Down
8 changes: 4 additions & 4 deletions tests/Feature/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,28 +56,28 @@ protected function createSampleMediaSet(): void
protected function getAsUser($url, $user = null): self
{
return $this->get($url, [
'Authorization' => 'Bearer ' . $this->generateJwtToken($user),
'Authorization' => 'Bearer '.$this->generateJwtToken($user),
]);
}

protected function deleteAsUser($url, $data = [], $user = null): self
{
return $this->delete($url, $data, [
'Authorization' => 'Bearer ' . $this->generateJwtToken($user),
'Authorization' => 'Bearer '.$this->generateJwtToken($user),
]);
}

protected function postAsUser($url, $data, $user = null): self
{
return $this->post($url, $data, [
'Authorization' => 'Bearer ' . $this->generateJwtToken($user),
'Authorization' => 'Bearer '.$this->generateJwtToken($user),
]);
}

protected function putAsUser($url, $data, $user = null): self
{
return $this->put($url, $data, [
'Authorization' => 'Bearer ' . $this->generateJwtToken($user),
'Authorization' => 'Bearer '.$this->generateJwtToken($user),
]);
}

Expand Down
2 changes: 1 addition & 1 deletion tests/Integration/Factories/StreamerFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
use App\Services\Streamers\XAccelRedirectStreamer;
use App\Services\Streamers\XSendFileStreamer;
use App\Services\TranscodingService;
use Tests\TestCase;
use phpmock\mockery\PHPMockery;
use Tests\TestCase;

class StreamerFactoryTest extends TestCase
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/Services/ApiClientTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public function setUp()
{
parent::setUp();

/**
/*
* @var Client client
* @var Cache cache
* @var Logger logger
Expand Down

0 comments on commit 40d4174

Please sign in to comment.