Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
szepeviktor authored Nov 13, 2023
1 parent d9c7803 commit d20ad5c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Navigation/Item.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
use Cone\Root\Traits\HasAttributes;
use Cone\Root\Traits\Makeable;
use Illuminate\Support\Facades\URL;
use LogicException;

class Item
{
Expand Down Expand Up @@ -80,8 +81,8 @@ public function __get(string $key): mixed
return $this->getAttribute($key);
}

public __set(string $key, mixed $value): void
public function __set(string $key, mixed $value): void
{
throw new \LogicException('Attributes cannot be set directly. Please call setAttribute.');
throw new LogicException("Attribute {$key} cannot be set directly. Please call setAttribute.");
}
}

0 comments on commit d20ad5c

Please sign in to comment.