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.

Volume   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 1
dl 0
loc 23
c 0
b 0
f 0
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A convertor() 0 3 1
1
<?php
2
3
namespace rdx\units;
4
5
use rdx\units\Quantity;
6
7
class Volume extends Quantity {
8
9
	// The base unit for the `$units` conversion table
10
	const BASE_UNIT = 'l'; // liter
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
		'l' => 1, // base
18
		'usg' => 3.78541,
19
		'bg' => 4.54609,
20
	);
21
22
	/**
23
	 * The convertor heart, that every sub class needs
24
	 */
25
	protected function convertor( $toUnit ) {
26
		return $this->convertUsingTable($toUnit);
27
	}
28
29
}
30