FileTooLargeException::create()   A
last analyzed

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
use Doctrine\DBAL\Schema\Column;
5
6
class FileTooLargeException extends \OutOfRangeException
7
{
8
    public static function create(string $path, Column $column): self
9
    {
10
        return new self(sprintf('File %s is too large. File size: %d. Maximum column size: %d.', $path, \filesize($path), $column->getLength()));
11
    }
12
}
13