Passed
Push — main ( 104144...d23e8a )
by Miaad
10:23
created

telegram::sendFile()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 13
Code Lines 12

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 12
c 1
b 0
f 0
nc 1
nop 14
dl 0
loc 13
rs 9.8666

How to fix   Many Parameters   

Many Parameters

Methods with many parameters are not only hard to understand, but their parameters also often become inconsistent when you need more, or different data.

There are several approaches to avoid long parameter lists:

1
<?php
2
3
namespace BPT\telegram;
4
5
/**
6
 * telegram class , Adding normal method call to request class and a simple name for being easy to call
7
 */
8
class telegram extends request {
9
    public function __call (string $name, array $arguments) {
10
        return request::$name(...$arguments);
11
    }
12
}