BaseCommand::mapToPathname()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
eloc 3
c 1
b 0
f 1
dl 0
loc 5
rs 10
cc 1
nc 1
nop 1
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: Christopher
5
 * Date: 01.03.2018
6
 * Time: 18:51.
7
 */
8
9
namespace Arubacao\AssetCdn\Commands;
10
11
use Illuminate\Console\Command;
12
use Symfony\Component\Finder\SplFileInfo;
13
14
abstract class BaseCommand extends Command
15
{
16
    /**
17
     * @param \Symfony\Component\Finder\SplFileInfo[] $files
18
     * @return array
19
     */
20
    protected function mapToPathname(array $files): array
21
    {
22
        return array_map(function (SplFileInfo $file) {
23
            return $file->getRelativePathname();
24
        }, $files);
25
    }
26
}
27