Completed
Push — master ( 5cb4e7...58ace1 )
by Milan
02:15
created

Utils::makeRelativePath()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 8
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
dl 0
loc 8
rs 9.4285
c 1
b 0
f 0
cc 2
eloc 4
nc 2
nop 1
1
<?php
2
3
namespace h4kuna\Upload;
4
5
class Utils
6
{
7
	/**
8
	 * @param string|IStoreFile $relativePath
9
	 * @return string
10
	 */
11
	public static function makeRelativePath($relativePath)
12
	{
13
		if ($relativePath instanceof IStoreFile) {
14
			return $relativePath->getRelativePath();
15
		}
16
17
		return $relativePath;
18
	}
19
}