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\Tables\Table\Concerns; use Closure; use Illuminate\Database\Elo..

Decoded Output download

<?php

namespace Filament\Tables\Table\Concerns;

use Closure;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Arr;

trait HasRecordClasses
{
    /**
     * @var array<string | int, bool | string> | string | Closure | null
     */
    protected array | string | Closure | null $recordClasses = null;

    /**
     * @param  array<string | int, bool | string> | string | Closure | null  $classes
     */
    public function recordClasses(array | string | Closure | null $classes): static
    {
        $this->recordClasses = $classes;

        return $this;
    }

    /**
     * @return array<string | int, bool | string>
     */
    public function getRecordClasses(Model $record): array
    {
        return Arr::wrap($this->evaluate(
            $this->recordClasses,
            namedInjections: [
                'record' => $record,
            ],
            typedInjections: [
                Model::class => $record,
                $record::class => $record,
            ],
        ) ?? []);
    }
}
 ?>

Did this file decode correctly?

Original Code

<?php

namespace Filament\Tables\Table\Concerns;

use Closure;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Arr;

trait HasRecordClasses
{
    /**
     * @var array<string | int, bool | string> | string | Closure | null
     */
    protected array | string | Closure | null $recordClasses = null;

    /**
     * @param  array<string | int, bool | string> | string | Closure | null  $classes
     */
    public function recordClasses(array | string | Closure | null $classes): static
    {
        $this->recordClasses = $classes;

        return $this;
    }

    /**
     * @return array<string | int, bool | string>
     */
    public function getRecordClasses(Model $record): array
    {
        return Arr::wrap($this->evaluate(
            $this->recordClasses,
            namedInjections: [
                'record' => $record,
            ],
            typedInjections: [
                Model::class => $record,
                $record::class => $record,
            ],
        ) ?? []);
    }
}

Function Calls

None

Variables

None

Stats

MD5 e187bf5ccc6a8c7e684704eee895ffa1
Eval Count 0
Decode Time 88 ms