Issues (867)

blog-api/src/Auth/AuthRequest.php (5 issues)

1
<?php
2
3
declare(strict_types=1);
4
5
namespace App\Auth;
6
7
use Yiisoft\Input\Http\Attribute\Parameter\Body;
0 ignored issues
show
The type Yiisoft\Input\Http\Attribute\Parameter\Body 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...
8
use Yiisoft\Input\Http\RequestInputInterface;
0 ignored issues
show
The type Yiisoft\Input\Http\RequestInputInterface 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...
9
use Yiisoft\Validator\Rule\Required;
0 ignored issues
show
The type Yiisoft\Validator\Rule\Required 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...
10
use Yiisoft\Validator\RulesProviderInterface;
0 ignored issues
show
The type Yiisoft\Validator\RulesProviderInterface 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...
11
use OpenApi\Attributes as OA;
0 ignored issues
show
The type OpenApi\Attributes 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...
12
13
#[OA\Schema(
14
    schema: 'AuthRequest',
15
    properties: [
16
        new OA\Property(property: 'login', type: 'string', example: 'Opal1144'),
17
        new OA\Property(property: 'password', type: 'string', example: 'Opal1144'),
18
    ]
19
)]
20
final class AuthRequest implements RequestInputInterface, RulesProviderInterface
21
{
22
    #[Body('login')]
23
    private string $login = '';
24
25
    #[Body('password')]
26
    private string $password = '';
27
28
    public function getLogin(): string
29
    {
30
        return $this->login;
31
    }
32
33
    public function getPassword(): string
34
    {
35
        return $this->password;
36
    }
37
38
    public function getRules(): array
39
    {
40
        return [
41
            'login' => [
42
                new Required(),
43
            ],
44
            'password' => [
45
                new Required(),
46
            ],
47
        ];
48
    }
49
}
50