| 1 | <?php  | 
            ||
| 13 | class MySQL implements DataBase { | 
            ||
| 14 | |||
| 15 | /** @var \static */  | 
            ||
| 16 | static private $instance;  | 
            ||
| 17 | |||
| 18 | /** @var \PDO */  | 
            ||
| 19 | protected $pdo;  | 
            ||
| 20 | |||
| 21 | 	public function getPDO() { | 
            ||
| 24 | |||
| 25 | /**  | 
            ||
| 26 | * @return static  | 
            ||
| 27 | */  | 
            ||
| 28 | 	static function instance() { | 
            ||
| 31 | |||
| 32 | /**  | 
            ||
| 33 | * Cria uma conexão com um banco de dados  | 
            ||
| 34 | * @param string[] $dbConfig  | 
            ||
| 35 | */  | 
            ||
| 36 | 	public function __construct($dbConfig) { | 
            ||
| 45 | |||
| 46 | 	private function validateConnection() { | 
            ||
| 53 | |||
| 54 | }  | 
            ||
| 55 | 
Adding explicit visibility (
private,protected, orpublic) is generally recommend to communicate to other developers how, and from where this method is intended to be used.