Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tools(deps-dev): Update friendsofphp/php-cs-fixer requirement from 3.22.0 to 3.23.0 in /tools/php-cs-fixer #341

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file.

## unreleased

* Style
* Applied latest PHP Coding Standards (via [#341])

[#341]: https://github.com/CycloneDX/cyclonedx-php-library/pull/341

## 2.3.0 - 2023-06-27

Added support for [_CycloneDX_ Specification-1.5](https://github.com/CycloneDX/specification/releases/tag/1.5).
Expand Down
9 changes: 5 additions & 4 deletions src/Core/Factories/LicenseFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
use CycloneDX\Core\Models\License\SpdxLicense;
use CycloneDX\Core\Spdx\LicenseIdentifiers;
use DomainException;
use InvalidArgumentException;

class LicenseFactory
{
Expand All @@ -52,12 +53,12 @@ public function makeFromString(string $license): SpdxLicense|LicenseExpression|N
{
try {
return $this->makeSpdxLicense($license);
} catch (\DomainException) {
} catch (DomainException) {
/* pass */
}
try {
return $this->makeExpression($license);
} catch (\DomainException) {
} catch (DomainException) {
/* pass */
}

Expand All @@ -68,7 +69,7 @@ public function makeDisjunctive(string $license): SpdxLicense|NamedLicense
{
try {
return $this->makeSpdxLicense($license);
} catch (\DomainException) {
} catch (DomainException) {
return $this->makeNamedLicense($license);
}
}
Expand All @@ -80,7 +81,7 @@ public function makeExpression(string $license): LicenseExpression
{
try {
$valid = $this->spdxLicenses->validate($license);
} catch (\InvalidArgumentException) {
} catch (InvalidArgumentException) {
$valid = false;
}
if ($valid) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@

use CycloneDX\Core\Collections\ComponentRepository;
use CycloneDX\Core\Serialization\DOM\_BaseNormalizer;
use DomainException;
use DOMElement;

/**
Expand All @@ -45,7 +46,7 @@ public function normalize(ComponentRepository $repo): array
foreach ($repo->getItems() as $component) {
try {
$components[] = $normalizer->normalize($component);
} catch (\DomainException) {
} catch (DomainException) {
// pass
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@

use CycloneDX\Core\Collections\HashDictionary;
use CycloneDX\Core\Serialization\DOM\_BaseNormalizer;
use DomainException;
use DOMElement;

/**
Expand All @@ -45,7 +46,7 @@ public function normalize(HashDictionary $repo): array
foreach ($repo->getItems() as [$algorithm , $content]) {
try {
$hashes[] = $hashNormalizer->normalize($algorithm, $content);
} catch (\DomainException) {
} catch (DomainException) {
// pass
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
use DateTime;
use DateTimeInterface;
use DateTimeZone;
use DomainException;
use DOMElement;

/**
Expand Down Expand Up @@ -90,7 +91,7 @@ private function normalizeComponent(?Component $component): ?DOMElement

try {
return $this->getNormalizerFactory()->makeForComponent()->normalize($component);
} catch (\DomainException) {
} catch (DomainException) {
return null;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@

use CycloneDX\Core\Collections\PropertyRepository;
use CycloneDX\Core\Serialization\DOM\_BaseNormalizer;
use DomainException;
use DOMElement;

/**
Expand All @@ -45,7 +46,7 @@ public function normalize(PropertyRepository $repo): array
foreach ($repo->getItems() as $property) {
try {
$properties[] = $normalizer->normalize($property);
} catch (\DomainException) {
} catch (DomainException) {
// pass
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@

use CycloneDX\Core\Collections\ToolRepository;
use CycloneDX\Core\Serialization\DOM\_BaseNormalizer;
use DomainException;
use DOMElement;

/**
Expand All @@ -45,7 +46,7 @@ public function normalize(ToolRepository $repo): array
foreach ($repo->getItems() as $tool) {
try {
$tools[] = $normalizer->normalize($tool);
} catch (\DomainException) {
} catch (DomainException) {
// pass
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@

use CycloneDX\Core\Collections\ComponentRepository;
use CycloneDX\Core\Serialization\JSON\_BaseNormalizer;
use DomainException;

/**
* @author jkowalleck
Expand All @@ -42,7 +43,7 @@ public function normalize(ComponentRepository $repo): array
foreach ($repo->getItems() as $component) {
try {
$components[] = $normalizer->normalize($component);
} catch (\DomainException) {
} catch (DomainException) {
// pass
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@

use CycloneDX\Core\Collections\HashDictionary;
use CycloneDX\Core\Serialization\JSON\_BaseNormalizer;
use DomainException;

/**
* @author jkowalleck
Expand All @@ -39,7 +40,7 @@ public function normalize(HashDictionary $repo): array
foreach ($repo->getItems() as [$algorithm , $content]) {
try {
$hashes[] = $normalizer->normalize($algorithm, $content);
} catch (\DomainException) {
} catch (DomainException) {
/* pass */
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
use DateTime;
use DateTimeInterface;
use DateTimeZone;
use DomainException;

/**
* @author jkowalleck
Expand Down Expand Up @@ -80,7 +81,7 @@ private function normalizeComponent(?Component $component): ?array

try {
return $this->getNormalizerFactory()->makeForComponent()->normalize($component);
} catch (\DomainException) {
} catch (DomainException) {
return null;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@

use CycloneDX\Core\Collections\PropertyRepository;
use CycloneDX\Core\Serialization\JSON\_BaseNormalizer;
use DomainException;

/**
* @author jkowalleck
Expand All @@ -39,7 +40,7 @@ public function normalize(PropertyRepository $repo): array
foreach ($repo->getItems() as $property) {
try {
$properties[] = $normalizer->normalize($property);
} catch (\DomainException) {
} catch (DomainException) {
// pass
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@

use CycloneDX\Core\Collections\ToolRepository;
use CycloneDX\Core\Serialization\JSON\_BaseNormalizer;
use DomainException;

/**
* @author jkowalleck
Expand All @@ -44,7 +45,7 @@ public function normalize(ToolRepository $repo): array
foreach ($repo->getItems() as $tool) {
try {
$item = $normalizer->normalize($tool);
} catch (\DomainException) {
} catch (DomainException) {
continue;
}
if (false === empty($item)) {
Expand Down
2 changes: 1 addition & 1 deletion tools/php-cs-fixer/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"description": "php-cs-fixer",
"type": "metapackage",
"require-dev": {
"friendsofphp/php-cs-fixer": "3.22.0",
"friendsofphp/php-cs-fixer": "3.23.0",
"roave/security-advisories": "dev-latest"
},
"prefer-stable": true,
Expand Down