Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

<?php namespace Filament\Tests\Notifications\Fixtures; use Filament\Notifications\Notifi..

Decoded Output download

<?php

namespace Filament\Tests\Notifications\Fixtures;

use Filament\Notifications\Notification;

class CustomNotification extends Notification
{
    protected string $size = 'md';

    public function toArray(): array
    {
        return [
            ...parent::toArray(),
            'size' => $this->getSize(),
        ];
    }

    public static function fromArray(array $data): static
    {
        return parent::fromArray($data)->size($data['size']);
    }

    public function size(string $size): static
    {
        $this->size = $size;

        return $this;
    }

    public function getSize(): string
    {
        return $this->size;
    }
}
 ?>

Did this file decode correctly?

Original Code

<?php

namespace Filament\Tests\Notifications\Fixtures;

use Filament\Notifications\Notification;

class CustomNotification extends Notification
{
    protected string $size = 'md';

    public function toArray(): array
    {
        return [
            ...parent::toArray(),
            'size' => $this->getSize(),
        ];
    }

    public static function fromArray(array $data): static
    {
        return parent::fromArray($data)->size($data['size']);
    }

    public function size(string $size): static
    {
        $this->size = $size;

        return $this;
    }

    public function getSize(): string
    {
        return $this->size;
    }
}

Function Calls

None

Variables

None

Stats

MD5 8aa710f42baea6d9dae4bebcc285dffb
Eval Count 0
Decode Time 120 ms