Astrotomic/laravel-backuplay

View on GitHub
src/Backuplay/Exceptions/Handler.php

Summary

Maintainability
A
0 mins
Test Coverage
<?php

namespace Astrotomic\Backuplay\Exceptions;

use Astrotomic\Backuplay\Contracts\ConfigContract;

class Handler
{
    /**
     * @param \Exception $exception
     * @param bool|null $strict
     * @throws \Exception
     * @return \Exception
     */
    public static function handle(\Exception $exception, $strict = null)
    {
        if (app(ConfigContract::class)->isStrict($strict)) {
            throw $exception;
        }

        return $exception;
    }
}