TestCase::getPackageProviders()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
c 0
b 0
f 0
nc 1
nop 1
dl 0
loc 4
rs 10
1
<?php
2
3
namespace Ikechukwukalu\Sanctumauthstarter\Tests;
4
5
use Ikechukwukalu\Sanctumauthstarter\SanctumauthstarterServiceProvider;
6
use Illuminate\Foundation\Testing\RefreshDatabase;
7
use Orchestra\Testbench\TestCase as BaseTestCase;
8
use Stevebauman\Location\LocationServiceProvider;
9
10
abstract class TestCase extends BaseTestCase
11
{
12
    use RefreshDatabase;
0 ignored issues
show
introduced by
The trait Illuminate\Foundation\Testing\RefreshDatabase requires some properties which are not provided by Ikechukwukalu\Sanctumauthstarter\Tests\TestCase: $seeder, $seed, $connectionsToTransact, $dropTypes, $dropViews
Loading history...
13
14
    public function setUp(): void
15
    {
16
      parent::setUp();
17
    }
18
19
    protected function defineDatabaseMigrations()
20
    {
21
        $this->loadLaravelMigrations();
22
        $this->loadMigrationsFrom(__DIR__.'/../src/migrations');
23
    }
24
25
    protected function defineRoutes($router)
26
    {
27
        $router->post('api/auth/register', [\Ikechukwukalu\Sanctumauthstarter\Tests\Controllers\RegisterController::class,
0 ignored issues
show
Bug introduced by
The type Ikechukwukalu\Sanctumaut...lers\RegisterController was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
28
            'register'])->name('register');
29
30
        $router->post('api/auth/login', [\Ikechukwukalu\Sanctumauthstarter\Tests\Controllers\LoginController::class,
0 ignored issues
show
Bug introduced by
The type Ikechukwukalu\Sanctumaut...rollers\LoginController was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
31
            'login'])->name('login');
32
33
        $router->post('api/auth/logout', [\Ikechukwukalu\Sanctumauthstarter\Tests\Controllers\LogoutController::class,
0 ignored issues
show
Bug introduced by
The type Ikechukwukalu\Sanctumaut...ollers\LogoutController was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
34
            'logout'])->name('logout');
35
36
        $router->post('api/auth/logout-from-all-sessions', [\Ikechukwukalu\Sanctumauthstarter\Tests\Controllers\LogoutController::class,
37
            'logoutFromAllSessions'])->name('logoutFromAllSessions');
38
39
        $router->get('auth/verify/email/{id}', [\Ikechukwukalu\Sanctumauthstarter\Tests\Controllers\VerificationController::class,
0 ignored issues
show
Bug introduced by
The type Ikechukwukalu\Sanctumaut...\VerificationController was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
40
            'verifyUserEmail'])->name('verification.verify');
41
42
        $router->post('api/auth/resend/verify/email', [\Ikechukwukalu\Sanctumauthstarter\Tests\Controllers\VerificationController::class,
43
            'resendUserEmailVerification'])->name('verification.resend');
44
45
        $router->post('api/auth/forgot/password', [\Ikechukwukalu\Sanctumauthstarter\Tests\Controllers\ForgotPasswordController::class,
0 ignored issues
show
Bug introduced by
The type Ikechukwukalu\Sanctumaut...orgotPasswordController was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
46
            'forgotPassword'])->name('forgotPassword');
47
48
        $router->post('api/auth/reset/password', [\Ikechukwukalu\Sanctumauthstarter\Tests\Controllers\ResetPasswordController::class,
0 ignored issues
show
Bug introduced by
The type Ikechukwukalu\Sanctumaut...ResetPasswordController was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
49
            'resetPassword'])->name('resetPassword');
50
51
        $router->post('api/change/password', [\Ikechukwukalu\Sanctumauthstarter\Tests\Controllers\ChangePasswordController::class,
0 ignored issues
show
Bug introduced by
The type Ikechukwukalu\Sanctumaut...hangePasswordController was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
52
            'changePassword'])->name('changePassword');
53
54
        $router->post('api/edit/profile', [\Ikechukwukalu\Sanctumauthstarter\Tests\Controllers\ProfileController::class,
0 ignored issues
show
Bug introduced by
The type Ikechukwukalu\Sanctumaut...llers\ProfileController was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
55
            'editProfile'])->name('editProfile');
56
57
        $router->post('api/create-two-factor',
58
            [\Ikechukwukalu\Sanctumauthstarter\Tests\Controllers\TwoFactorController::class, 'createTwoFactor'])->name('createTwoFactor');
0 ignored issues
show
Bug introduced by
The type Ikechukwukalu\Sanctumaut...ers\TwoFactorController was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
59
60
        $router->post('api/confirm-two-factor',
61
            [\Ikechukwukalu\Sanctumauthstarter\Tests\Controllers\TwoFactorController::class, 'confirmTwoFactor'])->name('confirmTwoFactor');
62
63
        $router->post('api/disable-two-factor',
64
            [\Ikechukwukalu\Sanctumauthstarter\Tests\Controllers\TwoFactorController::class, 'disableTwoFactor'])->name('disableTwoFactor');
65
66
        $router->post('api/current-recovery-codes',
67
            [\Ikechukwukalu\Sanctumauthstarter\Tests\Controllers\TwoFactorController::class, 'currentRecoveryCodes'])->name('currentRecoveryCodes');
68
69
        $router->post('api/new-recovery-codes',
70
            [\Ikechukwukalu\Sanctumauthstarter\Tests\Controllers\TwoFactorController::class, 'newRecoveryCodes'])->name('newRecoveryCodes');
71
    }
72
73
    protected function getPackageProviders($app): array
0 ignored issues
show
Unused Code introduced by
The parameter $app is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

73
    protected function getPackageProviders(/** @scrutinizer ignore-unused */ $app): array

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
74
    {
75
        return [SanctumauthstarterServiceProvider::class,
76
                LocationServiceProvider::class];
77
    }
78
79
    protected function getEnvironmentSetUp($app) {
80
        $app['config']->set('auth.guards.sanctum', [
81
                        'driver' => 'session',
82
                        'provider' => 'users',
83
                    ]);
84
    }
85
}
86