From df0ce00e685cf4997863f297da5daba7b484f29a Mon Sep 17 00:00:00 2001 From: thyyppa Date: Tue, 19 May 2020 23:07:17 +0000 Subject: [PATCH] Apply fixes from StyleCI --- src/Connection/FluentFMRepository.php | 2 +- src/Connection/FluentQuery.php | 8 +------- tests/TestBase.php | 6 ------ 3 files changed, 2 insertions(+), 14 deletions(-) diff --git a/src/Connection/FluentFMRepository.php b/src/Connection/FluentFMRepository.php index 03aa143..7b039ed 100644 --- a/src/Connection/FluentFMRepository.php +++ b/src/Connection/FluentFMRepository.php @@ -333,7 +333,7 @@ public function get() { $results = null; - if (!isset($this->query['query']) || !\is_array($this->query['query'])) { + if (! isset($this->query['query']) || ! \is_array($this->query['query'])) { $this->has('id'); } diff --git a/src/Connection/FluentQuery.php b/src/Connection/FluentQuery.php index 3a80fc5..019d5a1 100644 --- a/src/Connection/FluentQuery.php +++ b/src/Connection/FluentQuery.php @@ -9,7 +9,6 @@ */ trait FluentQuery { - /** * @var array */ @@ -87,7 +86,6 @@ public function sort(string $field, bool $ascending = true): FluentFM return $this; } - /** * Sort results descending by field. * @@ -162,7 +160,6 @@ public function where($field, ...$params): FluentFM return $this; } - /** * @param $field * @param array $params @@ -187,7 +184,6 @@ public function orWhere($field, ...$params): FluentFM return $this; } - /** * @param string $field * @@ -216,12 +212,11 @@ public function queryString(): array $output = []; foreach ($this->query as $param => $value) { - if ($param === 'query') { continue; } - if (!stristr('sort', $param)) { + if (! stristr('sort', $param)) { $param = '_'.$param; } @@ -231,7 +226,6 @@ public function queryString(): array return $output; } - /** * @return array */ diff --git a/tests/TestBase.php b/tests/TestBase.php index d59617c..b90524b 100644 --- a/tests/TestBase.php +++ b/tests/TestBase.php @@ -9,7 +9,6 @@ use GuzzleHttp\Psr7\Response; use Hyyppa\Toxx\Contracts\JsonAndArrayOutput; use PHPUnit\Framework\TestCase; -use Tests\BaseTest; class TestBase extends TestCase { @@ -54,7 +53,6 @@ protected function client(array $responses = []): Client ]); } - /** * @param array $expected * @param array $actual @@ -77,7 +75,6 @@ protected function assertArrayHas(array $expected, array $actual): self return $this; } - /** * @param array $expected * @param array $actual @@ -100,7 +97,6 @@ protected function assertArrayHasFuzzy(array $expected, array $actual): self return $this; } - /** * @param $expected * @param string $actual @@ -117,7 +113,6 @@ protected function assertJsonLike($expected, string $actual): self return $this; } - /** * @param $expected * @param JsonAndArrayOutput $actual @@ -131,5 +126,4 @@ protected function assertJsonAndArrayLike($expected, JsonAndArrayOutput $actual) return $this; } - }