AsSingleScalar   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A modify() 0 4 1
1
<?php
2
3
/**
4
 * This file is part of the Happyr Doctrine Specification package.
5
 *
6
 * (c) Tobias Nyholm <[email protected]>
7
 *     Kacper Gunia <[email protected]>
8
 *     Peter Gribanov <[email protected]>
9
 *
10
 * For the full copyright and license information, please view the LICENSE
11
 * file that was distributed with this source code.
12
 */
13
14
namespace Happyr\DoctrineSpecification\Result;
15
16
use Doctrine\ORM\AbstractQuery;
17
use Doctrine\ORM\Query;
18
19
/**
20
 * Class AsSingleScalar.
21
 */
22
class AsSingleScalar implements ResultModifier
23
{
24
    /**
25
     * @param AbstractQuery $query
26
     */
27
    public function modify(AbstractQuery $query)
28
    {
29
        $query->setHydrationMode(Query::HYDRATE_SINGLE_SCALAR);
30
    }
31
}
32