Failed Conditions
Push — master ( 130b7c...9f9094 )
by Dallas
19:30 queued 14:09
created

RollbackMissingMigrationException::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 4
nc 1
nop 3
dl 0
loc 7
ccs 5
cts 5
cp 1
crap 1
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Umbrellio\RollbackMissingMigrations\Exceptions;
6
7
use Exception;
8
use Illuminate\Support\Collection;
9
use Throwable;
10
11
class RollbackMissingMigrationException extends Exception
12
{
13 1
    public function __construct(Collection $migrations, $code = 0, Throwable $previous = null)
14
    {
15 1
        $title = 'Rollback migrations failed. Migrations which are not rolled back:';
16 1
        $message = $migrations->prepend($title)
17 1
            ->join(PHP_EOL);
18
19 1
        parent::__construct($message, $code, $previous);
20
    }
21
}
22