Skip to content

Commit b22e8c0

Browse files
committed
Some code style & dependency cleanup
1 parent f19e5b3 commit b22e8c0

File tree

6 files changed

+9
-12
lines changed

6 files changed

+9
-12
lines changed

composer.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@
2020
],
2121
"require": {
2222
"php": ">=8.0",
23-
"squirrelphp/debug": "^2.0"
23+
"squirrelphp/debug": "^2.1"
2424
},
2525
"require-dev": {
26-
"bamarni/composer-bin-plugin": "^1.3",
27-
"phpunit/phpunit": "^9.0"
26+
"bamarni/composer-bin-plugin": "^1.8",
27+
"phpunit/phpunit": "^9.5"
2828
},
2929
"config": {
3030
"sort-packages": false,

phpstan.neon

+2-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ includes:
22
- phpstan-baseline.neon
33

44
parameters:
5-
level: 9
5+
level: max
66
paths:
7-
- src
8-
checkMissingIterableValueType: false
7+
- src

psalm-baseline.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<files psalm-version="4.23.0@f1fe6ff483bf325c803df9f510d09a03fd796f88">
2+
<files psalm-version="5.2.0@fb685a16df3050d4c18d8a4100fe83abe6458cba">
33
<file src="src/Coerce.php">
44
<ImpureMethodCall occurrences="1">
55
<code>__toString</code>

src/Coerce.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ public static function floatToString(int|float $value): string
147147
*/
148148
public static function intToBool(int $value): bool
149149
{
150-
return match($value) {
150+
return match ($value) {
151151
0 => false,
152152
1 => true,
153153
default => throw new TypeError('Only 0 and 1 can be coerced from an integer to a boolean, given value: ' . Debug::sanitizeData($value)),

src/Coerceable.php

+1-3
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@
22

33
namespace Squirrel\Types;
44

5-
use Squirrel\Debug\Debug;
65
use Stringable;
7-
use TypeError;
86

97
final class Coerceable
108
{
@@ -124,7 +122,7 @@ public static function stringToBool(string $value, bool $allowEmptyString = fals
124122
*/
125123
public static function intToBool(int $value): bool
126124
{
127-
return match($value) {
125+
return match ($value) {
128126
0, 1 => true,
129127
default => false,
130128
};

vendor-bin/psalm/composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"require": {
3-
"vimeo/psalm": "^4.0"
3+
"vimeo/psalm": "^5.2"
44
}
55
}

0 commit comments

Comments
 (0)