Skip to content

Commit

Permalink
tools(deps-dev): Update friendsofphp/php-cs-fixer requirement from 3.…
Browse files Browse the repository at this point in the history
…16.0 to 3.17.0 in /tools/php-cs-fixer (#302)

* tools(deps-dev): Update friendsofphp/php-cs-fixer requirement

Updates the requirements on [friendsofphp/php-cs-fixer](https://github.com/PHP-CS-Fixer/PHP-CS-Fixer) to permit the latest version.
- [Release notes](https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/releases)
- [Changelog](https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/blob/master/CHANGELOG.md)
- [Commits](PHP-CS-Fixer/PHP-CS-Fixer@v3.16.0...v3.17.0)

---
updated-dependencies:
- dependency-name: friendsofphp/php-cs-fixer
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>

* apply cs-fixes

Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jan Kowalleck <jan.kowalleck@gmail.com>
  • Loading branch information
dependabot[bot] and jkowalleck committed May 27, 2023
1 parent 917c978 commit fa0ade0
Show file tree
Hide file tree
Showing 9 changed files with 8 additions and 16 deletions.
2 changes: 1 addition & 1 deletion src/Core/Models/BomRef.php
Expand Up @@ -38,7 +38,7 @@ final class BomRef
/** @psalm-var non-empty-string|null */
private ?string $value;

public function __construct(?string $value = null)
public function __construct(string $value = null)
{
$this->setValue($value);
}
Expand Down
4 changes: 1 addition & 3 deletions src/Core/Serialization/BaseSerializer.php
Expand Up @@ -82,11 +82,9 @@ private function normalize(BOM $bom)
}

/**
* {@inheritDoc}
*
* @SuppressWarnings(PHPMD.BooleanArgumentFlag)
*/
final public function serialize(Bom $bom, ?bool $prettyPrint = null): string
final public function serialize(Bom $bom, bool $prettyPrint = null): string
{
return $this->realSerialize(
$this->normalize($bom),
Expand Down
4 changes: 2 additions & 2 deletions src/Core/Serialization/DOM/Normalizers/BomNormalizer.php
Expand Up @@ -75,8 +75,8 @@ public function normalize(Bom $bom): DOMElement
private function normalizeSerialNumber(?string $serialNumber): ?string
{
// @TODO have the regex configurable per Spec
return \is_string($serialNumber) &&
1 === preg_match('/^urn:uuid:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$|^\\{[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\\}$/', $serialNumber)
return \is_string($serialNumber)
&& 1 === preg_match('/^urn:uuid:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$|^\\{[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\\}$/', $serialNumber)
? $serialNumber
: null;
}
Expand Down
4 changes: 2 additions & 2 deletions src/Core/Serialization/JSON/Normalizers/BomNormalizer.php
Expand Up @@ -81,8 +81,8 @@ public function normalize(Bom $bom): array
private function normalizeSerialNumber(?string $serialNumber): ?string
{
// @TODO have the regex configurable per Spec
return \is_string($serialNumber) &&
1 === preg_match('/^urn:uuid:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/', $serialNumber)
return \is_string($serialNumber)
&& 1 === preg_match('/^urn:uuid:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/', $serialNumber)
? $serialNumber
: null;
}
Expand Down
2 changes: 1 addition & 1 deletion src/Core/Serialization/Serializer.php
Expand Up @@ -41,5 +41,5 @@ interface Serializer
*
* @SuppressWarnings(PHPMD.BooleanArgumentFlag)
*/
public function serialize(Bom $bom, ?bool $prettyPrint = null): string;
public function serialize(Bom $bom, bool $prettyPrint = null): string;
}
2 changes: 0 additions & 2 deletions src/Core/Validation/Validators/JsonStrictValidator.php
Expand Up @@ -32,8 +32,6 @@
class JsonStrictValidator extends JsonValidator
{
/**
* {@inheritdoc}
*
* @internal
*/
protected static function listSchemaFiles(): array
Expand Down
2 changes: 0 additions & 2 deletions src/Core/Validation/Validators/JsonValidator.php
Expand Up @@ -40,8 +40,6 @@
class JsonValidator extends BaseValidator
{
/**
* {@inheritdoc}
*
* @internal as this function may be affected by breaking changes without notice
*/
protected static function listSchemaFiles(): array
Expand Down
2 changes: 0 additions & 2 deletions src/Core/Validation/Validators/XmlValidator.php
Expand Up @@ -38,8 +38,6 @@
class XmlValidator extends BaseValidator
{
/**
* {@inheritdoc}
*
* @internal as this function may be affected by breaking changes without notice
*/
protected static function listSchemaFiles(): array
Expand Down
2 changes: 1 addition & 1 deletion tools/php-cs-fixer/composer.json
Expand Up @@ -3,7 +3,7 @@
"description": "php-cs-fixer",
"type": "metapackage",
"require-dev": {
"friendsofphp/php-cs-fixer": "3.16.0",
"friendsofphp/php-cs-fixer": "3.17.0",
"roave/security-advisories": "dev-latest"
},
"prefer-stable": true,
Expand Down

0 comments on commit fa0ade0

Please sign in to comment.