@@ -21,6 +21,7 @@ discard block |
||
| 21 | 21 | |
| 22 | 22 | /** |
| 23 | 23 | * This is a constructor; a default method that will be called automatically during class instantiation |
| 24 | + * @param string|false $modelClassName |
|
| 24 | 25 | */ |
| 25 | 26 | public function __construct($modelClassName) |
| 26 | 27 | { |
@@ -36,6 +37,7 @@ discard block |
||
| 36 | 37 | /** |
| 37 | 38 | * This method create a record and store it in a table row |
| 38 | 39 | * @params associative array, string tablename |
| 40 | + * @param string|false $tableName |
|
| 39 | 41 | * @return boolean true or false |
| 40 | 42 | */ |
| 41 | 43 | 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) |
| 84 | 90 | { |
| 85 | 91 | $counter = 0; |
@@ -122,6 +128,7 @@ discard block |
||
| 122 | 128 | /** |
| 123 | 129 | * This method retrieves record from a table |
| 124 | 130 | * @params int id, string tableName |
| 131 | + * @param string|false $tableName |
|
| 125 | 132 | * @return array |
| 126 | 133 | */ |
| 127 | 134 | public static function read($id, $tableName) |
@@ -156,6 +163,7 @@ discard block |
||
| 156 | 163 | /** |
| 157 | 164 | * This method deletes a record from a table row |
| 158 | 165 | * @params int id, string tableName |
| 166 | + * @param string|false $tableName |
|
| 159 | 167 | * @return boolean true or false |
| 160 | 168 | */ |
| 161 | 169 | public static function delete($id,$tableName,$dbConn = "Null") |
@@ -17,7 +17,7 @@ |
||
| 17 | 17 | private |
| 18 | 18 | $tableFields, |
| 19 | 19 | $dbHelperInstance, |
| 20 | - $dbConnection; |
|
| 20 | + $dbConnection; |
|
| 21 | 21 | |
| 22 | 22 | /** |
| 23 | 23 | * This is a constructor; a default method that will be called automatically during class instantiation |
@@ -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 | { |
@@ -17,11 +17,11 @@ discard block |
||
| 17 | 17 | private |
| 18 | 18 | $databaseName, |
| 19 | 19 | $databaseHost, |
| 20 | - $databaseDriver, |
|
| 21 | - $databaseUsername, |
|
| 22 | - $databasePassword, |
|
| 23 | - $databaseHandle, |
|
| 24 | - $envFileLoader; |
|
| 20 | + $databaseDriver, |
|
| 21 | + $databaseUsername, |
|
| 22 | + $databasePassword, |
|
| 23 | + $databaseHandle, |
|
| 24 | + $envFileLoader; |
|
| 25 | 25 | |
| 26 | 26 | public function __construct() |
| 27 | 27 | { |
@@ -106,7 +106,7 @@ discard block |
||
| 106 | 106 | |
| 107 | 107 | //$dotenv = new Dotenv($_SERVER['DOCUMENT_ROOT']); |
| 108 | 108 | $dotenv = new Dotenv(__DIR__.'/../../'); |
| 109 | - $dotenv->load(); |
|
| 109 | + $dotenv->load(); |
|
| 110 | 110 | } |
| 111 | 111 | |
| 112 | 112 | } |
@@ -1,10 +1,10 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * Created by PhpStorm. |
|
| 4 | - * User: andela |
|
| 5 | - * Date: 2/22/16 |
|
| 6 | - * Time: 9:38 PM |
|
| 7 | - */ |
|
| 3 | + * Created by PhpStorm. |
|
| 4 | + * User: andela |
|
| 5 | + * Date: 2/22/16 |
|
| 6 | + * Time: 9:38 PM |
|
| 7 | + */ |
|
| 8 | 8 | |
| 9 | 9 | namespace Laztopaz\potatoORM; |
| 10 | 10 | |