fix some issues

Signed-off-by: Maurice Preuß (envoyr) <hello@envoyr.com>
This commit is contained in:
2025-04-30 04:12:54 +02:00
parent 4b23f6ddbb
commit 235918f0c0
7 changed files with 9 additions and 64 deletions

View File

@@ -2,21 +2,18 @@
namespace Anikeen\Id\Concerns;
use Anikeen\Id\Contracts\Billable;
use Illuminate\Database\Eloquent\Model;
trait HasBillable
{
protected Billable|Model $billable;
public mixed $billable;
public function setBillable(Billable|Model $billable): self
public function setBillable(mixed $billable): self
{
$this->billable = $billable;
return $this;
}
public function getBillable(): Billable|Model
public function getBillable(): mixed
{
return $this->billable;
}

View File

@@ -6,7 +6,7 @@ trait HasParent
{
protected mixed $parent;
public function setParent($parent): self
public function setParent(mixed $parent): self
{
$this->parent = $parent;

View File

@@ -9,7 +9,7 @@ trait MagicProperties
protected function setMagicProperties(stdClass $data): void
{
foreach ($data as $key => $value) {
if (property_exists($this, $key)) {
if (!property_exists($this, $key)) {
$this->{$key} = $value;
}
}