| @@ -119,7 +119,7 @@ discard block | ||
| 119 | 119 | /** | 
| 120 | 120 | * This method find a record by id | 
| 121 | 121 | * @params int id | 
| 122 | - * @return Object | |
| 122 | + * @return BaseClass | |
| 123 | 123 | * @throws NoArgumentPassedToFunctionException | 
| 124 | 124 | */ | 
| 125 | 125 | public static function find($id) | 
| @@ -171,7 +171,7 @@ discard block | ||
| 171 | 171 | /** | 
| 172 | 172 | * This method return the current class name | 
| 173 | 173 | * $params void | 
| 174 | - * @return classname | |
| 174 | + * @return string|false | |
| 175 | 175 | */ | 
| 176 | 176 | public static function getClassName() | 
| 177 | 177 |  	{ | 
| @@ -22,6 +22,7 @@ discard block | ||
| 22 | 22 | |
| 23 | 23 | /** | 
| 24 | 24 | * This is a constructor; a default method that will be called automatically during class instantiation | 
| 25 | + * @param string|false $modelClassName | |
| 25 | 26 | */ | 
| 26 | 27 | public function __construct($modelClassName) | 
| 27 | 28 |  	{ | 
| @@ -37,6 +38,7 @@ discard block | ||
| 37 | 38 | /** | 
| 38 | 39 | * This method create a record and store it in a table row | 
| 39 | 40 | * @params associative array, string tablename | 
| 41 | + * @param string|false $tableName | |
| 40 | 42 | * @return boolean true or false | 
| 41 | 43 | */ | 
| 42 | 44 | public function create($associative1DArray, $tableName, $dbConn = Null) | 
| @@ -80,6 +82,10 @@ discard block | ||
| 80 | 82 | * @params: $updateParams, $tableName, $associative1DArray | 
| 81 | 83 | * @return boolean true or false | 
| 82 | 84 | */ | 
| 85 | + | |
| 86 | + /** | |
| 87 | + * @param string|false $tableName | |
| 88 | + */ | |
| 83 | 89 | public function update(array $updateParams, $tableName, $associative1DArray, $dbConn = Null) | 
| 84 | 90 |  	{ | 
| 85 | 91 | $counter = 0; | 
| @@ -124,6 +130,7 @@ discard block | ||
| 124 | 130 | /** | 
| 125 | 131 | * This method retrieves record from a table | 
| 126 | 132 | * @params int id, string tableName | 
| 133 | + * @param string|false $tableName | |
| 127 | 134 | * @return array | 
| 128 | 135 | */ | 
| 129 | 136 | public static function read($id, $tableName, $dbConn = Null) | 
| @@ -162,6 +169,7 @@ discard block | ||
| 162 | 169 | /** | 
| 163 | 170 | * This method deletes a record from a table row | 
| 164 | 171 | * @params int id, string tableName | 
| 172 | + * @param string|false $tableName | |
| 165 | 173 | * @return boolean true or false | 
| 166 | 174 | */ | 
| 167 | 175 | public static function delete($id, $tableName, $dbConn = Null) | 
| @@ -204,7 +212,7 @@ discard block | ||
| 204 | 212 | |
| 205 | 213 | /** | 
| 206 | 214 | * This method returns sql query | 
| 207 | - * @param $sql | |
| 215 | + * @param string $sql | |
| 208 | 216 | * @return string | 
| 209 | 217 | */ | 
| 210 | 218 | private function prepareUpdateQuery($sql) | 
| @@ -15,9 +15,9 @@ discard block | ||
| 15 | 15 | class DatabaseConnection extends \PDO | 
| 16 | 16 |  { | 
| 17 | 17 | private $databaseName; | 
| 18 | - private $databaseHost; | |
| 18 | + private $databaseHost; | |
| 19 | 19 | private $databaseDriver; | 
| 20 | - private $databaseUsername; | |
| 20 | + private $databaseUsername; | |
| 21 | 21 | private $databasePassword; | 
| 22 | 22 | private $databaseHandle; | 
| 23 | 23 | |
| @@ -104,7 +104,7 @@ discard block | ||
| 104 | 104 | |
| 105 | 105 | //$dotenv = new Dotenv($_SERVER['DOCUMENT_ROOT']); | 
| 106 | 106 | $dotenv = new Dotenv(__DIR__.'/../../'); | 
| 107 | - $dotenv->load(); | |
| 107 | + $dotenv->load(); | |
| 108 | 108 | } | 
| 109 | 109 | |
| 110 | 110 | } |