Utils   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
c 1
b 0
f 0
lcom 0
cbo 0
dl 0
loc 18
ccs 0
cts 8
cp 0
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A ls_l() 0 8 1
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 ) {
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