Skip to content

Commit

Permalink
fixed for sniffer
Browse files Browse the repository at this point in the history
  • Loading branch information
mirko-pagliai committed Jun 6, 2023
1 parent e5b53a7 commit c2ce210
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/Utility/AbstractBackupUtility.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ abstract class AbstractBackupUtility
public function __get(string $name)
{
if (!property_exists($this, $name)) {
throw new LogicException('Undefined property: ' . get_class($this) . '::$' . $name);
$class = &$this;
throw new LogicException('Undefined property: ' . get_class($class) . '::$' . $name);
}

return $this->$name;
Expand Down
2 changes: 1 addition & 1 deletion tests/TestCase/Utility/BackupExportAndImportTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public function testGetMagicMethod(): void
{
$this->assertNull($this->BackupExport->emailRecipient);

$this->expectExceptionMessage('Undefined property: ' . get_class($this->BackupExport) . '::$noExistingProperty');
$this->expectExceptionMessage('Undefined property: ' . BackupExport::class . '::$noExistingProperty');
$this->BackupExport->noExistingProperty;
}

Expand Down

0 comments on commit c2ce210

Please sign in to comment.