NoDriverManager   A
last analyzed

Complexity

Total Complexity 10

Size/Duplication

Total Lines 67
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

10 Methods

Rating   Name   Duplication   Size   Complexity  
A getClass() 0 4 1
A findAll() 0 4 1
A findBy() 0 4 1
A findOneBy() 0 4 1
A find() 0 4 1
A create() 0 4 1
A save() 0 4 1
A delete() 0 4 1
A getTableName() 0 4 1
A getConnection() 0 4 1
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\NewsBundle\Model;
15
16
use Sonata\Doctrine\Model\ManagerInterface;
17
use Sonata\NewsBundle\Exception\NoDriverException;
18
19
/**
20
 * @internal
21
 *
22
 * @author Christian Gripp <[email protected]>
23
 */
24
final class NoDriverManager implements ManagerInterface
25
{
26
    public function getClass()
27
    {
28
        throw new NoDriverException();
29
    }
30
31
    public function findAll()
32
    {
33
        throw new NoDriverException();
34
    }
35
36
    /**
37
     * @param int|null $limit
38
     * @param int|null $offset
39
     */
40
    public function findBy(array $criteria, ?array $orderBy = null, $limit = null, $offset = null)
41
    {
42
        throw new NoDriverException();
43
    }
44
45
    public function findOneBy(array $criteria, ?array $orderBy = null)
46
    {
47
        throw new NoDriverException();
48
    }
49
50
    /**
51
     * @param mixed $id
52
     */
53
    public function find($id)
54
    {
55
        throw new NoDriverException();
56
    }
57
58
    public function create()
59
    {
60
        throw new NoDriverException();
61
    }
62
63
    /**
64
     * @param object $entity
65
     * @param bool   $andFlush
66
     */
67
    public function save($entity, $andFlush = true)
68
    {
69
        throw new NoDriverException();
70
    }
71
72
    /**
73
     * @param object $entity
74
     * @param bool   $andFlush
75
     */
76
    public function delete($entity, $andFlush = true)
77
    {
78
        throw new NoDriverException();
79
    }
80
81
    public function getTableName()
82
    {
83
        throw new NoDriverException();
84
    }
85
86
    public function getConnection()
87
    {
88
        throw new NoDriverException();
89
    }
90
}
91