Completed
Push — master ( 761738...0c16ac )
by Dariusz
01:36
created

Converter::kelvinToCelsius()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 1
1
<?php
2
3
namespace Dwr\OpenWeather\Converter;
4
5
class Converter
6
{
7
    public static function kelvinToCelsius($temp)
8
    {
9
        return (int)$temp - 273.15;
10
    }
11
12
    public static function celsiusToKelvin($temp)
13
    {
14
        return (int)$temp + 273.15;
15
    }
16
}