Passed
Push — main ( 23165f...4af278 )
by Miaad
01:25
created

telegram   A

Complexity

Total Complexity 6

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 6
eloc 9
dl 0
loc 16
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __callStatic() 0 6 3
A __call() 0 6 3
1
<?php
2
3
namespace BPT\api;
4
5
class telegram {
6
    public function __call (string $name, array $arguments) {
7
        if (!isset($arguments[1]) && is_array($arguments[0])) {
8
            request::$name(...$arguments[0]);
9
        }
10
        else {
11
            request::$name($arguments);
12
        }
13
    }
14
15
    public static function __callStatic (string $name, array $arguments) {
16
        if (!isset($arguments[1]) && is_array($arguments[0])) {
17
            request::$name(...$arguments[0]);
18
        }
19
        else {
20
            request::$name(...$arguments);
21
        }
22
    }
23
}