Skip to content

Commit

Permalink
CS fixed (#76)
Browse files Browse the repository at this point in the history
  • Loading branch information
Spomky authored Oct 23, 2024
1 parent b2bdecc commit 771d3b1
Show file tree
Hide file tree
Showing 5 changed files with 59 additions and 41 deletions.
6 changes: 1 addition & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
CBOR for PHP
============

![Build Status](https://github.com/Spomky-Labs/cbor-php/workflows/Unit%20and%20Functional%20Tests/badge.svg)
![Build Status](https://github.com/Spomky-Labs/cbor-php/workflows/Mutation%20Testing/badge.svg)

![Coding Standards](https://github.com/Spomky-Labs/cbor-php/workflows/Coding%20Standards/badge.svg)
![Static Analyze](https://github.com/Spomky-Labs/cbor-php/workflows/Static%20Analyze/badge.svg)
![Build Status](https://github.com/Spomky-Labs/cbor-php/workflows/Integrate/badge.svg)

[![Latest Stable Version](https://poser.pugx.org/Spomky-Labs/cbor-php/v)](//packagist.org/packages/Spomky-Labs/cbor-php)
[![Total Downloads](https://poser.pugx.org/Spomky-Labs/cbor-php/downloads)](//packagist.org/packages/Spomky-Labs/cbor-php)
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
},
"require-dev": {
"ext-json": "*",
"ekino/phpstan-banned-code": "^1.0 || ^2.0",
"ekino/phpstan-banned-code": "^2.0",
"infection/infection": "^0.29",
"phpstan/extension-installer": "^1.1",
"phpstan/phpstan": "^1.0",
Expand Down
90 changes: 55 additions & 35 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
@@ -1,36 +1,56 @@
parameters:
ignoreErrors:
-
message: "#^Instanceof between CBOR\\\\MapItem and CBOR\\\\MapItem will always evaluate to true\\.$#"
count: 1
path: src/MapObject.php

-
message: "#^Parameter \\#1 \\$value of static method CBOR\\\\Utils\\:\\:binToBigInteger\\(\\) expects string, string\\|null given\\.$#"
count: 3
path: src/OtherObject/DoublePrecisionFloatObject.php

-
message: "#^Parameter \\#1 \\$value of static method CBOR\\\\Utils\\:\\:binToBigInteger\\(\\) expects string, string\\|null given\\.$#"
count: 3
path: src/OtherObject/HalfPrecisionFloatObject.php

-
message: "#^PHPDoc tag @var with type CBOR\\\\OtherObject is not subtype of native type string\\.$#"
count: 1
path: src/OtherObject/OtherObjectManager.php

-
message: "#^Parameter \\#1 \\$value of static method CBOR\\\\Utils\\:\\:binToBigInteger\\(\\) expects string, string\\|null given\\.$#"
count: 3
path: src/OtherObject/SinglePrecisionFloatObject.php

-
message: "#^PHPDoc tag @var with type CBOR\\\\Tag is not subtype of native type string\\.$#"
count: 1
path: src/Tag/TagManager.php

-
message: "#^Parameter \\#1 \\$value of static method CBOR\\\\Utils\\:\\:binToInt\\(\\) expects string, string\\|null given\\.$#"
count: 1
path: src/Tag/TagManager.php
ignoreErrors:
-
message: "#^Instanceof between CBOR\\\\MapItem and CBOR\\\\MapItem will always evaluate to true\\.$#"
count: 1
path: src/MapObject.php

-
message: "#^Parameter \\#1 \\$value of static method CBOR\\\\Utils\\:\\:binToBigInteger\\(\\) expects string, string\\|null given\\.$#"
count: 3
path: src/OtherObject/DoublePrecisionFloatObject.php

-
message: "#^Parameter \\#1 \\$value of static method CBOR\\\\Utils\\:\\:binToBigInteger\\(\\) expects string, string\\|null given\\.$#"
count: 3
path: src/OtherObject/HalfPrecisionFloatObject.php

-
message: "#^PHPDoc tag @var with type CBOR\\\\OtherObject is not subtype of native type string\\.$#"
count: 1
path: src/OtherObject/OtherObjectManager.php

-
message: "#^Parameter \\#1 \\$value of static method CBOR\\\\Utils\\:\\:binToBigInteger\\(\\) expects string, string\\|null given\\.$#"
count: 3
path: src/OtherObject/SinglePrecisionFloatObject.php

-
message: "#^Parameter \\#1 \\$num1 of function bcmul expects numeric\\-string, string given\\.$#"
count: 1
path: src/Tag/BigFloatTag.php

-
message: "#^Parameter \\#2 \\$exponent of function bcpow expects numeric\\-string, string given\\.$#"
count: 1
path: src/Tag/BigFloatTag.php

-
message: "#^Parameter \\#1 \\$num1 of function bcmul expects numeric\\-string, string given\\.$#"
count: 1
path: src/Tag/DecimalFractionTag.php

-
message: "#^Parameter \\#2 \\$exponent of function bcpow expects numeric\\-string, string given\\.$#"
count: 1
path: src/Tag/DecimalFractionTag.php

-
message: "#^PHPDoc tag @var with type CBOR\\\\Tag is not subtype of native type string\\.$#"
count: 1
path: src/Tag/TagManager.php

-
message: "#^Parameter \\#1 \\$value of static method CBOR\\\\Utils\\:\\:binToInt\\(\\) expects string, string\\|null given\\.$#"
count: 1
path: src/Tag/TagManager.php
1 change: 1 addition & 0 deletions src/Decoder.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
use InvalidArgumentException;
use RuntimeException;
use function ord;
use function sprintf;
use const STR_PAD_LEFT;

final class Decoder implements DecoderInterface
Expand Down
1 change: 1 addition & 0 deletions src/StringStream.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

use InvalidArgumentException;
use RuntimeException;
use function sprintf;
use function strlen;

final class StringStream implements Stream
Expand Down

0 comments on commit 771d3b1

Please sign in to comment.