PHP 8.2.30
Preview: SolutionTransformer.php Size: 900 B
/proc/thread-self/root/home/byroehnu/easetack.com/vendor/spatie/error-solutions/src/Solutions/SolutionTransformer.php

<?php

namespace Spatie\ErrorSolutions\Solutions;

use Illuminate\Contracts\Support\Arrayable;
use Spatie\ErrorSolutions\Contracts\Solution;

/** @implements Arrayable<string, array<string,string>|string|false> */
class SolutionTransformer implements Arrayable
{
    protected Solution $solution;

    public function __construct(Solution $solution)
    {
        $this->solution = $solution;
    }

    /** @return array<string, array<string,string>|string|false> */
    public function toArray(): array
    {
        return [
            'class' => get_class($this->solution),
            'title' => $this->solution->getSolutionTitle(),
            'links' => $this->solution->getDocumentationLinks(),
            'description' => $this->solution->getSolutionDescription(),
            'is_runnable' => false,
            'ai_generated' => $this->solution->aiGenerated ?? false,
        ];
    }
}

Directory Contents

Dirs: 3 × Files: 3

Name Size Perms Modified Actions
Concerns DIR
- drwxrwxrwx 2025-05-16 16:14:51
Edit Download
Laravel DIR
- drwxrwxrwx 2025-05-16 16:14:51
Edit Download
OpenAi DIR
- drwxrwxrwx 2025-05-16 16:14:51
Edit Download
900 B lrw-rw-rw- 2025-02-14 12:29:50
Edit Download
1001 B lrw-rw-rw- 2025-02-14 12:29:50
Edit Download
712 B lrw-rw-rw- 2025-02-14 12:29:50
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).