[Annotations] Methods and variables annotations

pull/8/head
sundowndev 2018-07-12 18:07:53 +02:00
parent 48fc15eceb
commit c19c3a52b2
3 changed files with 21 additions and 1 deletions

View File

@ -2,11 +2,18 @@
namespace App\Service; namespace App\Service;
/**
* Class Database
* @package App\Service
*/
class Database class Database
{ {
private $dotEnvParser; private $dotEnvParser;
private $conn; private $conn;
/**
* Database constructor.
*/
public function __construct() public function __construct()
{ {
$this->dotEnvParser = new DotEnvParser(); $this->dotEnvParser = new DotEnvParser();
@ -29,13 +36,18 @@ class Database
} }
} }
/**
* Get the PDO connection instance
*
* @return \PDO
*/
public function getConnection() public function getConnection()
{ {
return $this->conn; return $this->conn;
} }
/** /**
* gestion des erreurs de retour d'execution de PDO * Handle PDO execution errors
* @param PDOStatement $stmt * @param PDOStatement $stmt
* @return void * @return void
*/ */

View File

@ -4,6 +4,10 @@ namespace App\Service;
use josegonzalez\Dotenv\Loader; use josegonzalez\Dotenv\Loader;
/**
* Class DotEnvParser
* @package App\Service
*/
class DotEnvParser class DotEnvParser
{ {
private $file; private $file;

View File

@ -2,6 +2,10 @@
namespace App\Service; namespace App\Service;
/**
* Class JsonResponse
* @package App\Service
*/
class JsonResponse class JsonResponse
{ {
public function create(int $code, string $message = null, array $data = []) public function create(int $code, string $message = null, array $data = [])