Passed
Push — 0.7.0 ( 7cf8ff...8cbd21 )
by Alexander
04:15 queued 11s
created

Paths   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 6
c 1
b 0
f 0
dl 0
loc 21
rs 10
wmc 3

1 Method

Rating   Name   Duplication   Size   Complexity  
A getFilePath() 0 11 3
1
<?php 
2
3
/**
4
 * Lenevor Framework
5
 *
6
 * LICENSE
7
 *
8
 * This source file is subject to the new BSD license that is bundled
9
 * with this package in the file license.md.
10
 * It is also available through the world-wide-web at this URL:
11
 * https://lenevor.com/license
12
 * If you did not receive a copy of the license and are unable to
13
 * obtain it through the world-wide-web, please send an email
14
 * to [email protected] so we can send you a copy immediately.
15
 *
16
 * @package     Lenevor
17
 * @subpackage  Base
18
 * @link        https://lenevor.com
19
 * @copyright   Copyright (c) 2019 - 2021 Alexander Campo <[email protected]>
20
 * @license     https://opensource.org/licenses/BSD-3-Clause New BSD license or see https://lenevor.com/license or see /license.md
21
 */
22
23
namespace Syscodes\Dotenv\Store\Contributors;
24
25
/**
26
 * Gets the file path .env
27
 * 
28
 * @author Alexander Campo <[email protected]>
29
 */
30
final class Paths
31
{
32
    /**
33
     * Returns the full path to the file.
34
     * 
35
     * @param  string[]  $path
36
     * @param  string[]  $file
37
     * 
38
     * @return string[]
39
     */
40
    public static function getFilePath(array $paths, array $names)
41
    {
42
        $files = [];
43
44
        foreach ($paths as $path) {
45
            foreach ($names as $name) {
46
                $files[] = rtrim($path, DIRECTORY_SEPARATOR).DIRECTORY_SEPARATOR.$name;
47
            }
48
        }
49
        
50
        return $files;
51
    }
52
}