GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

GatewayFactory::create()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 21
Code Lines 18

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 21
rs 9.3142
c 0
b 0
f 0
cc 1
eloc 18
nc 1
nop 8

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
/**
4
 * This file is a part of the Yoqut package.
5
 *
6
 * (c) Sukhrob Khakimov <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that is distributed with this source code.
10
 */
11
12
namespace Yoqut\Component\Sms\Factory;
13
14
use Yoqut\Component\Sms\Model\Gateway;
15
16
/**
17
 * The default gateway factory implementation
18
 *
19
 * @author Sukhrob Khakimov <[email protected]>
20
 */
21
class GatewayFactory implements GatewayFactoryInterface
22
{
23
    /**
24
     * {@inheritDoc}
25
     */
26
    public static function create(
27
        $host,
28
        $port,
29
        $interfaceVersion,
30
        $username,
31
        $password,
32
        array $serviceNumbers = array(),
33
        array $prefixCodes = array(),
34
        array $configs = array()
35
    ) {
36
        return new Gateway(
37
            $host,
38
            $port,
39
            $interfaceVersion,
40
            $username,
41
            $password,
42
            $serviceNumbers,
43
            $prefixCodes,
44
            $configs
45
        );
46
    }
47
}
48