Passed
Push — main ( e0d381...c6e32b )
by Pranjal
02:29
created

Managers::tableManager()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 1 Features 0
Metric Value
cc 1
eloc 1
c 1
b 1
f 0
nc 1
nop 0
dl 0
loc 3
rs 10
1
<?php 
2
declare(strict_types=1);
3
4
namespace Scrawler\Arca;
5
use \Doctrine\DBAL\Connection;
0 ignored issues
show
Bug introduced by
The type \Doctrine\DBAL\Connection was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
6
use Scrawler\Arca\Manager\ModelManager;
7
use Scrawler\Arca\Manager\RecordManager;
8
use Scrawler\Arca\Manager\TableManager;
9
10
11
class Managers{
12
    private static TableManager $tableManager;
13
    private static RecordManager $recordManager;
14
15
    private static ModelManager $modelManager;
16
17
    private function __construct()
18
    {
19
        
20
    }
21
22
    public static function create(Connection $connection, bool $isUsingUUID = false){
23
        self::$tableManager = new TableManager($connection,$isUsingUUID);
24
        self::$recordManager = new RecordManager($connection,$isUsingUUID);
25
        self::$modelManager = new ModelManager();
26
    }
27
28
    public static function tableManager(): TableManager
29
    {
30
        return self::$tableManager;
31
    }
32
33
    public static function recordManager() : RecordManager
34
    {
35
        return self::$recordManager;
36
    }
37
38
    public static function modelManager() : ModelManager
39
    {
40
        return self::$modelManager;
41
    }
42
}