Skip to content

Commit 03da4fd

Browse files
authored
[CI] Applied Rector suggestions and fixed PHPStan (#2968)
* Run Rector * Fixed PHPStan * Fixed highlight * Adjusted highlight
1 parent f17042d commit 03da4fd

File tree

6 files changed

+8
-5
lines changed

6 files changed

+8
-5
lines changed

code_samples/back_office/dashboard/src/Command/DashboardCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public function configure(): void
5050
protected function execute(InputInterface $input, OutputInterface $output): int
5151
{
5252
$dashboardModelLocationId = (int)$input->getArgument('dashboard');
53-
$userGroupLocationIdList = array_map('intval', $input->getArgument('group'));
53+
$userGroupLocationIdList = array_map(intval(...), $input->getArgument('group'));
5454

5555
foreach ($userGroupLocationIdList as $userGroupLocationId) {
5656
try {

code_samples/back_office/images/src/Connector/Dam/Transformation/WikimediaCommonsTransformationFactory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ class WikimediaCommonsTransformationFactory implements TransformationFactoryInte
1111
public function build(?string $transformationName = null, array $transformationParameters = []): Transformation
1212
{
1313
if (null === $transformationName) {
14-
return new Transformation(null, array_map('strval', $transformationParameters));
14+
return new Transformation(null, array_map(strval(...), $transformationParameters));
1515
}
1616

1717
$transformations = $this->buildAll();

code_samples/multisite/siteaccess/Configuration.php

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

88
class Configuration extends SiteAccessConfiguration
99
{
10+
/**
11+
* @phpstan-return \Symfony\Component\Config\Definition\Builder\TreeBuilder<'array'> The tree builder
12+
*/
1013
public function getConfigTreeBuilder(): TreeBuilder
1114
{
1215
$treeBuilder = new TreeBuilder('acme_example');

code_samples/pim/Symbol/Format/Checksum/LuhnChecksum.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,6 @@ private function getDigits(string $value): array
4141
static fn (string $char): bool => $char !== '-'
4242
);
4343

44-
return array_map('intval', array_values($chars));
44+
return array_map(intval(...), array_values($chars));
4545
}
4646
}

docs/administration/dashboard/php_api_dashboard_service.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Using the `admin` account, it loads the group members, logs each one in, creates
2525
First argument is the `Content ID` of the dashboard to copy.
2626
Following arguments are the Content IDs of the user groups.
2727

28-
``` php hl_lines="63"
28+
``` php hl_lines="61"
2929
[[= include_file('code_samples/back_office/dashboard/src/Command/DashboardCommand.php') =]]
3030
```
3131

docs/multisite/siteaccess/siteaccess_aware_configuration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Acme\ExampleBundle\AcmeExampleBundle::class => ['all' => true],
3535

3636
To parse semantic configuration, create a `Configuration` class which extends `Ibexa\Bundle\Core\DependencyInjection\Configuration\SiteAccessAware\Configuration` and then extend its `generateScopeBaseNode()` method:
3737

38-
``` php hl_lines="16"
38+
``` php hl_lines="19"
3939
[[= include_file('code_samples/multisite/siteaccess/Configuration.php') =]]
4040
```
4141

0 commit comments

Comments
 (0)