@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -spl_autoload_register(function ($class) { |
|
3 | +spl_autoload_register(function($class) { |
|
4 | 4 | if (strpos($class, 'SimpleCrud\\') !== 0) { |
5 | 5 | return; |
6 | 6 | } |
@@ -116,7 +116,7 @@ |
||
116 | 116 | * |
117 | 117 | * @param array $data |
118 | 118 | * |
119 | - * @return Row |
|
119 | + * @return \SimpleCrud\Row |
|
120 | 120 | */ |
121 | 121 | public function createRow(array $data) |
122 | 122 | { |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | $total = $this->table->getDatabase()->execute('SELECT FOUND_ROWS()')->fetch(); |
108 | 108 | $total = (int) $total[0]; |
109 | 109 | |
110 | - $result->setMethod('getTotal', function () use ($total) { |
|
110 | + $result->setMethod('getTotal', function() use ($total) { |
|
111 | 111 | return $total; |
112 | 112 | }); |
113 | 113 | } |
@@ -121,15 +121,15 @@ discard block |
||
121 | 121 | $next = $result->count() < $this->limit ? null : $current + 1; |
122 | 122 | $prev = $current > 1 ? $current - 1 : null; |
123 | 123 | |
124 | - $result->setMethod('getPage', function () use ($current) { |
|
124 | + $result->setMethod('getPage', function() use ($current) { |
|
125 | 125 | return $current; |
126 | 126 | }); |
127 | 127 | |
128 | - $result->setMethod('getNextPage', function () use ($next) { |
|
128 | + $result->setMethod('getNextPage', function() use ($next) { |
|
129 | 129 | return $next; |
130 | 130 | }); |
131 | 131 | |
132 | - $result->setMethod('getPrevPage', function () use ($prev) { |
|
132 | + $result->setMethod('getPrevPage', function() use ($prev) { |
|
133 | 133 | return $prev; |
134 | 134 | }); |
135 | 135 | } |
@@ -42,7 +42,7 @@ |
||
42 | 42 | /** |
43 | 43 | * Converts the data to be used |
44 | 44 | * |
45 | - * @param mixed $data |
|
45 | + * @param string $data |
|
46 | 46 | * |
47 | 47 | * @return mixed |
48 | 48 | */ |
@@ -3,7 +3,6 @@ |
||
3 | 3 | namespace SimpleCrud\Queries\Mysql; |
4 | 4 | |
5 | 5 | use SimpleCrud\Queries\Query; |
6 | -use SimpleCrud\Table; |
|
7 | 6 | |
8 | 7 | /** |
9 | 8 | * Manages a database select count query. |
@@ -17,7 +17,7 @@ |
||
17 | 17 | /** |
18 | 18 | * Run the query and return the value. |
19 | 19 | * |
20 | - * @return int |
|
20 | + * @return double |
|
21 | 21 | */ |
22 | 22 | public function run() |
23 | 23 | { |
@@ -3,7 +3,6 @@ |
||
3 | 3 | namespace SimpleCrud\Queries\Mysql; |
4 | 4 | |
5 | 5 | use SimpleCrud\Queries\Query; |
6 | -use SimpleCrud\Table; |
|
7 | 6 | |
8 | 7 | |
9 | 8 | /** |