Skip to content

Commit 4de94e8

Browse files
committed
Update dependencies
1 parent 1fb3d36 commit 4de94e8

File tree

9 files changed

+821
-956
lines changed

9 files changed

+821
-956
lines changed

composer.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@
1717
"php": ">=8.1"
1818
},
1919
"require-dev": {
20-
"php-coveralls/php-coveralls": "^2.6",
21-
"squizlabs/php_codesniffer": "^3.7",
22-
"phpunit/phpunit": "^10.2",
23-
"phpbench/phpbench": "^1.2"
20+
"php-coveralls/php-coveralls": "^2.7",
21+
"squizlabs/php_codesniffer": "^3.10",
22+
"phpunit/phpunit": "^11.3",
23+
"phpbench/phpbench": "^1.3"
2424
},
2525
"autoload": {
2626
"psr-4": {

composer.lock

Lines changed: 445 additions & 432 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/SortedCollection/ReversedMapTest.php

Lines changed: 37 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
// Declare chdemko\SortedCollection namespace
1515
namespace chdemko\SortedCollection;
1616

17+
use PHPUnit\Framework\Attributes\DataProvider;
1718
use PHPUnit\Framework\TestCase;
1819

1920
/**
@@ -31,13 +32,12 @@ class ReversedMapTest extends TestCase
3132
*
3233
* @return void
3334
*
34-
* @covers chdemko\SortedCollection\ReversedMap::__construct
35-
* @covers chdemko\SortedCollection\ReversedMap::create
36-
* @covers chdemko\SortedCollection\ReversedMap::__get
37-
* @covers chdemko\SortedCollection\ReversedMap::comparator
38-
*
3935
* @since 1.0.0
4036
*/
37+
#[CoversFunction('chdemko\SortedCollection\ReversedMap::__construct')]
38+
#[CoversFunction('chdemko\SortedCollection\ReversedMap::create')]
39+
#[CoversFunction('chdemko\SortedCollection\ReversedMap::__get')]
40+
#[CoversFunction('chdemko\SortedCollection\ReversedMap::comparator')]
4141
public function testConstruct()
4242
{
4343
$tree = TreeMap::create()->initialise(array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9));
@@ -71,10 +71,9 @@ public function testConstruct()
7171
*
7272
* @return void
7373
*
74-
* @covers chdemko\SortedCollection\ReversedMap::first
75-
*
7674
* @since 1.0.0
7775
*/
76+
#[CoversFunction('chdemko\SortedCollection\ReversedMap::first')]
7877
public function testFirst()
7978
{
8079
$tree = TreeMap::create()->initialise(array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9));
@@ -91,10 +90,9 @@ public function testFirst()
9190
*
9291
* @return void
9392
*
94-
* @covers chdemko\SortedCollection\ReversedMap::last
95-
*
9693
* @since 1.0.0
9794
*/
95+
#[CoversFunction('chdemko\SortedCollection\ReversedMap::last')]
9896
public function testLast()
9997
{
10098
$tree = TreeMap::create()->initialise(array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9));
@@ -111,11 +109,10 @@ public function testLast()
111109
*
112110
* @return void
113111
*
114-
* @covers chdemko\SortedCollection\ReversedMap::predecessor
115-
* @covers chdemko\SortedCollection\AbstractMap::predecessor
116-
*
117112
* @since 1.0.0
118113
*/
114+
#[CoversFunction('chdemko\SortedCollection\ReversedMap::predecessor')]
115+
#[CoversFunction('chdemko\SortedCollection\AbstractMap::predecessor')]
119116
public function testPredecessor()
120117
{
121118
$tree = TreeMap::create()->initialise(array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9));
@@ -133,11 +130,10 @@ public function testPredecessor()
133130
*
134131
* @return void
135132
*
136-
* @covers chdemko\SortedCollection\ReversedMap::successor
137-
* @covers chdemko\SortedCollection\AbstractMap::successor
138-
*
139133
* @since 1.0.0
140134
*/
135+
#[CoversFunction('chdemko\SortedCollection\ReversedMap::successor')]
136+
#[CoversFunction('chdemko\SortedCollection\AbstractMap::successor')]
141137
public function testSuccessor()
142138
{
143139
$tree = TreeMap::create()->initialise(array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9));
@@ -179,13 +175,11 @@ public static function casesLowerKey()
179175
*
180176
* @return void
181177
*
182-
* @covers chdemko\SortedCollection\ReversedMap::lower
183-
* @covers chdemko\SortedCollection\AbstractMap::lowerKey
184-
*
185-
* @dataProvider casesLowerKey
186-
*
187178
* @since 1.0.0
188179
*/
180+
#[DataProvider('casesLowerKey')]
181+
#[CoversFunction('chdemko\SortedCollection\ReversedMap::lower')]
182+
#[CoversFunction('chdemko\SortedCollection\AbstractMap::lowerKey')]
189183
public function testLowerKey($values, $key, $expected, $exception)
190184
{
191185
if ($exception) {
@@ -230,13 +224,11 @@ public static function casesFloorKey()
230224
*
231225
* @return void
232226
*
233-
* @covers chdemko\SortedCollection\ReversedMap::floor
234-
* @covers chdemko\SortedCollection\AbstractMap::floorKey
235-
*
236-
* @dataProvider casesFloorKey
237-
*
238227
* @since 1.0.0
239228
*/
229+
#[DataProvider('casesFloorKey')]
230+
#[CoversFunction('chdemko\SortedCollection\ReversedMap::floor')]
231+
#[CoversFunction('chdemko\SortedCollection\AbstractMap::floorKey')]
240232
public function testFloorKey($values, $key, $found, $exception)
241233
{
242234
if ($exception) {
@@ -257,11 +249,10 @@ public function testFloorKey($values, $key, $found, $exception)
257249
*
258250
* @return void
259251
*
260-
* @covers chdemko\SortedCollection\ReversedMap::find
261-
* @covers chdemko\SortedCollection\AbstractMap::findKey
262-
*
263252
* @since 1.0.0
264253
*/
254+
#[CoversFunction('chdemko\SortedCollection\ReversedMap::find')]
255+
#[CoversFunction('chdemko\SortedCollection\AbstractMap::findKey')]
265256
public function testFindKey()
266257
{
267258
$tree = TreeMap::create()->initialise(array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9));
@@ -307,13 +298,11 @@ public static function casesCeilingKey()
307298
*
308299
* @return void
309300
*
310-
* @covers chdemko\SortedCollection\ReversedMap::ceiling
311-
* @covers chdemko\SortedCollection\AbstractMap::floorKey
312-
*
313-
* @dataProvider casesCeilingKey
314-
*
315301
* @since 1.0.0
316302
*/
303+
#[DataProvider('casesCeilingKey')]
304+
#[CoversFunction('chdemko\SortedCollection\ReversedMap::ceiling')]
305+
#[CoversFunction('chdemko\SortedCollection\AbstractMap::floorKey')]
317306
public function testCeilingKey($values, $key, $expected, $exception)
318307
{
319308
if ($exception) {
@@ -358,13 +347,11 @@ public static function casesHigherKey()
358347
*
359348
* @return void
360349
*
361-
* @covers chdemko\SortedCollection\ReversedMap::higher
362-
* @covers chdemko\SortedCollection\AbstractMap::higherKey
363-
*
364-
* @dataProvider casesHigherKey
365-
*
366350
* @since 1.0.0
367351
*/
352+
#[DataProvider('casesHigherKey')]
353+
#[CoversFunction('chdemko\SortedCollection\ReversedMap::higher')]
354+
#[CoversFunction('chdemko\SortedCollection\AbstractMap::higherKey')]
368355
public function testHigherKey($values, $key, $expected, $exception)
369356
{
370357
if ($exception) {
@@ -385,11 +372,10 @@ public function testHigherKey($values, $key, $expected, $exception)
385372
*
386373
* @return void
387374
*
388-
* @covers chdemko\SortedCollection\ReversedMap::keys
389-
* @covers chdemko\SortedCollection\AbstractMap::__get
390-
*
391375
* @since 1.0.0
392376
*/
377+
#[CoversFunction('chdemko\SortedCollection\ReversedMap::keys')]
378+
#[CoversFunction('chdemko\SortedCollection\AbstractMap::__get')]
393379
public function testKeys()
394380
{
395381
$empty = true;
@@ -417,11 +403,10 @@ public function testKeys()
417403
*
418404
* @return void
419405
*
420-
* @covers chdemko\SortedCollection\AbstractMap::values
421-
* @covers chdemko\SortedCollection\AbstractMap::__get
422-
*
423406
* @since 1.0.0
424407
*/
408+
#[CoversFunction('chdemko\SortedCollection\AbstractMap::values')]
409+
#[CoversFunction('chdemko\SortedCollection\AbstractMap::__get')]
425410
public function testValues()
426411
{
427412
$empty = true;
@@ -473,12 +458,10 @@ public static function casesOffsetGet()
473458
*
474459
* @return void
475460
*
476-
* @covers chdemko\SortedCollection\AbstractMap::offsetGet
477-
*
478-
* @dataProvider casesOffsetGet
479-
*
480461
* @since 1.0.0
481462
*/
463+
#[DataProvider('casesOffsetGet')]
464+
#[CoversFunction('chdemko\SortedCollection\AbstractMap::offsetGet')]
482465
public function testOffsetGet($values, $key, $value, $exception)
483466
{
484467
if ($exception) {
@@ -499,10 +482,9 @@ public function testOffsetGet($values, $key, $value, $exception)
499482
*
500483
* @return void
501484
*
502-
* @covers chdemko\SortedCollection\AbstractMap::offsetSet
503-
*
504485
* @since 1.0.0
505486
*/
487+
#[CoversFunction('chdemko\SortedCollection\AbstractMap::offsetSet')]
506488
public function testOffsetSet()
507489
{
508490
$this->expectException('RuntimeException');
@@ -517,10 +499,9 @@ public function testOffsetSet()
517499
*
518500
* @return void
519501
*
520-
* @covers chdemko\SortedCollection\ReversedMap::offsetExists
521-
*
522502
* @since 1.0.0
523503
*/
504+
#[CoversFunction('chdemko\SortedCollection\ReversedMap::offsetExists')]
524505
public function testOffsetExists()
525506
{
526507
$tree = TreeMap::create();
@@ -545,10 +526,9 @@ public function testOffsetExists()
545526
*
546527
* @return void
547528
*
548-
* @covers chdemko\SortedCollection\AbstractMap::offsetUnset
549-
*
550529
* @since 1.0.0
551530
*/
531+
#[CoversFunction('chdemko\SortedCollection\AbstractMap::offsetUnset')]
552532
public function testOffsetUnset()
553533
{
554534
$this->expectException('RuntimeException');
@@ -563,11 +543,10 @@ public function testOffsetUnset()
563543
*
564544
* @return void
565545
*
566-
* @covers chdemko\SortedCollection\ReversedMap::count
567-
* @covers chdemko\SortedCollection\AbstractMap::__get
568-
*
569546
* @since 1.0.0
570547
*/
548+
#[CoversFunction('chdemko\SortedCollection\ReversedMap::count')]
549+
#[CoversFunction('chdemko\SortedCollection\AbstractMap::__get')]
571550
public function testCount()
572551
{
573552
$tree = TreeMap::create();
@@ -591,10 +570,9 @@ public function testCount()
591570
*
592571
* @return void
593572
*
594-
* @covers chdemko\SortedCollection\ReversedMap::jsonSerialize
595-
*
596573
* @since 1.0.0
597574
*/
575+
#[CoversFunction('chdemko\SortedCollection\ReversedMap::jsonSerialize')]
598576
public function testJsonSerialize()
599577
{
600578
$tree = TreeMap::create();

tests/SortedCollection/ReversedSetTest.php

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
// Declare chdemko\SortedCollection namespace
1515
namespace chdemko\SortedCollection;
1616

17+
use PHPUnit\Framework\Attributes\DataProvider;
1718
use PHPUnit\Framework\TestCase;
1819

1920
/**
@@ -59,13 +60,11 @@ function ($key1, $key2) {
5960
*
6061
* @return void
6162
*
62-
* @covers chdemko\SortedCollection\ReversedSet::__construct
63-
* @covers chdemko\SortedCollection\ReversedSet::create
64-
*
65-
* @dataProvider casesCreate
66-
*
6763
* @since 1.0.0
6864
*/
65+
#[DataProvider('casesCreate')]
66+
#[CoversFunction('chdemko\SortedCollection\ReversedSet::__construct')]
67+
#[CoversFunction('chdemko\SortedCollection\ReversedSet::create')]
6968
public function testCreate($values, $key, $comparator, $string)
7069
{
7170
$set = TreeSet::create($comparator)->initialise($values);
@@ -81,11 +80,10 @@ public function testCreate($values, $key, $comparator, $string)
8180
*
8281
* @return void
8382
*
84-
* @covers chdemko\SortedCollection\ReversedSet::__get
85-
* @covers chdemko\SortedCollection\AbstractSet::__get
86-
*
8783
* @since 1.0.0
8884
*/
85+
#[CoversFunction('chdemko\SortedCollection\ReversedSet::__get')]
86+
#[CoversFunction('chdemko\SortedCollection\AbstractSet::__get')]
8987
public function testGet()
9088
{
9189
$set = TreeSet::create()->initialise(array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9));
@@ -105,10 +103,9 @@ public function testGet()
105103
*
106104
* @return void
107105
*
108-
* @covers chdemko\SortedCollection\ReversedSet::offsetSet
109-
*
110106
* @since 1.0.0
111107
*/
108+
#[CoversFunction('chdemko\SortedCollection\ReversedSet::offsetSet')]
112109
public function testOffsetSet()
113110
{
114111
$this->expectException('RuntimeException');
@@ -123,10 +120,9 @@ public function testOffsetSet()
123120
*
124121
* @return void
125122
*
126-
* @covers chdemko\SortedCollection\AbstractSet::offsetUnset
127-
*
128123
* @since 1.0.0
129124
*/
125+
#[CoversFunction('chdemko\SortedCollection\AbstractSet::offsetUnset')]
130126
public function testOffsetUnset()
131127
{
132128
$this->expectException('RuntimeException');
@@ -141,10 +137,9 @@ public function testOffsetUnset()
141137
*
142138
* @return void
143139
*
144-
* @covers chdemko\SortedCollection\ReversedSet::jsonSerialize
145-
*
146140
* @since 1.0.0
147141
*/
142+
#[CoversFunction('chdemko\SortedCollection\ReversedSet::jsonSerialize')]
148143
public function testJsonSerialize()
149144
{
150145
$set = TreeSet::create();

0 commit comments

Comments
 (0)