Skip to content

Commit

Permalink
Merge pull request #283 from PrestaShop/dependabot/composer/master/ph…
Browse files Browse the repository at this point in the history
…pstan/phpstan-2.0.1

Bump phpstan/phpstan from 1.12.8 to 2.0.1
  • Loading branch information
Progi1984 authored Nov 13, 2024
2 parents ea1bf42 + 5cf6732 commit fca0b35
Show file tree
Hide file tree
Showing 14 changed files with 41 additions and 35 deletions.
9 changes: 7 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"phpunit/phpunit": "^9.5",
"friendsofphp/php-cs-fixer": "^3.59",
"prestashop/php-coding-standards": "^5",
"phpstan/phpstan": "^1",
"phpstan/phpstan": "^2",
"symfony/var-dumper": "^5.4"
},
"autoload": {
Expand All @@ -25,5 +25,10 @@
},
"classmap": ["src"]
},
"license": "MIT"
"license": "MIT",
"config": {
"allow-plugins": {
"php-http/discovery": true
}
}
}
14 changes: 7 additions & 7 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions src/App/Command/GitHubMonthlyReportCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -166,12 +166,12 @@ private function generateReport(InputInterface $input, OutputInterface $output):
$this->dateStart,
$this->dateEnd,
date('F', strtotime($this->dateStart)),
$this->results['issues_opened'],
$this->results['issues_closed'],
$this->results['issues_fixed'],
$this->results['prs_opened'],
$this->results['prs_closed'],
$this->results['prs_merged'],
(string) $this->results['issues_opened'],
(string) $this->results['issues_closed'],
(string) $this->results['issues_fixed'],
(string) $this->results['prs_opened'],
(string) $this->results['prs_closed'],
(string) $this->results['prs_merged'],
$this->results['releases'],
$this->results['core_prs'],
$this->results['other_prs'],
Expand Down
2 changes: 1 addition & 1 deletion src/App/Command/GithubCQRSEndpointsCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
class GithubCQRSEndpointsCommand extends Command
{
/**
* @var Github;
* @var Github
*/
protected $github;

Expand Down
4 changes: 2 additions & 2 deletions src/App/Command/GithubCheckModuleCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@
class GithubCheckModuleCommand extends Command
{
/**
* @var Github;
* @var Github
*/
protected $github;
/**
* @var ModuleChecker;
* @var ModuleChecker
*/
protected $moduleChecker;

Expand Down
10 changes: 5 additions & 5 deletions src/App/Command/GithubCheckPRCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,23 +27,23 @@ class GithubCheckPRCommand extends Command
];

/**
* @var Filters;
* @var Filters
*/
protected $filters;
/**
* @var Github;
* @var Github
*/
protected $github;
/**
* @var array;
* @var array
*/
protected $orderBy;
/**
* @var OutputInterface;
* @var OutputInterface
*/
protected $output;
/**
* @var int;
* @var int
*/
protected $countRows = 0;

Expand Down
4 changes: 3 additions & 1 deletion src/App/Command/GithubCheckRepositoryCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
class GithubCheckRepositoryCommand extends Command
{
/**
* @var Github;
* @var Github
*/
protected $github;

Expand Down Expand Up @@ -63,8 +63,10 @@ protected function execute(InputInterface $input, OutputInterface $output): int
}

$page = 1;
/** @var array<array<string, mixed>> $results */
$results = [];
do {
/** @var array<array<string, mixed>> */
$repos = $this->github->getClient()->api('organization')->repositories('PrestaShop', $type, $page);
++$page;
$results = array_merge($results, $repos);
Expand Down
4 changes: 2 additions & 2 deletions src/App/Command/GithubContributorsExportCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
class GithubContributorsExportCommand extends Command
{
/**
* @var Github;
* @var Github
*/
protected $github;

Expand Down Expand Up @@ -121,7 +121,7 @@ private function export(InputInterface $input, OutputInterface $output): void

return '';
}, '');
$branch = array_reduce($pullRequest['labels'], function (bool $carry, array $item) {
$branch = array_reduce($pullRequest['labels'], function (string $carry, array $item) {
if (!empty($carry)) {
return $carry;
}
Expand Down
4 changes: 2 additions & 2 deletions src/App/Command/GithubContributorsStatsCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
class GithubContributorsStatsCommand extends Command
{
/**
* @var Github;
* @var Github
*/
protected $github;

Expand Down Expand Up @@ -104,7 +104,7 @@ private function process(InputInterface $input, OutputInterface $output): void
$pullRequest = $pullRequest['node'];
$repository = $pullRequest['repository']['name'];
$createdKey = substr($pullRequest['createdAt'], 0, 10);
$branch = array_reduce($pullRequest['labels']['nodes'], function (bool $carry, array $item) {
$branch = array_reduce($pullRequest['labels']['nodes'], function (string $carry, array $item) {
if (!empty($carry)) {
return $carry;
}
Expand Down
2 changes: 1 addition & 1 deletion src/App/Command/GithubNotificationsCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
class GithubNotificationsCommand extends Command
{
/**
* @var Github;
* @var Github
*/
protected $github;

Expand Down
6 changes: 3 additions & 3 deletions src/App/Command/GithubReleaseNoteCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,17 @@
class GithubReleaseNoteCommand extends Command
{
/**
* @var Github;
* @var Github
*/
protected $github;

/**
* @var OutputInterface;
* @var OutputInterface
*/
protected $output;

/**
* @var int;
* @var int
*/
protected $countRows = 0;

Expand Down
2 changes: 1 addition & 1 deletion src/App/Command/GithubStatsCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
class GithubStatsCommand extends Command
{
/**
* @var Github;
* @var Github
*/
protected $github;

Expand Down
2 changes: 1 addition & 1 deletion src/App/Service/Github.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
class Github
{
/**
* @var Client;
* @var Client
*/
protected $client;

Expand Down
1 change: 0 additions & 1 deletion tests/App/Service/ModuleFetcherTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ public function testGetModules(array $apiReturn, array $expected)
$moduleFetcher = new ModuleFetcher($this->getMockGithub($apiReturn));
$modules = $moduleFetcher->getModules();

$this->assertIsArray($modules);
$this->assertEquals($expected, $modules);
}

Expand Down

0 comments on commit fca0b35

Please sign in to comment.