Completed
Push — master ( 33ff9f...a074ca )
by Kevin
12:19 queued 09:07
created

FileTooLargeException::create()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 2
1
<?php
2
namespace DBFaker\Exceptions;
3
4
5
use Doctrine\DBAL\Schema\Column;
6
7
class FileTooLargeException extends \OutOfRangeException
8
{
9
    public static function create(string $path, Column $column): self
10
    {
11
        return new self(sprintf('File %s is too large. File size: %d. Maximum column size: %d.', $path, \filesize($path), $column->getLength()));
12
    }
13
14
}