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

CS fixed #76

Merged
merged 1 commit into from
Oct 23, 2024
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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