Skip to content

Commit 58e8d50

Browse files
phpstan (checkMissingIterableValueType true)
1 parent 49577e2 commit 58e8d50

File tree

72 files changed

+879
-4
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+879
-4
lines changed

phpstan.neon

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
parameters:
22
checkGenericClassInNonGenericObjectType: false
3-
checkMissingIterableValueType: false
43
bootstrapFiles:
54
- phpstan-constants.php

src/Command/GenerateFaviconsCommand.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@
1212
#[AsCommand(name: 'app:generate-favicons')]
1313
class GenerateFaviconsCommand extends Command
1414
{
15+
/**
16+
* @var array<string> $colors
17+
*/
1518
private array $colors = [
1619
'red' => 'dc3545',
1720
'orange' => 'fd7e14',

src/Controller/AbstractAppController.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@ public function setTranslator(TranslatorInterface $translator): void
4949
$this->translator = $translator;
5050
}
5151

52+
/**
53+
* @param array<mixed> $parameters
54+
*/
5255
public function renderAbstract(Request $request, string $view, array $parameters = [], Response $response = null): Response
5356
{
5457
if (false === isset($parameters['firewall'])) {
@@ -137,6 +140,10 @@ public function renderAbstract(Request $request, string $view, array $parameters
137140
return $this->render($view, $parameters, $response);
138141
}
139142

143+
/**
144+
* @param array<mixed> $entries
145+
* @return array<mixed>
146+
*/
140147
private function populateMenu(array $entries): array
141148
{
142149
$menu = [];
@@ -156,6 +163,10 @@ private function populateMenu(array $entries): array
156163
return $menu;
157164
}
158165

166+
/**
167+
* @param array<mixed> $a
168+
* @param array<mixed> $b
169+
*/
159170
private function sortByName(array $a, array $b): int
160171
{
161172
return $a['name'] <=> $b['name'];

src/Controller/AppIndexDatabaseImportController.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,9 @@ public function index(Request $request, string $index): Response
197197
]);
198198
}
199199

200+
/**
201+
* @param array<mixed> $fields
202+
*/
200203
private function getConnection(array $fields): PDO
201204
{
202205
$dbh = new PDO($fields['driver'].':host='.$fields['host'].';dbname='.$fields['dbname'], $fields['user'], $fields['password']);

src/Controller/AppSubscriptionsController.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ class AppSubscriptionsController extends AbstractAppController
3939

4040
private string $senderAddress;
4141

42+
/**
43+
* @var array<mixed> $clusterHealth
44+
*/
4245
private array $clusterHealth;
4346

4447
public function __construct(AppSubscriptionManager $appSubscriptionManager, AppNotificationManager $appNotificationManager, AppUserManager $appUserManager, string $vapidPublicKey, string $vapidPrivateKey, string $mailerDsn, string $senderAddress)

src/Controller/ElasticsearchDanglingIndicesController.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,10 @@ public function index(Request $request): Response
6060
]);
6161
}
6262

63+
/**
64+
* @param array<mixed> $a
65+
* @param array<mixed> $b
66+
*/
6367
private function sortByCreationDate(array $a, array $b): int
6468
{
6569
return $b['creation_date_millis'] <=> $a['creation_date_millis'];

src/Controller/ElasticsearchIndexController.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,10 @@ public function stats(Request $request): Response
167167
]);
168168
}
169169

170+
/**
171+
* @param array<mixed> $a
172+
* @param array<mixed> $b
173+
*/
170174
private function sortByTotal(array $a, array $b): int
171175
{
172176
return $b['total'] <=> $a['total'];

src/Controller/ElasticsearchIndexGraveyardController.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,10 @@ public function index(Request $request): Response
5252
]);
5353
}
5454

55+
/**
56+
* @param array<mixed> $a
57+
* @param array<mixed> $b
58+
*/
5559
private function sortByDeleteDate(array $a, array $b): int
5660
{
5761
return $b['delete_date_in_millis'] <=> $a['delete_date_in_millis'];

src/Controller/ElasticsearchNodeController.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ public function __construct(ElasticsearchNodeManager $elasticsearchNodeManager)
2828
$this->elasticsearchNodeManager = $elasticsearchNodeManager;
2929
}
3030

31+
/**
32+
* @param array<mixed> $nodes
33+
* @return array<mixed>
34+
*/
3135
private function filter(array $nodes, FormInterface $form): array
3236
{
3337
return $this->elasticsearchNodeManager->filter($nodes, [
@@ -193,6 +197,10 @@ public function stats(Request $request): Response
193197
]);
194198
}
195199

200+
/**
201+
* @param array<mixed> $a
202+
* @param array<mixed> $b
203+
*/
196204
private function sortByTotal(array $a, array $b): int
197205
{
198206
return $b['total'] <=> $a['total'];

src/Controller/ElasticsearchRepositoryController.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,9 @@ public function verify(Request $request, string $repository): Response
210210
return $this->redirectToRoute('repositories_read', ['repository' => $repository->getName()]);
211211
}
212212

213+
/**
214+
* @return array<mixed>
215+
*/
213216
private function getPaths(): array
214217
{
215218
$paths = [];

0 commit comments

Comments
 (0)