File "ArrayableNormalizer.php"

Full Path: /var/www/html/back/vendor/spatie/laravel-data/src/Normalizers/ArrayableNormalizer.php
File size: 326 bytes
MIME-type: text/x-php
Charset: utf-8

<?php

namespace Spatie\LaravelData\Normalizers;

use Illuminate\Contracts\Support\Arrayable;

class ArrayableNormalizer implements Normalizer
{
    public function normalize(mixed $value): ?array
    {
        if (! $value instanceof Arrayable) {
            return null;
        }

        return $value->toArray();
    }
}