Completed
Push — develop ( 7bc0c1...25f6d3 )
by Oyebanji Jacob
02:07
created
src/DatabaseConnectionStringFactory.php 1 patch
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -22,9 +22,13 @@
 block discarded – undo
22 22
                 break;
23 23
             case 'mysql':
24 24
             case 'postgres':
25
-                if(strcasecmp($driver, 'postgres') == 0) $driver="pgsql";
25
+                if(strcasecmp($driver, 'postgres') == 0) {
26
+                    $driver="pgsql";
27
+                }
26 28
                 $dsn = $driver.':host='.$config['HOSTNAME'].';dbname='.$config['DBNAME'];
27
-                if(isset($config['PORT'])) $dsn .= ';port='.$config['PORT'];
29
+                if(isset($config['PORT'])) {
30
+                    $dsn .= ';port='.$config['PORT'];
31
+                }
28 32
                 break;
29 33
             default:
30 34
                 throw new DatabaseDriverNotSupportedException;
Please login to merge, or discard this patch.
src/Model.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -178,7 +178,7 @@
 block discarded – undo
178 178
     /**
179 179
      * Save the model data to the database.
180 180
      * 
181
-     * @return boolean
181
+     * @return integer
182 182
      */
183 183
     public function save()
184 184
     {
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -137,7 +137,9 @@
 block discarded – undo
137 137
         $bindNameParameters = [];
138 138
         $sqlUpdate = "UPDATE " . $this->getTableName() . " SET " ;
139 139
         foreach ($this->properties as $columnName => $columnValue) {
140
-            if($columnName == 'id') continue;
140
+            if($columnName == 'id') {
141
+                continue;
142
+            }
141 143
             $bindColumnName = ':' . $columnName;
142 144
             $sqlUpdate .= "$columnName = $bindColumnName,";
143 145
             $bindNameParameters[$bindColumnName] = $columnValue;
Please login to merge, or discard this patch.
test/DatabaseConnectionTest.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -73,7 +73,7 @@
 block discarded – undo
73 73
 	 * Reference: https://jtreminio.com/2013/03/unit-testing-tutorial-part-3-testing-protected-private-methods-coverage-reports-and-crap/
74 74
 	* Call protected/private method of a class.
75 75
 	*
76
-	* @param object &$object    Instantiated object that we will run method on.
76
+	* @param object DatabaseConnection    Instantiated object that we will run method on.
77 77
 	* @param string $methodName Method name to call
78 78
 	* @param array  $parameters Array of parameters to pass into method.
79 79
 	*
Please login to merge, or discard this patch.
src/Exception/ModelNotFoundException.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -5,6 +5,9 @@
 block discarded – undo
5 5
 class ModelNotFoundException extends \Exception 
6 6
 {
7 7
 
8
+    /**
9
+     * @param integer $id
10
+     */
8 11
     function __construct($id)
9 12
     {
10 13
         parent::__construct('The requested Model with ' . $id . ' does not exist');
Please login to merge, or discard this patch.