From 5db241b942d2c9b1809eb8b7ced100b3dac3d7bc Mon Sep 17 00:00:00 2001 From: Faraz Samapoor Date: Fri, 2 Jun 2023 14:09:03 +0330 Subject: Refactors "strpos" calls in /apps/workflowengine to improve code readability. Signed-off-by: Faraz Samapoor Signed-off-by: Faraz Samapoor --- apps/workflowengine/tests/Check/FileMimeTypeTest.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'apps/workflowengine/tests') diff --git a/apps/workflowengine/tests/Check/FileMimeTypeTest.php b/apps/workflowengine/tests/Check/FileMimeTypeTest.php index 3ebcaa8f4b3..c52da9e7b53 100644 --- a/apps/workflowengine/tests/Check/FileMimeTypeTest.php +++ b/apps/workflowengine/tests/Check/FileMimeTypeTest.php @@ -68,7 +68,7 @@ class FileMimeTypeTest extends TestCase { $this->mimeDetector->method('detectPath') ->willReturnCallback(function ($path) { foreach ($this->extensions as $extension => $mime) { - if (strpos($path, $extension) !== false) { + if (str_contains($path, $extension)) { return $mime; } } @@ -78,7 +78,7 @@ class FileMimeTypeTest extends TestCase { ->willReturnCallback(function ($path) { $body = file_get_contents($path); foreach ($this->content as $match => $mime) { - if (strpos($body, $match) !== false) { + if (str_contains($body, $match)) { return $mime; } } -- cgit v1.2.3