Skip to content

Commit e11b482

Browse files
committed
Rename match function for PHP 8 compatibility.
1 parent 45aaeae commit e11b482

File tree

11 files changed

+22
-22
lines changed

11 files changed

+22
-22
lines changed

src/Adapters/Archive/Detectors/Code.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
use Embed\Detectors\Code as Detector;
77
use Embed\EmbedCode;
88
use function Embed\html;
9-
use function Embed\match;
9+
use function Embed\matchPath;
1010

1111
class Code extends Detector
1212
{
@@ -15,7 +15,7 @@ public function detect(): ?EmbedCode
1515
$uri = $this->extractor->getUri();
1616
$path = $uri->getPath();
1717

18-
if (!match('/details/*', $path)) {
18+
if (!matchPath('/details/*', $path)) {
1919
return null;
2020
}
2121

src/Adapters/CadenaSer/Detectors/Code.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
use Embed\Detectors\Code as Detector;
88
use Embed\EmbedCode;
99
use function Embed\html;
10-
use function Embed\match;
10+
use function Embed\matchPath;
1111

1212
class Code extends Detector
1313
{
@@ -21,7 +21,7 @@ private function fallback(): ?EmbedCode
2121
{
2222
$uri = $this->extractor->getUri();
2323

24-
if (!match('/audio/*', $uri->getPath())) {
24+
if (!matchPath('/audio/*', $uri->getPath())) {
2525
return null;
2626
}
2727

src/Adapters/Flickr/Detectors/Code.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
use Embed\Detectors\Code as Detector;
88
use Embed\EmbedCode;
99
use function Embed\html;
10-
use function Embed\match;
10+
use function Embed\matchPath;
1111

1212
class Code extends Detector
1313
{
@@ -21,7 +21,7 @@ private function fallback(): ?EmbedCode
2121
{
2222
$uri = $this->extractor->getUri();
2323

24-
if (!match('/photos/*', $uri->getPath())) {
24+
if (!matchPath('/photos/*', $uri->getPath())) {
2525
return null;
2626
}
2727

src/Adapters/Github/Detectors/Code.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
use Embed\Detectors\Code as Detector;
77
use Embed\EmbedCode;
88
use function Embed\html;
9-
use function Embed\match;
9+
use function Embed\matchPath;
1010

1111
class Code extends Detector
1212
{
@@ -21,7 +21,7 @@ private function fallback(): ?EmbedCode
2121
$uri = $this->extractor->getUri();
2222
$path = $uri->getPath();
2323

24-
if (!match('/*/*/blob/*', $path)) {
24+
if (!matchPath('/*/*/blob/*', $path)) {
2525
return null;
2626
}
2727

src/Adapters/ImageShack/Api.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
use function Embed\getDirectory;
77
use Embed\HttpApiTrait;
8-
use function Embed\match;
8+
use function Embed\matchPath;
99

1010
class Api
1111
{
@@ -15,10 +15,10 @@ protected function fetchData(): array
1515
{
1616
$uri = $this->extractor->getUri();
1717

18-
if (!match('/i/*', $uri->getPath())) {
18+
if (!matchPath('/i/*', $uri->getPath())) {
1919
$uri = $this->extractor->getRequest()->getUri();
2020

21-
if (!match('/i/*', $uri->getPath())) {
21+
if (!matchPath('/i/*', $uri->getPath())) {
2222
return [];
2323
}
2424
}

src/Adapters/Pinterest/Detectors/Code.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
use Embed\Detectors\Code as Detector;
77
use Embed\EmbedCode;
88
use function Embed\html;
9-
use function Embed\match;
9+
use function Embed\matchPath;
1010

1111
class Code extends Detector
1212
{
@@ -20,7 +20,7 @@ private function fallback(): ?EmbedCode
2020
{
2121
$uri = $this->extractor->getUri();
2222

23-
if (!match('/pin/*', $uri->getPath())) {
23+
if (!matchPath('/pin/*', $uri->getPath())) {
2424
return null;
2525
}
2626

src/Adapters/Sassmeister/Detectors/Code.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
use Embed\Detectors\Code as Detector;
77
use Embed\EmbedCode;
88
use function Embed\html;
9-
use function Embed\match;
9+
use function Embed\matchPath;
1010

1111
class Code extends Detector
1212
{
@@ -20,7 +20,7 @@ private function fallback(): ?EmbedCode
2020
{
2121
$uri = $this->extractor->getUri();
2222

23-
if (!match('/gist/*', $uri->getPath())) {
23+
if (!matchPath('/gist/*', $uri->getPath())) {
2424
return null;
2525
}
2626

src/Adapters/Snipplr/Detectors/Code.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
use Embed\Detectors\Code as Detector;
77
use Embed\EmbedCode;
88
use function Embed\html;
9-
use function Embed\match;
9+
use function Embed\matchPath;
1010

1111
class Code extends Detector
1212
{
@@ -20,7 +20,7 @@ private function fallback(): ?EmbedCode
2020
{
2121
$uri = $this->extractor->getUri();
2222

23-
if (!match('/view/*', $uri->getPath())) {
23+
if (!matchPath('/view/*', $uri->getPath())) {
2424
return null;
2525
}
2626

src/Adapters/Wikipedia/Api.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
use function Embed\getDirectory;
77
use Embed\HttpApiTrait;
8-
use function Embed\match;
8+
use function Embed\matchPath;
99

1010
class Api
1111
{
@@ -15,7 +15,7 @@ protected function fetchData(): array
1515
{
1616
$uri = $this->extractor->getUri();
1717

18-
if (!match('/wiki/*', $uri->getPath())) {
18+
if (!matchPath('/wiki/*', $uri->getPath())) {
1919
return [];
2020
}
2121

src/Adapters/Youtube/Detectors/Feeds.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
use Embed\Detectors\Feeds as Detector;
77
use function Embed\getDirectory;
8-
use function Embed\match;
8+
use function Embed\matchPath;
99
use Psr\Http\Message\UriInterface;
1010

1111
class Feeds extends Detector
@@ -23,7 +23,7 @@ private function fallback(): array
2323
{
2424
$uri = $this->extractor->getUri();
2525

26-
if (!match('/channel/*', $uri->getPath())) {
26+
if (!matchPath('/channel/*', $uri->getPath())) {
2727
return [];
2828
}
2929

0 commit comments

Comments
 (0)