Skip to content

Commit c2ce210

Browse files
committed
fixed for sniffer
1 parent e5b53a7 commit c2ce210

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/Utility/AbstractBackupUtility.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,8 @@ abstract class AbstractBackupUtility
6161
public function __get(string $name)
6262
{
6363
if (!property_exists($this, $name)) {
64-
throw new LogicException('Undefined property: ' . get_class($this) . '::$' . $name);
64+
$class = &$this;
65+
throw new LogicException('Undefined property: ' . get_class($class) . '::$' . $name);
6566
}
6667

6768
return $this->$name;

tests/TestCase/Utility/BackupExportAndImportTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ public function testGetMagicMethod(): void
8585
{
8686
$this->assertNull($this->BackupExport->emailRecipient);
8787

88-
$this->expectExceptionMessage('Undefined property: ' . get_class($this->BackupExport) . '::$noExistingProperty');
88+
$this->expectExceptionMessage('Undefined property: ' . BackupExport::class . '::$noExistingProperty');
8989
$this->BackupExport->noExistingProperty;
9090
}
9191

0 commit comments

Comments
 (0)