Skip to content

Commit

Permalink
Implement Nexus Collection
Browse files Browse the repository at this point in the history
  • Loading branch information
paulbalandan committed Dec 12, 2024
1 parent b46706a commit a535593
Show file tree
Hide file tree
Showing 53 changed files with 2,959 additions and 6 deletions.
4 changes: 3 additions & 1 deletion .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@
])
;

$overrides = [];
$overrides = [
'final_public_method_for_abstract_class' => false,
];

$options = [
'cacheFile' => 'build/.php-cs-fixer.cache',
Expand Down
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
},
"replace": {
"nexusphp/clock": "self.version",
"nexusphp/collection": "self.version",
"nexusphp/option": "self.version",
"nexusphp/phpstan-nexus": "self.version"
},
Expand Down
19 changes: 16 additions & 3 deletions infection.json5
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,24 @@
"BitwiseXor": true,
"Break_": true,
"CastArray": true,
"CastBool": true,
"CastBool": {
"ignore": [
"Nexus\\Collection\\Collection::filterWithKey",
"Nexus\\Collection\\Collection::reject"
]
},
"CastFloat": true,
"CastInt": {
"ignore": [
"Nexus\\Clock\\SystemClock"
]
},
"CastObject": true,
"CastString": true,
"CastString": {
"ignore": [
"Nexus\\Collection\\Collection::toArrayKey"
]
},
"CatchBlockRemoval": true,
"Catch_": true,
"CloneRemoval": true,
Expand Down Expand Up @@ -122,7 +131,11 @@
"Ternary": true,
"This": true,
"Throw_": true,
"TrueValue": true,
"TrueValue": {
"ignore": [
"Nexus\\Collection\\Collection::generateDiffHashTable"
]
},
"UnwrapArrayChangeKeyCase": true,
"UnwrapArrayChunk": true,
"UnwrapArrayColumn": true,
Expand Down
6 changes: 6 additions & 0 deletions phpstan-baseline.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
<?php declare(strict_types = 1);

$ignoreErrors = [];
$ignoreErrors[] = [
'message' => '#^Method Nexus\\\\Collection\\\\Collection\\:\\:all\\(\\) should return array\\<T\\> but returns array\\<TKey, T\\>\\.$#',
'identifier' => 'return.type',
'count' => 1,
'path' => __DIR__ . '/src/Nexus/Collection/Collection.php',
];
$ignoreErrors[] = [
'message' => '#^Method Nexus\\\\Option\\\\Choice\\:\\:from\\(\\) never returns Nexus\\\\Option\\\\Some\\<T of mixed\\> so it can be removed from the return type\\.$#',
'identifier' => 'return.unusedType',
Expand Down
Loading

0 comments on commit a535593

Please sign in to comment.