MediaManager::getPager()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 4
1
<?php
2
3
declare(strict_types=1);
4
5
/*
6
 * This file is part of the Sonata Project package.
7
 *
8
 * (c) Thomas Rabaix <[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 Sonata\MediaBundle\PHPCR;
15
16
use Sonata\Doctrine\Document\BasePHPCRManager;
17
18
/**
19
 * @final since sonata-project/media-bundle 3.21.0
20
 */
21
class MediaManager extends BasePHPCRManager
22
{
23
    public function save($entity, $andFlush = true): void
24
    {
25
        // BC compatibility for $context parameter
26
        if ($andFlush && \is_string($andFlush)) {
27
            $entity->setContext($andFlush);
28
        }
29
30
        // BC compatibility for $providerName parameter
31
        if (3 === \func_num_args()) {
32
            $entity->setProviderName(func_get_arg(2));
33
        }
34
35
        if ($andFlush && \is_bool($andFlush)) {
36
            parent::save($entity, $andFlush);
37
        } else {
38
            // BC compatibility with previous signature
39
            parent::save($entity, true);
40
        }
41
    }
42
43
    public function getPager(array $criteria, $page, $limit = 10, array $sort = []): void
0 ignored issues
show
Unused Code introduced by
The parameter $criteria is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The parameter $page is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The parameter $limit is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The parameter $sort is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
44
    {
45
        throw new \RuntimeException('Not Implemented yet');
46
    }
47
}
48