Completed
Pull Request — master (#23)
by Adeniyi
02:21
created
src/Database/DatabaseQuery.php 2 patches
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,12 +1,12 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * This class handles building sql query statement and check
4
- * that the table exist in the database.
5
- *
6
- * @package Ibonly\PotatoORM\DatabaseQuery
7
- * @author  Ibraheem ADENIYI <[email protected]>
8
- * @license MIT <https://opensource.org/licenses/MIT>
9
- */
3
+     * This class handles building sql query statement and check
4
+     * that the table exist in the database.
5
+     *
6
+     * @package Ibonly\PotatoORM\DatabaseQuery
7
+     * @author  Ibraheem ADENIYI <[email protected]>
8
+     * @license MIT <https://opensource.org/licenses/MIT>
9
+     */
10 10
 
11 11
 namespace Ibonly\PotatoORM;
12 12
 
Please login to merge, or discard this patch.
Doc Comments   +9 added lines, -3 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
      * @param  $tablename
63 63
      * @param  $con
64 64
      *
65
-     * @return bool
65
+     * @return boolean|null
66 66
      */
67 67
     public function checkTableExist($table, $con=NULL)
68 68
     {
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
     /**
78 78
      * checkTableName Return the table name
79 79
      *
80
-     * @param  $tablename
80
+     * @param  string|false $tablename
81 81
      * @param  $con
82 82
      *
83 83
      * @return string
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
      * checkColumn Check if column exist in table
99 99
      *
100 100
      * @param  $tableName
101
-     * @param  $columnName
101
+     * @param  string $columnName
102 102
      * @param  $con
103 103
      *
104 104
      * @return string
@@ -191,6 +191,8 @@  discard block
 block discarded – undo
191 191
     /**
192 192
      * selectAllQuery
193 193
      *
194
+     * @param string $tableName
195
+     * @param string $field
194 196
      * @return string
195 197
      */
196 198
     public static function selectAllQuery($tableName, $field)
@@ -226,6 +228,8 @@  discard block
 block discarded – undo
226 228
     /**
227 229
      * selectQuery
228 230
      *
231
+     * @param string $tableName
232
+     * @param string $connection
229 233
      * @return string
230 234
      */
231 235
     public static function selectQuery($tableName, $data, $condition, $connection)
@@ -253,6 +257,7 @@  discard block
 block discarded – undo
253 257
     /**
254 258
      * insertQuery
255 259
      *
260
+     * @param string $tableName
256 261
      * @return string
257 262
      */
258 263
     public function insertQuery($tableName)
@@ -270,6 +275,7 @@  discard block
 block discarded – undo
270 275
     /**
271 276
      * updateQuery
272 277
      *
278
+     * @param string $tableName
273 279
      * @return string
274 280
      */
275 281
     public function updateQuery($tableName)
Please login to merge, or discard this patch.
src/Exceptions/ColumnNotExistExeption.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,11 +1,11 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Exception for user not found
4
- *
5
- * @package Ibonly\PotatoORM\ColumnNotExistExeption
6
- * @author  Ibraheem ADENIYI <[email protected]>
7
- * @license MIT <https://opensource.org/licenses/MIT>
8
- */
3
+     * Exception for user not found
4
+     *
5
+     * @package Ibonly\PotatoORM\ColumnNotExistExeption
6
+     * @author  Ibraheem ADENIYI <[email protected]>
7
+     * @license MIT <https://opensource.org/licenses/MIT>
8
+     */
9 9
 
10 10
 namespace Ibonly\PotatoORM;
11 11
 
Please login to merge, or discard this patch.
src/Exceptions/ErrorInsertingException.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,11 +1,11 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Exception for user already exist
4
- *
5
- * @package Ibonly\PotatoORM\ErrorInsertingException
6
- * @author  Ibraheem ADENIYI <[email protected]>
7
- * @license MIT <https://opensource.org/licenses/MIT>
8
- */
3
+     * Exception for user already exist
4
+     *
5
+     * @package Ibonly\PotatoORM\ErrorInsertingException
6
+     * @author  Ibraheem ADENIYI <[email protected]>
7
+     * @license MIT <https://opensource.org/licenses/MIT>
8
+     */
9 9
 
10 10
 namespace Ibonly\PotatoORM;
11 11
 
Please login to merge, or discard this patch.
src/Exceptions/InvalidConnectionException.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,11 +1,11 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Exception for user not found
4
- *
5
- * @package Ibonly\PotatoORM\InvalidConnectionException
6
- * @author  Ibraheem ADENIYI <[email protected]>
7
- * @license MIT <https://opensource.org/licenses/MIT>
8
- */
3
+     * Exception for user not found
4
+     *
5
+     * @package Ibonly\PotatoORM\InvalidConnectionException
6
+     * @author  Ibraheem ADENIYI <[email protected]>
7
+     * @license MIT <https://opensource.org/licenses/MIT>
8
+     */
9 9
 
10 10
 namespace Ibonly\PotatoORM;
11 11
 
Please login to merge, or discard this patch.
src/Exceptions/TableDoesNotExistException.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,11 +1,11 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Exception for user not found
4
- *
5
- * @package Ibonly\PotatoORM\TableDoesNotExistException
6
- * @author  Ibraheem ADENIYI <[email protected]>
7
- * @license MIT <https://opensource.org/licenses/MIT>
8
- */
3
+     * Exception for user not found
4
+     *
5
+     * @package Ibonly\PotatoORM\TableDoesNotExistException
6
+     * @author  Ibraheem ADENIYI <[email protected]>
7
+     * @license MIT <https://opensource.org/licenses/MIT>
8
+     */
9 9
 
10 10
 namespace Ibonly\PotatoORM;
11 11
 
Please login to merge, or discard this patch.
src/Helper/Inflector.php 1 patch
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -39,13 +39,13 @@  discard block
 block discarded – undo
39 39
 trait Inflector
40 40
 {
41 41
     /**
42
-    * Pluralizes English nouns.
43
-    *
44
-    * @access public
45
-    * @static
46
-    * @param    string    $word    English noun to pluralize
47
-    * @return string Plural noun
48
-    */
42
+     * Pluralizes English nouns.
43
+     *
44
+     * @access public
45
+     * @static
46
+     * @param    string    $word    English noun to pluralize
47
+     * @return string Plural noun
48
+     */
49 49
     public static function pluralize($word)
50 50
     {
51 51
         $plural = array(
@@ -102,13 +102,13 @@  discard block
 block discarded – undo
102 102
     }
103 103
 
104 104
     /**
105
-    * Singularizes English nouns.
106
-    *
107
-    * @access public
108
-    * @static
109
-    * @param    string    $word    English noun to singularize
110
-    * @return string Singular noun.
111
-    */
105
+     * Singularizes English nouns.
106
+     *
107
+     * @access public
108
+     * @static
109
+     * @param    string    $word    English noun to singularize
110
+     * @return string Singular noun.
111
+     */
112 112
     public function singularize($word)
113 113
     {
114 114
         $singular = array (
Please login to merge, or discard this patch.
src/Helper/Model.php 2 patches
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,11 +1,11 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * PotatoORM manages the persistence of database CRUD operations.
4
- *
5
- * @package Ibonly\PotatoORM\Model
6
- * @author  Ibraheem ADENIYI <[email protected]>
7
- * @license MIT <https://opensource.org/licenses/MIT>
8
- */
3
+     * PotatoORM manages the persistence of database CRUD operations.
4
+     *
5
+     * @package Ibonly\PotatoORM\Model
6
+     * @author  Ibraheem ADENIYI <[email protected]>
7
+     * @license MIT <https://opensource.org/licenses/MIT>
8
+     */
9 9
 
10 10
 namespace Ibonly\PotatoORM;
11 11
 
Please login to merge, or discard this patch.
Doc Comments   +4 added lines, -3 removed lines patch added patch discarded remove patch
@@ -51,6 +51,7 @@  discard block
 block discarded – undo
51 51
     /**
52 52
      * getTableName()
53 53
      *
54
+     * @param string $connection
54 55
      * @return string
55 56
      */
56 57
     public static function getTableName($connection)
@@ -62,7 +63,7 @@  discard block
 block discarded – undo
62 63
      * getALL()
63 64
      * Get all record from the database
64 65
      *
65
-     * @return object
66
+     * @return GetData
66 67
      */
67 68
     public function getALL($dbConnection = NULL)
68 69
     {
@@ -82,7 +83,7 @@  discard block
 block discarded – undo
82 83
      * where($data, $condition)
83 84
      * Get data from database where $data = $condition
84 85
      *
85
-     * @return object
86
+     * @return GetData
86 87
      */
87 88
     public function where($data, $condition = NULL, $dbConnection = NULL)
88 89
     {
@@ -103,7 +104,7 @@  discard block
 block discarded – undo
103 104
      * find($value)
104 105
      * Find data from database where id = $value
105 106
      *
106
-     * @return array
107
+     * @return Model
107 108
      */
108 109
     public static function find($value, $dbConnection = NULL)
109 110
     {
Please login to merge, or discard this patch.
src/Helper/Schema.php 1 patch
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -1,11 +1,11 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * SugarORM\Schema manages the creation of database table.
4
- *
5
- * @package Ibonly\SugarORM\Schema
6
- * @author  Ibraheem ADENIYI <[email protected]>
7
- * @license MIT <https://opensource.org/licenses/MIT>
8
- */
3
+     * SugarORM\Schema manages the creation of database table.
4
+     *
5
+     * @package Ibonly\SugarORM\Schema
6
+     * @author  Ibraheem ADENIYI <[email protected]>
7
+     * @license MIT <https://opensource.org/licenses/MIT>
8
+     */
9 9
 
10 10
 namespace Ibonly\PotatoORM;
11 11
 
@@ -28,10 +28,10 @@  discard block
 block discarded – undo
28 28
     public function field($type, $fieldName, $length=NULL)
29 29
     {
30 30
         if(is_null($length)){
31
-             $this->fieldDescription[] = $type ." ".$fieldName;
31
+                $this->fieldDescription[] = $type ." ".$fieldName;
32 32
         }else
33 33
         {
34
-         $this->fieldDescription[] = $type ." ".$fieldName." ".$length;
34
+            $this->fieldDescription[] = $type ." ".$fieldName." ".$length;
35 35
         }
36 36
 
37 37
     }
Please login to merge, or discard this patch.
src/Interface/GetDataInterface.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,11 +1,11 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Defining Interface for class GetData.
4
- *
5
- * @package Ibonly\PotatoORM\ModelInterface
6
- * @author  Ibraheem ADENIYI <[email protected]>
7
- * @license MIT <https://opensource.org/licenses/MIT>
8
- */
3
+     * Defining Interface for class GetData.
4
+     *
5
+     * @package Ibonly\PotatoORM\ModelInterface
6
+     * @author  Ibraheem ADENIYI <[email protected]>
7
+     * @license MIT <https://opensource.org/licenses/MIT>
8
+     */
9 9
 
10 10
 namespace Ibonly\PotatoORM;
11 11
 
Please login to merge, or discard this patch.