Total Complexity | 8 |
Total Lines | 80 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
8 | class Sine |
||
9 | { |
||
10 | /** |
||
11 | * SIN. |
||
12 | * |
||
13 | * Returns the result of builtin function sin after validating args. |
||
14 | * |
||
15 | * @param mixed $angle Should be numeric |
||
16 | * |
||
17 | * @return float|string sine |
||
18 | */ |
||
19 | 16 | public static function sin($angle) |
|
20 | { |
||
21 | try { |
||
22 | 16 | $angle = Helpers::validateNumericNullBool($angle); |
|
23 | 1 | } catch (Exception $e) { |
|
24 | 1 | return $e->getMessage(); |
|
25 | } |
||
26 | |||
27 | 15 | return sin($angle); |
|
28 | } |
||
29 | |||
30 | /** |
||
31 | * SINH. |
||
32 | * |
||
33 | * Returns the result of builtin function sinh after validating args. |
||
34 | * |
||
35 | * @param mixed $angle Should be numeric |
||
36 | * |
||
37 | * @return float|string hyperbolic sine |
||
38 | */ |
||
39 | 10 | public static function sinh($angle) |
|
40 | { |
||
41 | try { |
||
42 | 10 | $angle = Helpers::validateNumericNullBool($angle); |
|
43 | 1 | } catch (Exception $e) { |
|
44 | 1 | return $e->getMessage(); |
|
45 | } |
||
46 | |||
47 | 9 | return sinh($angle); |
|
48 | } |
||
49 | |||
50 | /** |
||
51 | * ASIN. |
||
52 | * |
||
53 | * Returns the arcsine of a number. |
||
54 | * |
||
55 | * @param float $number Number |
||
56 | * |
||
57 | * @return float|string The arcsine of the number |
||
58 | */ |
||
59 | 10 | public static function asin($number) |
|
68 | } |
||
69 | |||
70 | /** |
||
71 | * ASINH. |
||
72 | * |
||
73 | * Returns the inverse hyperbolic sine of a number. |
||
74 | * |
||
75 | * @param float $number Number |
||
76 | * |
||
77 | * @return float|string The inverse hyperbolic sine of the number |
||
78 | */ |
||
79 | 11 | public static function asinh($number) |
|
90 |