Lines Matching refs:to
51 public static function convert($number, $to): array argument
57 if ($from == $to)
63 if (in_array($to, Constants::LENGTH_UNITS)) {
65 $to_index = array_search($to, Constants::LENGTH_UNITS);
70 return ['number', $result, $to];
76 if (in_array($to, Constants::TIME_UNITS)) {
78 if ($to == 'ms')
83 return ['number', $result, $to];
106 switch ($to) {
122 return ['number', $result, $to];
126 throw new Exception("Cannot convert $from to $to");