Passed
Push — master ( 4a330a...eee8c5 )
by Jesús
03:02
created

OrderByRandom   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 9
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A apply() 0 3 1
1
<?php
2
3
namespace OkayBueno\Repositories\Criteria\Eloquent;
4
5
use OkayBueno\Repositories\Criteria\CriteriaInterface;
6
7
/**
8
 * Class OrderByRandom
9
 * @package OkayBueno\Repositories\Criteria\Eloquent
10
 */
11
class OrderByRandom implements CriteriaInterface
12
{
13
    /**
14
     * @param mixed $queryBuilder
15
     * @return mixed
16
     */
17
    public function apply( $queryBuilder )
18
    {
19
        return $queryBuilder->inRandomOrder();
20
    }
21
22
}
23