AbstractFormatterStub   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 4
dl 0
loc 16
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
1
<?php
2
declare(strict_types=1);
3
4
namespace tkanstantsin\fileupload\stub\formatter;
5
6
use League\Flysystem\FilesystemInterface;
7
use tkanstantsin\fileupload\formatter\File;
8
use tkanstantsin\fileupload\model\IFile;
9
10
/**
11
 * Class AbstractFormatterStub
12
 */
13
class AbstractFormatterStub extends File
14
{
15
    /**
16
     * FileProcessor constructor.
17
     * @param IFile $file
18
     * @param FilesystemInterface $filesystem
19
     * @param array $config
20
     * @throws \tkanstantsin\fileupload\config\InvalidConfigException
21
     * @throws \ReflectionException
22
     */
23
    public function __construct(IFile $file, FilesystemInterface $filesystem, array $config = [])
24
    {
25
        $config['name'] = $config['name'] ?? (new \ReflectionClass($this))->getShortName();
26
        $config['path'] = $config['path'] ?? $config['name'];
27
28
        parent::__construct($file, $filesystem, $config);
29
    }
30
}