honeybadger-io/honeybadger-php

View on GitHub
src/Concerns/Newable.php

Summary

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

namespace Honeybadger\Concerns;

use ReflectionClass;

trait Newable
{
    /**
     * @return self
     */
    public static function new(): self
    {
        return (new ReflectionClass(static::class))
            ->newInstanceArgs(func_get_args());
    }
}