Filesystem   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 7
Bugs 1 Features 1
Metric Value
wmc 1
c 7
b 1
f 1
lcom 0
cbo 1
dl 0
loc 18
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A copy() 0 6 1
1
<?php
2
/*
3
 * This file is part of JoliCi.
4
 *
5
 * (c) Joel Wurtz <[email protected]>
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 */
10
11
namespace Joli\JoliCi\Filesystem;
12
13
use Symfony\Component\Filesystem\Filesystem as BaseFilesystem;
14
15
class Filesystem extends BaseFilesystem
16
{
17
    /**
18
     * Add keeping same permissions as origin file
19
     *
20
     * @see \Symfony\Component\Filesystem\Filesystem::copy()
21
     *
22
     * @param string  $originFile
23
     * @param string  $targetFile
24
     * @param Boolean $override
25
     */
26
    public function copy($originFile, $targetFile, $override = false)
27
    {
28
        parent::copy($originFile, $targetFile, $override);
29
30
        $this->chmod($targetFile, fileperms($originFile));
31
    }
32
}
33