SRD::rndRun()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

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