File tree Expand file tree Collapse file tree 3 files changed +12
-8
lines changed Expand file tree Collapse file tree 3 files changed +12
-8
lines changed Original file line number Diff line number Diff line change 99jobs :
1010 code-style :
1111 name : Code Style & Static Analysis
12- runs-on : ubuntu-20.04
12+ runs-on : ubuntu-latest
1313 steps :
1414 - name : Checkout
15- uses : actions/checkout@v2
15+ uses : actions/checkout@v4
1616
1717 - name : Setup PHP
1818 uses : shivammathur/setup-php@v2
@@ -32,18 +32,22 @@ jobs:
3232
3333 tests :
3434 name : Test Suite
35- runs-on : ubuntu-20.04
35+ runs-on : ubuntu-latest
3636 strategy :
3737 max-parallel : 10
3838 matrix :
3939 php :
4040 - 7.4
4141 - 8.0
4242 - 8.1
43+ - 8.2
44+ - 8.3
45+ - 8.4
46+ - 8.5
4347
4448 steps :
4549 - name : Checkout
46- uses : actions/checkout@v2
50+ uses : actions/checkout@v4
4751
4852 - name : Setup PHP
4953 uses : shivammathur/setup-php@v2
Original file line number Diff line number Diff line change 1919 },
2020 "require" : {
2121 "php" : " >=7.4" ,
22- "bentools/cartesian-product" : " ^1.1 "
22+ "bentools/cartesian-product" : " ^1.5|^2.0 "
2323 },
2424 "require-dev" : {
2525 "phpunit/phpunit" : " ^8.0|^9.0" ,
Original file line number Diff line number Diff line change 22
33namespace BenTools \StringCombinations ;
44
5- use function BenTools \CartesianProduct \cartesian_product ;
5+ use function BenTools \CartesianProduct \combinations ;
66use Countable ;
77use IteratorAggregate ;
88use Traversable ;
@@ -54,7 +54,7 @@ public function count(): int
5454 {
5555 if (null === $ this ->count ) {
5656 $ this ->count = array_sum (array_map (function ($ set ) {
57- return count (cartesian_product ($ set ));
57+ return count (combinations ($ set ));
5858 }, iterator_to_array ($ this ->generateSets ())));
5959 }
6060 return $ this ->count ;
@@ -63,7 +63,7 @@ public function count(): int
6363 public function getIterator (): Traversable
6464 {
6565 foreach ($ this ->generateSets () as $ set ) {
66- foreach (cartesian_product ($ set ) as $ combination ) {
66+ foreach (combinations ($ set ) as $ combination ) {
6767 yield implode ($ this ->glue , $ combination );
6868 }
6969 }
You can’t perform that action at this time.
0 commit comments