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

Converter   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 2
c 1
b 0
f 1
lcom 0
cbo 0
dl 0
loc 12
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A kelvinToCelsius() 0 4 1
A celsiusToKelvin() 0 4 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
}