Skip to content

Commit

Permalink
Merge pull request #12 from thyyppa/analysis-QM13e3
Browse files Browse the repository at this point in the history
Apply fixes from StyleCI
  • Loading branch information
thyyppa authored May 19, 2020
2 parents e9001af + df0ce00 commit b71e4ea
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 14 deletions.
2 changes: 1 addition & 1 deletion src/Connection/FluentFMRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}

Expand Down
8 changes: 1 addition & 7 deletions src/Connection/FluentQuery.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
*/
trait FluentQuery
{

/**
* @var array
*/
Expand Down Expand Up @@ -87,7 +86,6 @@ public function sort(string $field, bool $ascending = true): FluentFM
return $this;
}


/**
* Sort results descending by field.
*
Expand Down Expand Up @@ -162,7 +160,6 @@ public function where($field, ...$params): FluentFM
return $this;
}


/**
* @param $field
* @param array $params
Expand All @@ -187,7 +184,6 @@ public function orWhere($field, ...$params): FluentFM
return $this;
}


/**
* @param string $field
*
Expand Down Expand Up @@ -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;
}

Expand All @@ -231,7 +226,6 @@ public function queryString(): array
return $output;
}


/**
* @return array
*/
Expand Down
6 changes: 0 additions & 6 deletions tests/TestBase.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
use GuzzleHttp\Psr7\Response;
use Hyyppa\Toxx\Contracts\JsonAndArrayOutput;
use PHPUnit\Framework\TestCase;
use Tests\BaseTest;

class TestBase extends TestCase
{
Expand Down Expand Up @@ -54,7 +53,6 @@ protected function client(array $responses = []): Client
]);
}


/**
* @param array $expected
* @param array $actual
Expand All @@ -77,7 +75,6 @@ protected function assertArrayHas(array $expected, array $actual): self
return $this;
}


/**
* @param array $expected
* @param array $actual
Expand All @@ -100,7 +97,6 @@ protected function assertArrayHasFuzzy(array $expected, array $actual): self
return $this;
}


/**
* @param $expected
* @param string $actual
Expand All @@ -117,7 +113,6 @@ protected function assertJsonLike($expected, string $actual): self
return $this;
}


/**
* @param $expected
* @param JsonAndArrayOutput $actual
Expand All @@ -131,5 +126,4 @@ protected function assertJsonAndArrayLike($expected, JsonAndArrayOutput $actual)

return $this;
}

}

0 comments on commit b71e4ea

Please sign in to comment.