diff options
author | Daniel <mail@danielkesselberg.de> | 2024-09-15 21:14:03 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-15 21:14:03 +0200 |
commit | 9c76a25b635573418ee034623c5857dd8da83d63 (patch) | |
tree | e981383a79be0d4fe1a5a0cf9c80b0bc2bd0865a | |
parent | 5a8d0a2721141f0edccc04feb21f0d35ab40eca9 (diff) | |
parent | 903484a8844f1849fb29b1c8720a2aed2f1ebfa2 (diff) | |
download | nextcloud-server-9c76a25b635573418ee034623c5857dd8da83d63.tar.gz nextcloud-server-9c76a25b635573418ee034623c5857dd8da83d63.zip |
Merge pull request #48041 from nextcloud/refactor/dirname-to-dir
refactor: migrate dirname to __DIR__ constants
-rw-r--r-- | apps/theming/tests/IconBuilderTest.php | 6 | ||||
-rw-r--r-- | lib/private/TempManager.php | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/apps/theming/tests/IconBuilderTest.php b/apps/theming/tests/IconBuilderTest.php index 81ea8a5ead3..0d8b8c83923 100644 --- a/apps/theming/tests/IconBuilderTest.php +++ b/apps/theming/tests/IconBuilderTest.php @@ -84,7 +84,7 @@ class IconBuilderTest extends TestCase { ->with('global/images') ->willThrowException(new NotFoundException()); - $expectedIcon = new \Imagick(realpath(dirname(__FILE__)). '/data/' . $file); + $expectedIcon = new \Imagick(realpath(__DIR__). '/data/' . $file); $icon = $this->iconBuilder->renderAppIcon($app, 512); $this->assertEquals(true, $icon->valid()); @@ -113,7 +113,7 @@ class IconBuilderTest extends TestCase { ->with('global/images') ->willThrowException(new NotFoundException()); - $expectedIcon = new \Imagick(realpath(dirname(__FILE__)). '/data/' . $file); + $expectedIcon = new \Imagick(realpath(__DIR__). '/data/' . $file); $icon = new \Imagick(); $icon->readImageBlob($this->iconBuilder->getTouchIcon($app)); @@ -146,7 +146,7 @@ class IconBuilderTest extends TestCase { ->with('global/images') ->willThrowException(new NotFoundException()); - $expectedIcon = new \Imagick(realpath(dirname(__FILE__)). '/data/' . $file); + $expectedIcon = new \Imagick(realpath(__DIR__). '/data/' . $file); $actualIcon = $this->iconBuilder->getFavicon($app); $icon = new \Imagick(); diff --git a/lib/private/TempManager.php b/lib/private/TempManager.php index 74b4d6b1f24..f55d722d9d9 100644 --- a/lib/private/TempManager.php +++ b/lib/private/TempManager.php @@ -216,7 +216,7 @@ class TempManager implements ITempManager { } } - $temp = tempnam(dirname(__FILE__), ''); + $temp = tempnam(__DIR__, ''); if (file_exists($temp)) { unlink($temp); return dirname($temp); |