Skip to content

Commit

Permalink
Fix CS
Browse files Browse the repository at this point in the history
  • Loading branch information
jderusse committed Dec 3, 2024
1 parent a38d8e6 commit 3c0cb7d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,15 @@
use SensitiveParameter;
use UnexpectedValueException;

use function in_array;

final class GetAdvisoriesFromGithubApi implements GetAdvisories
{
private const IGNORED_ADVISORIES = [
'GHSA-7q22-x757-cmgc', // @see https://phpc.social/@wouterj/113588554019692959
'GHSA-cg28-v4wq-whv5' // @see https://phpc.social/@wouterj/113588554019692959
'GHSA-cg28-v4wq-whv5', // @see https://phpc.social/@wouterj/113588554019692959
];
private const GRAPHQL_QUERY = 'query {
private const GRAPHQL_QUERY = 'query {
securityVulnerabilities(ecosystem: COMPOSER, first: 100 %s) {
edges {
cursor
Expand Down Expand Up @@ -90,6 +92,7 @@ public function __invoke(): Generator
// Skip withdrawn advisories.
continue;
}

if (in_array($item['node']['advisory']['ghsaId'], self::IGNORED_ADVISORIES, true)) {
// Skip ignored advisories.
continue;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -341,9 +341,7 @@ public function testWillSkipWithdrawnAdvisories(ResponseInterface ...$responses)
], Vec\Values($advisories()));
}

/**
* @dataProvider correctResponseWithIgnoredAdvisories
*/
/** @dataProvider correctResponseWithIgnoredAdvisories */
public function testWillSkipIgnoredAdvisories(ResponseInterface ...$responses): void
{
$client = $this->createMock(Client::class);
Expand Down

0 comments on commit 3c0cb7d

Please sign in to comment.