Skip to content

Commit db706a9

Browse files
author
Marco Cesarato
committed
chore: improve phpdoc
1 parent 6037b90 commit db706a9

File tree

2 files changed

+33
-32
lines changed

2 files changed

+33
-32
lines changed

plugins/custom/example.hooks.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,4 @@ function action_endpoint_example()
3838
// Private
3939
$hooks->add_action('endpoint', 'action_endpoint_example');
4040
// Public
41-
$hooks->add_action('public_endpoint', 'action_endpoint_example');
41+
$hooks->add_action('public_endpoint', 'action_endpoint_example');

plugins/filters.php

Lines changed: 32 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,11 @@ function loader_on_edit_tables($data, $table)
6060
/**
6161
* Add restriction on where conditions for each query.
6262
*
63-
* @param $restriction
64-
* @param $table
65-
* @param $permission
63+
* @param string $restriction
64+
* @param string $table
65+
* @param bool $permission
6666
*
67-
* @return mixed
67+
* @return string
6868
*/
6969
function filter_sql_restriction($restriction, $table, $permission)
7070
{
@@ -74,10 +74,10 @@ function filter_sql_restriction($restriction, $table, $permission)
7474
/**
7575
* Return if can select.
7676
*
77-
* @param $permission
78-
* @param $table
77+
* @param bool $permission
78+
* @param string $table
7979
*
80-
* @return mixed
80+
* @return bool
8181
*/
8282
function filter_can_read($permission, $table)
8383
{
@@ -90,10 +90,10 @@ function filter_can_read($permission, $table)
9090
/**
9191
* Return if can insert.
9292
*
93-
* @param $permission
94-
* @param $table
93+
* @param bool $permission
94+
* @param string $table
9595
*
96-
* @return mixed
96+
* @return bool
9797
*/
9898
function filter_can_write($permission, $table)
9999
{
@@ -106,10 +106,10 @@ function filter_can_write($permission, $table)
106106
/**
107107
* Return if can update.
108108
*
109-
* @param $permission
110-
* @param $table
109+
* @param bool $permission
110+
* @param string $table
111111
*
112-
* @return mixed
112+
* @return bool
113113
*/
114114
function filter_can_edit($permission, $table)
115115
{
@@ -122,10 +122,10 @@ function filter_can_edit($permission, $table)
122122
/**
123123
* Return if can delete.
124124
*
125-
* @param $permission
126-
* @param $table
125+
* @param bool $permission
126+
* @param string $table
127127
*
128-
* @return mixed
128+
* @return bool
129129
*/
130130
function filter_can_delete($permission, $table)
131131
{
@@ -138,10 +138,10 @@ function filter_can_delete($permission, $table)
138138
/**
139139
* On read.
140140
*
141-
* @param $data
142-
* @param $table
141+
* @param object $data
142+
* @param string $table
143143
*
144-
* @return mixed
144+
* @return object
145145
*/
146146
function filter_on_read($data, $table)
147147
{
@@ -154,10 +154,10 @@ function filter_on_read($data, $table)
154154
/**
155155
* On write.
156156
*
157-
* @param $data
158-
* @param $table
157+
* @param object $data
158+
* @param string $table
159159
*
160-
* @return mixed
160+
* @return object
161161
*/
162162
function filter_on_write($data, $table)
163163
{
@@ -168,12 +168,13 @@ function filter_on_write($data, $table)
168168
}
169169

170170
/**
171-
* On write unique key exists.
171+
* On write already exists.
172172
*
173-
* @param $data
174-
* @param $table
173+
* @param bool $pass
174+
* @param object $item
175+
* @param string $table
175176
*
176-
* @return mixed
177+
* @return bool
177178
*/
178179
function filter_on_write_exists($bypass, $item, $table)
179180
{
@@ -183,10 +184,10 @@ function filter_on_write_exists($bypass, $item, $table)
183184
/**
184185
* On edit.
185186
*
186-
* @param $data
187-
* @param $table
187+
* @param object $data
188+
* @param string $table
188189
*
189-
* @return mixed
190+
* @return object
190191
*/
191192
function filter_on_edit($data, $table)
192193
{
@@ -210,12 +211,12 @@ function filter_auth_validate_token($is_valid, $token)
210211
}
211212

212213
/**
213-
* Validate Authentication.
214+
* Validate authentication.
214215
*
215216
* @param bool $is_valid
216217
* @param array $user_row
217218
*
218-
* @return mixed
219+
* @return bool
219220
*/
220221
function filter_auth_validate_user($is_valid, $user_row)
221222
{

0 commit comments

Comments
 (0)