diff options
author | Côme Chilliet <91878298+come-nc@users.noreply.github.com> | 2023-08-07 09:10:43 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-07 09:10:43 +0200 |
commit | bfe42de8f878985c75c6f0bb868b905fe293d8da (patch) | |
tree | e52c4d55a622533f171c2079e8e125f8bd147cfe /apps/workflowengine/tests | |
parent | 97ad1fbd96086bb57bf89bd5e40bfabe25d699fd (diff) | |
parent | 9d15e6e21da653beab4837bfd439ff2a13bf749c (diff) | |
download | nextcloud-server-bfe42de8f878985c75c6f0bb868b905fe293d8da.tar.gz nextcloud-server-bfe42de8f878985c75c6f0bb868b905fe293d8da.zip |
Merge pull request #38604 from fsamapoor/replace_strpos_calls_in_workflowengine_app
Refactors "strpos" calls in /apps/workflowengine
Diffstat (limited to 'apps/workflowengine/tests')
-rw-r--r-- | apps/workflowengine/tests/Check/FileMimeTypeTest.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/workflowengine/tests/Check/FileMimeTypeTest.php b/apps/workflowengine/tests/Check/FileMimeTypeTest.php index e5a4c99269f..08dd9f26258 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; } } |