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

View File

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

View File

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