SRD   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 2
dl 0
loc 12
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A rndRun() 0 3 1
1
<?php
2
/**
3
 * (S)elect (R)an(D)om
4
 * User: moyo
5
 * Date: 22/12/2017
6
 * Time: 4:58 PM
7
 */
8
9
namespace Carno\Pool\Wrapper;
10
11
use Carno\Pool\Contracts\Select;
12
use Carno\Pool\Pool;
13
14
trait SRD
15
{
16
    /**
17
     * @deprecated
18
     * @param Pool $pool
19
     * @param string $method
20
     * @param array $arguments
21
     * @return mixed
22
     */
23
    protected function rndRun(Pool $pool, string $method, array $arguments)
24
    {
25
        return yield $pool->select(Select::RANDOM)->$method(...$arguments);
0 ignored issues
show
introduced by
The constant Carno\Pool\Contracts\Select::RANDOM has been deprecated. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-deprecated  annotation

25
        return yield $pool->select(/** @scrutinizer ignore-deprecated */ Select::RANDOM)->$method(...$arguments);
Loading history...
26
    }
27
}
28