EscolaLMS/Courses

View on GitHub
src/ValueObjects/ValueObject.php

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
<?php

namespace EscolaLms\Courses\ValueObjects;

abstract class ValueObject
{
    /**
     * @return static
     */
    public static function make(...$args): ValueObject
    {
        $app = app(static::class);
        $app->build(...$args);
        return $app;
    }

    abstract public function toArray(): array;
}