Skip to content

Commit

Permalink
Apply fixes from StyleCI (#4)
Browse files Browse the repository at this point in the history
[ci skip] [skip ci]
  • Loading branch information
DarkGhostHunter authored Mar 13, 2024
1 parent 68d4248 commit f686359
Show file tree
Hide file tree
Showing 12 changed files with 139 additions and 78 deletions.
1 change: 1 addition & 0 deletions src/Eloquent/PendingTestCast.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Traits\ForwardsCalls;
use PHPUnit\Framework\Assert as PHPUnit;

use function is_array;

class PendingTestCast
Expand Down
1 change: 1 addition & 0 deletions src/Http/Middleware/InteractsWithMiddleware.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
namespace Laragear\MetaTesting\Http\Middleware;

use Illuminate\Http\Response;

use function implode;

trait InteractsWithMiddleware
Expand Down
1 change: 1 addition & 0 deletions src/Http/Middleware/PendingTestMiddleware.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
use Illuminate\Support\Str;
use Illuminate\Support\Traits\ForwardsCalls;
use Orchestra\Testbench\TestCase;

use function array_merge;
use function array_push;
use function array_unique;
Expand Down
1 change: 1 addition & 0 deletions src/Http/Requests/InteractsWithFormRequests.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ trait InteractsWithFormRequests
* Assert a pending form request with data.
*
* @template TForm of \Illuminate\Foundation\Http\FormRequest
*
* @param class-string<TForm> $formRequest
* @param array $input
* @param array $request
Expand Down
1 change: 1 addition & 0 deletions src/Http/Requests/PendingTestFormRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
use Illuminate\Validation\ValidationException;
use Orchestra\Testbench\TestCase;
use PHPUnit\Framework\Assert as PHPUnit;

use function get_class;

/**
Expand Down
3 changes: 2 additions & 1 deletion src/InteractsWithServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
use ReflectionException;
use ReflectionMethod;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;

use function implode;
use function is_array;
use function now;
Expand Down Expand Up @@ -354,7 +355,7 @@ protected function assertGateHasPolicy(string $model, string ...$abilities): voi
}

static::assertThat(
$method->isPublic() && !$method->isStatic(),
$method->isPublic() && ! $method->isStatic(),
static::isTrue(),
"The '$ability' ability declared in '$target' is private/protected or static.",
);
Expand Down
1 change: 1 addition & 0 deletions src/InteractsWithServices.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
use Closure;
use LogicException;
use Mockery\MockInterface;

use function tap;

/**
Expand Down
2 changes: 1 addition & 1 deletion src/Validation/InteractsWithValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
trait InteractsWithValidator
{
/**
* Runs the validation name with data and rules
* Runs the validation name with data and rules.
*
* @internal
*/
Expand Down
2 changes: 1 addition & 1 deletion tests/Eloquent/InteractsWithCastTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
use Laragear\MetaTesting\Eloquent\InteractsWithCast;
use Orchestra\Testbench\TestCase;
use PHPUnit\Framework\AssertionFailedError;

use function strtoupper;

class InteractsWithCastTest extends TestCase
Expand Down Expand Up @@ -75,7 +76,6 @@ public function test_with_raw_attributes(): void
}
}


class TestCastsAttributes implements CastsAttributes
{
public function get($model, string $key, $value, array $attributes)
Expand Down
3 changes: 1 addition & 2 deletions tests/Http/Middleware/InteractsWithMiddlewareTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public function test_adds_web_group_middleware(): void
public function test_uses_controller(): void
{
$this->middleware(TestMiddleware::class)
->using(fn() => 'foo')
->using(fn () => 'foo')
->get('test')
->assertSee('foo');
}
Expand All @@ -85,7 +85,6 @@ public function test_proxies_test_case_method(): void
}
}


class TestMiddleware
{
public function handle(Request $request, $next, $argument = null)
Expand Down
1 change: 0 additions & 1 deletion tests/Http/Requests/InteractsWithFormRequestsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -164,4 +164,3 @@ public function passedValidation(): void
$this->request->set('baz', 'quz');
}
}

Loading

0 comments on commit f686359

Please sign in to comment.