Completed
Push — master ( ff7982...cbd48b )
by Gregory
01:39
created

Utils::ls_l()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 8
ccs 0
cts 8
cp 0
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 6
nc 1
nop 1
crap 2
1
<?php
2
namespace Tivnet\Console;
3
4
/**
5
 * Class Utils
6
 */
7
class Utils {
8
9
	/**
10
	 * Resembles `ls -l`.
11
	 *
12
	 * @param string $file_path Full path to the file.
13
	 *
14
	 * @return string File info.
15
	 */
16
	public static function ls_l( $file_path ) {
1 ignored issue
show
Coding Style introduced by
Method name "Utils::ls_l" is not in camel caps format
Loading history...
17
		$file_path = str_replace( '\\', '/', $file_path );
18
		return implode( ' ', array(
19
			$file_path,
20
			filesize( $file_path ),
21
			date( 'Y-m-d H:i', filemtime( $file_path ) ),
22
		) );
23
	}
24
}
25