Issues (120)

tests/TestCase.php (5 issues)

1
<?php
2
3
namespace jeremykenedy\LaravelRoles\Test;
4
5
use jeremykenedy\LaravelRoles\RolesFacade;
6
use jeremykenedy\LaravelRoles\RolesServiceProvider;
7
use Orchestra\Testbench\TestCase as OrchestraTestCase;
8
use Seedster\Handlers\SeedHandler;
9
10
class TestCase extends OrchestraTestCase
11
{
12
    /**
13
     * Get package providers.
14
     *
15
     * @param \Illuminate\Foundation\Application $app
16
     *
17
     * @return array<int, class-string>
0 ignored issues
show
Documentation Bug introduced by
The doc comment array<int, class-string> at position 4 could not be parsed: Unknown type name 'class-string' at position 4 in array<int, class-string>.
Loading history...
18
     */
19
    protected function getPackageProviders($app)
0 ignored issues
show
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

19
    protected function getPackageProviders(/** @scrutinizer ignore-unused */ $app)

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...
20
    {
21
        return [RolesServiceProvider::class];
22
    }
23
24
    /**
25
     * Get package aliases.
26
     *
27
     * @param \Illuminate\Foundation\Application $app
28
     *
29
     * @return array<string, class-string>
0 ignored issues
show
Documentation Bug introduced by
The doc comment array<string, class-string> at position 4 could not be parsed: Unknown type name 'class-string' at position 4 in array<string, class-string>.
Loading history...
30
     */
31
    protected function getPackageAliases($app)
0 ignored issues
show
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

31
    protected function getPackageAliases(/** @scrutinizer ignore-unused */ $app)

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...
32
    {
33
        return [
34
            'laravelroles' => RolesFacade::class,
35
        ];
36
    }
37
38
    /**
39
     * Define environment setup.
40
     *
41
     * @param \Illuminate\Foundation\Application $app
42
     *
43
     * @return void
44
     */
45
    public function getEnvironmentSetUp($app)
46
    {
47
        $app->singleton('seed.handler', function ($app) {
48
            return new SeedHandler($app, collect());
49
        });
50
51
        include_once __DIR__.'/../src/Database/TestMigrations/create_users_table.php';
52
53
        (new \jeremykenedy\LaravelRoles\Database\TestMigrations\CreateUsersTable())->up();
0 ignored issues
show
The type jeremykenedy\LaravelRole...ations\CreateUsersTable 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...
54
    }
55
}
56