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::apply()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 8
c 0
b 0
f 0
rs 9.4285
cc 1
eloc 4
nc 1
nop 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