Skip to content

Commit 5d3dbd4

Browse files
authored
Merge pull request #425 from dotkernel/core-sync
Core sync
2 parents ecc5306 + b42ace9 commit 5d3dbd4

22 files changed

+151
-23
lines changed

src/Admin/src/InputFilter/AdminRoleInputFilter.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@
77
use Api\App\InputFilter\Input\UuidInput;
88
use Core\App\InputFilter\AbstractInputFilter;
99

10+
/**
11+
* @phpstan-type AdminRoleDataType array{
12+
* uuid: non-empty-string,
13+
* }
14+
* @extends AbstractInputFilter<AdminRoleDataType>
15+
*/
1016
class AdminRoleInputFilter extends AbstractInputFilter
1117
{
1218
public function __construct()

src/Admin/src/InputFilter/CreateAdminInputFilter.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,19 @@
1313
use Core\App\InputFilter\AbstractInputFilter;
1414
use Laminas\InputFilter\CollectionInputFilter;
1515

16+
/**
17+
* @phpstan-import-type AdminRoleDataType from AdminRoleInputFilter
18+
* @phpstan-type CreateAdminDataType array{
19+
* identity: non-empty-string,
20+
* password: non-empty-string,
21+
* passwordConfirm: non-empty-string,
22+
* firstName?: non-empty-string,
23+
* lastName?: non-empty-string,
24+
* status: non-empty-string,
25+
* roles: AdminRoleDataType[],
26+
* }
27+
* @extends AbstractInputFilter<CreateAdminDataType>
28+
*/
1629
class CreateAdminInputFilter extends AbstractInputFilter
1730
{
1831
public function __construct()

src/Admin/src/InputFilter/UpdateAdminInputFilter.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,18 @@
1212
use Core\App\InputFilter\AbstractInputFilter;
1313
use Laminas\InputFilter\CollectionInputFilter;
1414

15+
/**
16+
* @phpstan-import-type AdminRoleDataType from AdminRoleInputFilter
17+
* @phpstan-type UpdateAdminDataType array{
18+
* password?: non-empty-string,
19+
* passwordConfirm?: non-empty-string,
20+
* firstName?: non-empty-string,
21+
* lastName?: non-empty-string,
22+
* status?: non-empty-string,
23+
* roles?: AdminRoleDataType[],
24+
* }
25+
* @extends AbstractInputFilter<UpdateAdminDataType>
26+
*/
1527
class UpdateAdminInputFilter extends AbstractInputFilter
1628
{
1729
public function __construct()

src/App/src/InputFilter/ErrorReportInputFilter.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@
77
use Api\App\InputFilter\Input\MessageInput;
88
use Core\App\InputFilter\AbstractInputFilter;
99

10+
/**
11+
* @phpstan-type ErrorReportDataType array{
12+
* message: non-empty-string,
13+
* }
14+
* @extends AbstractInputFilter<ErrorReportDataType>
15+
*/
1016
class ErrorReportInputFilter extends AbstractInputFilter
1117
{
1218
public function __construct()

src/Core/src/Admin/src/ConfigProvider.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@
1414
use Dot\DependencyInjection\Factory\AttributedRepositoryFactory;
1515

1616
/**
17+
* @phpstan-type ConfigType array{
18+
* dependencies: DependenciesType,
19+
* doctrine: DoctrineConfigType,
20+
* }
1721
* @phpstan-type DoctrineConfigType array{
1822
* driver: array{
1923
* orm_default: array{
@@ -34,10 +38,7 @@
3438
class ConfigProvider
3539
{
3640
/**
37-
* @return array{
38-
* dependencies: DependenciesType,
39-
* doctrine: DoctrineConfigType,
40-
* }
41+
* @return ConfigType
4142
*/
4243
public function __invoke(): array
4344
{

src/Core/src/Admin/src/Entity/AdminIdentity.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ class AdminIdentity implements UserInterface
1111
{
1212
/**
1313
* @param non-empty-string[] $roles
14-
* @param array<non-empty-string, non-empty-string> $details
14+
* @param array<non-empty-string, string> $details
1515
*/
1616
public function __construct(
1717
public string $uuid,

src/Core/src/App/src/ConfigProvider.php

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,11 @@
3232
use function getcwd;
3333

3434
/**
35+
* @phpstan-type ConfigType array{
36+
* dependencies: DependenciesType,
37+
* doctrine: DoctrineConfigType,
38+
* resultCacheLifetime: int,
39+
* }
3540
* @phpstan-type DoctrineConfigType array{
3641
* cache: array{
3742
* array: array{
@@ -95,11 +100,7 @@ class ConfigProvider
95100
public const REGEXP_UUID = '{uuid:[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12}}';
96101

97102
/**
98-
* @return array{
99-
* dependencies: DependenciesType,
100-
* doctrine: DoctrineConfigType,
101-
* resultCacheLifetime: int,
102-
* }
103+
* @return ConfigType
103104
*/
104105
public function __invoke(): array
105106
{

src/Core/src/App/src/InputFilter/AbstractInputFilter.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
use Laminas\InputFilter\InputFilter;
88

99
/**
10-
* @extends InputFilter<object>
10+
* @template TFilteredValues
11+
* @extends InputFilter<TFilteredValues>
1112
*/
1213
abstract class AbstractInputFilter extends InputFilter
1314
{

src/Core/src/Security/src/ConfigProvider.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@
1414
use Dot\DependencyInjection\Factory\AttributedRepositoryFactory;
1515

1616
/**
17+
* @phpstan-type ConfigType array{
18+
* dependencies: DependenciesType,
19+
* doctrine: DoctrineConfigType,
20+
* }
1721
* @phpstan-type DoctrineConfigType array{
1822
* driver: array{
1923
* orm_default: array{
@@ -33,10 +37,7 @@
3337
class ConfigProvider
3438
{
3539
/**
36-
* @return array{
37-
* dependencies: DependenciesType,
38-
* doctrine: DoctrineConfigType,
39-
* }
40+
* @return ConfigType
4041
*/
4142
public function __invoke(): array
4243
{

src/Core/src/Setting/src/ConfigProvider.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@
1111
use Dot\DependencyInjection\Factory\AttributedRepositoryFactory;
1212

1313
/**
14+
* @phpstan-type ConfigType array{
15+
* dependencies: DependenciesType,
16+
* doctrine: DoctrineConfigType,
17+
* }
1418
* @phpstan-type DoctrineConfigType array{
1519
* driver: array{
1620
* orm_default: array{
@@ -31,10 +35,7 @@
3135
class ConfigProvider
3236
{
3337
/**
34-
* @return array{
35-
* dependencies: DependenciesType,
36-
* doctrine: DoctrineConfigType,
37-
* }
38+
* @return ConfigType
3839
*/
3940
public function __invoke(): array
4041
{

0 commit comments

Comments
 (0)