Passed
Push — master ( 9ef119...6b563b )
by Prateek
01:58
created

FileSystem::getFullSourcePath()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 2
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 1
dl 0
loc 2
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Prateekkarki\Laragen\Models;
4
use Symfony\Component\Filesystem\Filesystem as SymphonyFilesystem;
5
6
class FileSystem extends SymphonyFilesystem
7
{
8
	public function clone($src, $dest){
9
		$src = $this->getFullSourcePath($src);
10
11
		$dest = base_path($dest);
12
13
		if (is_dir($src)) {
14
			$this->mirror($src, $dest."/".basename($src));
15
		}else{
16
			$this->copy($src, $dest);
17
		}
18
	}
19
20
	public function getFullSourcePath($path){
21
		return realpath(__DIR__ . "/../resources/" . $path);
22
	}
23
}
24