GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

Time::convertor()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 3
c 0
b 0
f 0
rs 10
cc 1
eloc 2
nc 1
nop 1
1
<?php
2
3
namespace rdx\units;
4
5
use rdx\units\Quantity;
6
7
class Time extends Quantity {
8
9
	// The base unit for the `$units` conversion table
10
	const BASE_UNIT = 's';
11
12
	// New objects will convert to this unit
13
	static public $default_unit = self::BASE_UNIT;
14
15
	// Conversion table for this Quantity
16
	static public $units = array(
17
		'ms' => .001,
18
		's' => 1,
19
		'm' => 60,
20
		'h' => 3600,
21
		'd' => 86400,
22
		'w' => 604800,
23
	);
24
25
	/**
26
	 * The convertor heart, that every sub class needs
27
	 */
28
	protected function convertor( $toUnit ) {
29
		return $this->convertUsingTable($toUnit);
30
	}
31
32
}
33