Test Failed
Branch master (e9d41f)
by Jean-Christophe
15:30
created

SqliteDriverMetas   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 4
eloc 1
c 2
b 0
f 0
dl 0
loc 15
rs 10

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getPrimaryKeys() 0 1 1
A getFieldsInfos() 0 1 1
A getForeignKeys() 0 1 1
A getTablesName() 0 1 1
1
<?php
2
3
namespace Ubiquity\db\providers\pdo\drivers;
4
5
/**
6
 * Ubiquity\db\providers\pdo\drivers$SqliteDriverMetas
7
 * This class is part of Ubiquity
8
 *
9
 * @author
10
 * @version 1.0.0
11
 *
12
 */
13
class SqliteDriverMetas extends AbstractDriverMetaDatas {
14
15
	public function getForeignKeys($tableName, $pkName, $dbName = null): array {
16
		// TODO
17
	}
0 ignored issues
show
Bug Best Practice introduced by
In this branch, the function will implicitly return null which is incompatible with the type-hinted return array. Consider adding a return statement or allowing null as return value.

For hinted functions/methods where all return statements with the correct type are only reachable via conditions, ?null? gets implicitly returned which may be incompatible with the hinted type. Let?s take a look at an example:

interface ReturnsInt {
    public function returnsIntHinted(): int;
}

class MyClass implements ReturnsInt {
    public function returnsIntHinted(): int
    {
        if (foo()) {
            return 123;
        }
        // here: null is implicitly returned
    }
}
Loading history...
18
19
	public function getTablesName(): array {
20
		// TODO
21
	}
0 ignored issues
show
Bug Best Practice introduced by
In this branch, the function will implicitly return null which is incompatible with the type-hinted return array. Consider adding a return statement or allowing null as return value.

For hinted functions/methods where all return statements with the correct type are only reachable via conditions, ?null? gets implicitly returned which may be incompatible with the hinted type. Let?s take a look at an example:

interface ReturnsInt {
    public function returnsIntHinted(): int;
}

class MyClass implements ReturnsInt {
    public function returnsIntHinted(): int
    {
        if (foo()) {
            return 123;
        }
        // here: null is implicitly returned
    }
}
Loading history...
22
23
	public function getPrimaryKeys($tableName): array {
24
		// TODO
25
	}
0 ignored issues
show
Bug Best Practice introduced by
In this branch, the function will implicitly return null which is incompatible with the type-hinted return array. Consider adding a return statement or allowing null as return value.

For hinted functions/methods where all return statements with the correct type are only reachable via conditions, ?null? gets implicitly returned which may be incompatible with the hinted type. Let?s take a look at an example:

interface ReturnsInt {
    public function returnsIntHinted(): int;
}

class MyClass implements ReturnsInt {
    public function returnsIntHinted(): int
    {
        if (foo()) {
            return 123;
        }
        // here: null is implicitly returned
    }
}
Loading history...
26
27
	public function getFieldsInfos($tableName): array {
28
		// TODO
29
	}
0 ignored issues
show
Bug Best Practice introduced by
In this branch, the function will implicitly return null which is incompatible with the type-hinted return array. Consider adding a return statement or allowing null as return value.

For hinted functions/methods where all return statements with the correct type are only reachable via conditions, ?null? gets implicitly returned which may be incompatible with the hinted type. Let?s take a look at an example:

interface ReturnsInt {
    public function returnsIntHinted(): int;
}

class MyClass implements ReturnsInt {
    public function returnsIntHinted(): int
    {
        if (foo()) {
            return 123;
        }
        // here: null is implicitly returned
    }
}
Loading history...
30
}
31
32