Skip to content

Commit 3dc0fd0

Browse files
Set strict parameter of in_array to true where possible
1 parent 074289b commit 3dc0fd0

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

GenericLinkProvider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public function getLinksByRel(string $rel): array
4545
$links = [];
4646

4747
foreach ($this->links as $link) {
48-
if (\in_array($rel, $link->getRels())) {
48+
if (\in_array($rel, $link->getRels(), true)) {
4949
$links[] = $link;
5050
}
5151
}

Tests/LinkTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public function testCanRemoveValues()
4545
->withoutRel('next');
4646

4747
$this->assertEquals('http://www.google.com', $link->getHref());
48-
$this->assertFalse(\in_array('next', $link->getRels()));
48+
$this->assertFalse(\in_array('next', $link->getRels(), true));
4949
$this->assertArrayNotHasKey('me', $link->getAttributes());
5050
}
5151

0 commit comments

Comments
 (0)