Completed
Pull Request — master (#4)
by
unknown
09:38 queued 20s
created

TableFactory::getConnection()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 0
1
<?php
2
3
/**
4
 * Copyright (c) 2017. Este código foi feito por @marciioluucas, sob licença MIT
5
 */
6
namespace Phiber\ORM\Factories;
7
8
use Phiber\Link;
9
10
/**
11
 * Classe responsável por ser a fábrica de tabelas
12
 * 
13
 * @package bin
14
 */
15
abstract class TableFactory
16
{
17
    /**
18
     * Dá o create na tabela
19
     * 
20
     * @param $obj
21
     * @return mixed
22
     */
23
    abstract static function create($obj);
0 ignored issues
show
Best Practice introduced by
It is generally recommended to explicitly declare the visibility for methods.

Adding explicit visibility (private, protected, or public) is generally recommend to communicate to other developers how, and from where this method is intended to be used.

Loading history...
24
25
    /**
26
     * Dá o alter na tabela
27
     * 
28
     * @param $obj
29
     * @return mixed
30
     */
31
    abstract static function alter($obj);
0 ignored issues
show
Best Practice introduced by
It is generally recommended to explicitly declare the visibility for methods.

Adding explicit visibility (private, protected, or public) is generally recommend to communicate to other developers how, and from where this method is intended to be used.

Loading history...
32
33
    /**
34
     * Exclui a tabela
35
     * 
36
     * @param $obj
37
     * @return mixed
38
     */
39
    abstract static function drop($obj);
0 ignored issues
show
Best Practice introduced by
It is generally recommended to explicitly declare the visibility for methods.

Adding explicit visibility (private, protected, or public) is generally recommend to communicate to other developers how, and from where this method is intended to be used.

Loading history...
40
41
    /**
42
     * Sincroniza a tabela com o código
43
     * 
44
     * @param $obj
45
     * @return mixed
46
     */
47
    abstract static function sync($obj);
0 ignored issues
show
Best Practice introduced by
It is generally recommended to explicitly declare the visibility for methods.

Adding explicit visibility (private, protected, or public) is generally recommend to communicate to other developers how, and from where this method is intended to be used.

Loading history...
48
49
    /**
50
     * Pega a conexão com o banco
51
     * 
52
     * @return \PDO
53
     */
54
    public function getConnection()
55
    {
56
        $pdo = new Link();
57
       
58
        return $pdo->getConnection();
59
    }
60
}
61