Passed
Branch develop (080a54)
by Elisha-Wigwe Chijioke
06:14
created
src/PotatoQuery.php 1 patch
Doc Comments   +26 added lines patch added patch discarded remove patch
@@ -19,6 +19,9 @@  discard block
 block discarded – undo
19 19
         $this->connection = $connector->setConnection();
20 20
     }
21 21
 
22
+    /**
23
+     * @param string $table
24
+     */
22 25
     public function getFrom($table, $columns = '*')
23 26
     {
24 27
         $sql = "SELECT $columns FROM $table";
@@ -35,6 +38,10 @@  discard block
 block discarded – undo
35 38
         return $result;
36 39
     }
37 40
 
41
+    /**
42
+     * @param string $table
43
+     * @param integer $id
44
+     */
38 45
     public function getOne($table, $id)
39 46
     {
40 47
         $sql = "SELECT * FROM $table WHERE id = :id ";
@@ -69,6 +76,9 @@  discard block
 block discarded – undo
69 76
         // return $this->getOne($table, self::$connection->lastInsertId());
70 77
     }
71 78
 
79
+    /**
80
+     * @param \PDOStatement $statement
81
+     */
72 82
     public function tryExecuting($statement)
73 83
     {
74 84
         try {
@@ -81,6 +91,9 @@  discard block
 block discarded – undo
81 91
         return $execution;
82 92
     }
83 93
 
94
+    /**
95
+     * @param string $message
96
+     */
84 97
     public function throwFaultyExecutionException($message)
85 98
     {
86 99
         throw new FaultyExecutionException($message);
@@ -91,6 +104,9 @@  discard block
 block discarded – undo
91 104
         return '('.implode(', ', array_keys($data)).')';
92 105
     }
93 106
 
107
+    /**
108
+     * @param \PDOStatement $statement
109
+     */
94 110
     public function setBindForInsert($statement, $values)
95 111
     {
96 112
         $count = count($values);
@@ -99,6 +115,10 @@  discard block
 block discarded – undo
99 115
         }
100 116
     }
101 117
 
118
+    /**
119
+     * @param string $table
120
+     * @param integer $id
121
+     */
102 122
     public function deleteFrom($table, $id)
103 123
     {
104 124
         $sql = "DELETE FROM $table WHERE id = :id ";
@@ -129,6 +149,9 @@  discard block
 block discarded – undo
129 149
         return $execution;
130 150
     }
131 151
 
152
+    /**
153
+     * @param \PDOStatement $statement
154
+     */
132 155
     public function setBindForUpdate($statement, array $data)
133 156
     {
134 157
         $count = count($data);
@@ -149,6 +172,9 @@  discard block
 block discarded – undo
149 172
         return $upd = trim($upd, ', ');
150 173
     }
151 174
 
175
+    /**
176
+     * @param integer $count
177
+     */
152 178
     public function putQuesMarks($count)
153 179
     {
154 180
         $str = '';
Please login to merge, or discard this patch.