Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apply fixes from StyleCI #13

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/LaravelNovaSearchable.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
namespace AkkiIo\LaravelNovaSearch;

use Closure;

use function implode;
use function is_array;

Expand Down Expand Up @@ -277,8 +278,8 @@ protected static function likeOperator($query)
/**
* Resolve the concat condition.
*
* @param $query
* @param $columns
* @param $query
* @param $columns
* @return string
*/
protected static function concatCondition($query, $columns)
Expand Down
3 changes: 2 additions & 1 deletion tests/Models/SearchRelationMatchingAnyTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@
use AkkiIo\LaravelNovaSearch\LaravelNovaSearchable;
use AkkiIo\LaravelNovaSearch\Tests\Models\Post;
use AkkiIo\LaravelNovaSearch\Tests\Models\User;
use function factory;
use Illuminate\Support\Str;

use function factory;

class SearchRelationMatchingAnyTest extends TestCase
{
use LaravelNovaSearchable;
Expand Down
3 changes: 2 additions & 1 deletion tests/SearchConcatenationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@

use AkkiIo\LaravelNovaSearch\LaravelNovaSearchable;
use AkkiIo\LaravelNovaSearch\Tests\Models\User;
use function factory;
use Illuminate\Support\Str;

use function factory;

class SearchConcatenationTest extends TestCase
{
use LaravelNovaSearchable;
Expand Down
3 changes: 2 additions & 1 deletion tests/SearchMatchingAnyTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@

use AkkiIo\LaravelNovaSearch\LaravelNovaSearchable;
use AkkiIo\LaravelNovaSearch\Tests\Models\User;
use function factory;
use Illuminate\Support\Str;

use function factory;

class SearchMatchingAnyTest extends TestCase
{
use LaravelNovaSearchable;
Expand Down
3 changes: 2 additions & 1 deletion tests/SearchRelationConcatenationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@
use AkkiIo\LaravelNovaSearch\LaravelNovaSearchable;
use AkkiIo\LaravelNovaSearch\Tests\Models\Post;
use AkkiIo\LaravelNovaSearch\Tests\Models\User;
use function factory;
use Illuminate\Support\Str;

use function factory;

class SearchRelationConcatenationTest extends TestCase
{
use LaravelNovaSearchable;
Expand Down
3 changes: 2 additions & 1 deletion tests/SearchRelationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@
use AkkiIo\LaravelNovaSearch\LaravelNovaSearchable;
use AkkiIo\LaravelNovaSearch\Tests\Models\Post;
use AkkiIo\LaravelNovaSearch\Tests\Models\User;
use function factory;
use Illuminate\Support\Str;

use function factory;

class SearchRelationTest extends TestCase
{
use LaravelNovaSearchable;
Expand Down
12 changes: 6 additions & 6 deletions tests/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,25 +36,25 @@ protected static function applySearch($query, $search)
/**
* Perform the search and check the result.
*
* @param $search
* @param $count
* @param $search
* @param $count
*/
protected function checkResults($search, $count)
{
$query = $this->applySearch((new User()), $search);
$query = $this->applySearch(new User(), $search);

$this->assertEquals($count, $query->count());
}

/**
* Perform the search and check the result.
*
* @param $search
* @param $count
* @param $search
* @param $count
*/
protected function checkPostResults($search, $count)
{
$query = $this->applySearch((new Post()), $search);
$query = $this->applySearch(new Post(), $search);

$this->assertEquals($count, $query->count());
}
Expand Down
Loading