Completed
Push — master ( 3dab41...181b76 )
by Peter
06:26
created

src/Query/Offset.php (2 issues)

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

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\Query;
15
16
use Doctrine\ORM\QueryBuilder;
17
18
class Offset implements QueryModifier
19
{
20
    /**
21
     * @deprecated This property will be marked as private in 2.0.
22
     *
23
     * @var int offset
24
     */
25
    protected $offset;
26
27
    /**
28
     * @param int $offset
29
     */
30
    public function __construct($offset)
31
    {
32
        $this->offset = $offset;
0 ignored issues
show
Deprecated Code introduced by
The property Happyr\DoctrineSpecification\Query\Offset::$offset has been deprecated with message: This property will be marked as private in 2.0.

This property has been deprecated. The supplier of the class has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the property will be removed from the class and what other property to use instead.

Loading history...
33
    }
34
35
    /**
36
     * @param QueryBuilder $qb
37
     * @param string       $dqlAlias
38
     */
39
    public function modify(QueryBuilder $qb, $dqlAlias)
40
    {
41
        $qb->setFirstResult($this->offset);
0 ignored issues
show
Deprecated Code introduced by
The property Happyr\DoctrineSpecification\Query\Offset::$offset has been deprecated with message: This property will be marked as private in 2.0.

This property has been deprecated. The supplier of the class has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the property will be removed from the class and what other property to use instead.

Loading history...
42
    }
43
}
44