Skip to content

Commit 87ece50

Browse files
Backport type fixes
1 parent ed33314 commit 87ece50

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

Iterator/SortableIterator.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,7 @@ class SortableIterator implements \IteratorAggregate
3030
private $sort;
3131

3232
/**
33-
* @param \Traversable $iterator The Iterator to filter
34-
* @param int|callable $sort The sort type (SORT_BY_NAME, SORT_BY_TYPE, or a PHP callback)
33+
* @param int|callable $sort The sort type (SORT_BY_NAME, SORT_BY_TYPE, or a PHP callback)
3534
*
3635
* @throws \InvalidArgumentException
3736
*/

Tests/Iterator/SortableIteratorTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class SortableIteratorTest extends RealIteratorTestCase
1818
public function testConstructor()
1919
{
2020
try {
21-
new SortableIterator(new Iterator([]), 'foobar');
21+
new SortableIterator(new Iterator([]), -255);
2222
$this->fail('__construct() throws an \InvalidArgumentException exception if the mode is not valid');
2323
} catch (\Exception $e) {
2424
$this->assertInstanceOf(\InvalidArgumentException::class, $e, '__construct() throws an \InvalidArgumentException exception if the mode is not valid');

0 commit comments

Comments
 (0)