Skip to content

Commit 256c73f

Browse files
committed
Issue 61: Increase PHPstan to 6 , then 7, then 8 , then 9
Signed-off-by: horea <horea@rospace.com>
1 parent 7cf68a2 commit 256c73f

File tree

6 files changed

+46
-1
lines changed

6 files changed

+46
-1
lines changed

bin/composer-post-install-script.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44

55
// phpcs:disable PSR1.Files.SideEffects.FoundWithSymbols
66

7+
/**
8+
* @param array{source: string, destination: string} $file
9+
*/
710
function copyFile(array $file): void
811
{
912
if (is_readable($file['destination'])) {

phpstan.neon

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
includes:
22
- vendor/phpstan/phpstan-phpunit/extension.neon
33
parameters:
4-
level: 5
4+
level: 6
55
paths:
66
- bin
77
- config

src/App/src/ConfigProvider.php

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@
1010

1111
class ConfigProvider
1212
{
13+
/**
14+
@return array{
15+
* dependencies: array<mixed>,
16+
* templates: array<mixed>,
17+
* }
18+
*/
1319
public function __invoke(): array
1420
{
1521
return [
@@ -18,6 +24,12 @@ public function __invoke(): array
1824
];
1925
}
2026

27+
/**
28+
* @return array{
29+
* delegators: array<class-string, array<class-string>>,
30+
* factories: array<class-string, class-string>,
31+
* }
32+
*/
2133
public function getDependencies(): array
2234
{
2335
return [
@@ -32,6 +44,16 @@ public function getDependencies(): array
3244
];
3345
}
3446

47+
/**
48+
* @return array{
49+
* paths: array{
50+
* app: array{literal-string&non-falsy-string},
51+
* error: array{literal-string&non-falsy-string},
52+
* layout: array{literal-string&non-falsy-string},
53+
* partial: array{literal-string&non-falsy-string},
54+
* }
55+
* }
56+
*/
3557
public function getTemplates(): array
3658
{
3759
return [

src/Page/src/ConfigProvider.php

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@
1313

1414
class ConfigProvider
1515
{
16+
/**
17+
@return array{
18+
* dependencies: array<mixed>,
19+
* templates: array<mixed>,
20+
* }
21+
*/
1622
public function __invoke(): array
1723
{
1824
return [
@@ -21,6 +27,13 @@ public function __invoke(): array
2127
];
2228
}
2329

30+
/**
31+
@return array{
32+
* delegators: array<class-string, array<class-string>>,
33+
* factories: array<class-string, class-string>,
34+
* aliases: array<class-string, class-string>
35+
* }
36+
*/
2437
public function getDependencies(): array
2538
{
2639
return [
@@ -39,6 +52,11 @@ public function getDependencies(): array
3952
];
4053
}
4154

55+
/**
56+
@return array{
57+
* paths: array{page: array{literal-string&non-falsy-string}}
58+
* }
59+
*/
4260
public function getTemplates(): array
4361
{
4462
return [

test/Unit/App/ConfigProviderTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
class ConfigProviderTest extends TestCase
1212
{
13+
/** @var array<string, array<string, mixed>>*/
1314
protected array $config = [];
1415

1516
protected function setup(): void

test/Unit/Page/ConfigProviderTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414
class ConfigProviderTest extends TestCase
1515
{
16+
/** @var array<string, array<string, mixed>>*/
1617
protected array $config = [];
1718

1819
protected function setup(): void

0 commit comments

Comments
 (0)