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.
Completed
Push — master ( 295927...ec8326 )
by Carlos
02:26
created

RandomStrategy   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
dl 0
loc 16
c 0
b 0
f 0
wmc 1
lcom 0
cbo 0
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A apply() 0 8 1
1
<?php
2
3
/*
4
 * This file is part of the overtrue/easy-sms.
5
 * (c) overtrue <[email protected]>
6
 * This source file is subject to the MIT license that is bundled
7
 * with this source code in the file LICENSE.
8
 */
9
10
namespace Overtrue\EasySms\Strategies;
11
12
use Overtrue\EasySms\Contracts\StrategyInterface;
13
14
/**
15
 * Class RandomStrategy.
16
 */
17
class RandomStrategy implements StrategyInterface
18
{
19
    /**
20
     * @param array $gateways
21
     *
22
     * @return array
23
     */
24
    public function apply(array $gateways)
25
    {
26
        uasort($gateways, function () {
27
            return mt_rand() - mt_rand();
28
        });
29
30
        return $gateways;
31
    }
32
}
33