Skip to content

Commit c0b8ce6

Browse files
authored
Merge pull request #174 from PrestaShop/fix
2 parents 056e7df + 64263b7 commit c0b8ce6

File tree

8 files changed

+90
-15
lines changed

8 files changed

+90
-15
lines changed

bin/console

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ if (file_exists(__DIR__.'/../.env')) {
1919
}
2020

2121
$app = new Application();
22-
$app->add(new FetchContributorsCommand());
23-
$app->add(new FetchPullRequestsMergedCommand());
24-
$app->add(new FetchRepositoriesCommand());
25-
$app->add(new GenerateNewContributorsCommand());
26-
$app->add(new GenerateTopCompaniesCommand());
22+
$app->addCommand(new FetchContributorsCommand());
23+
$app->addCommand(new FetchPullRequestsMergedCommand());
24+
$app->addCommand(new FetchRepositoriesCommand());
25+
$app->addCommand(new GenerateNewContributorsCommand());
26+
$app->addCommand(new GenerateTopCompaniesCommand());
2727
$app->run();

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
}
3535
},
3636
"require-dev": {
37-
"phpstan/phpstan": "^2.1"
37+
"phpstan/phpstan": "^2.1",
38+
"phpstan/phpstan-symfony": "^2.0"
3839
}
3940
}

composer.lock

Lines changed: 75 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

phpstan.neon.dist

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,7 @@ parameters:
1212
-
1313
identifier: missingType.iterableValue
1414
path: src/Service/Github.php
15-
count: 3
15+
count: 3
16+
includes:
17+
- vendor/phpstan/phpstan-symfony/extension.neon
18+
- vendor/phpstan/phpstan-symfony/rules.neon

src/Command/FetchContributorsCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ protected function configure(): void
2323
null,
2424
InputOption::VALUE_OPTIONAL,
2525
'',
26-
$_ENV['GH_TOKEN'] ?? null
26+
isset($_ENV['GH_TOKEN']) ? (string) $_ENV['GH_TOKEN'] : null
2727
)
2828
->addOption('repository', 'r', InputOption::VALUE_OPTIONAL, 'GitHub repository')
2929
->addOption('config', 'c', InputOption::VALUE_OPTIONAL, '', 'config.dist.yml')

src/Command/FetchPullRequestsMergedCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ protected function configure(): void
2222
null,
2323
InputOption::VALUE_OPTIONAL,
2424
'',
25-
$_ENV['GH_TOKEN'] ?? null
25+
isset($_ENV['GH_TOKEN']) ? (string) $_ENV['GH_TOKEN'] : null
2626
);
2727
}
2828

src/Command/FetchRepositoriesCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ protected function configure(): void
1717
null,
1818
InputOption::VALUE_OPTIONAL,
1919
'',
20-
$_ENV['GH_TOKEN'] ?? null
20+
isset($_ENV['GH_TOKEN']) ? (string) $_ENV['GH_TOKEN'] : null
2121
)
2222
->addOption('config', 'c', InputOption::VALUE_OPTIONAL, '', 'config.dist.yml')
2323
;

src/Command/GenerateTopCompaniesCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ protected function configure(): void
4747
null,
4848
InputOption::VALUE_OPTIONAL,
4949
'',
50-
$_ENV['GH_TOKEN'] ?? null
50+
isset($_ENV['GH_TOKEN']) ? (string) $_ENV['GH_TOKEN'] : null
5151
)
5252
->addOption('config', 'c', InputOption::VALUE_OPTIONAL, '', 'config.dist.yml');
5353
}

0 commit comments

Comments
 (0)