1 | <?php |
||
28 | class Users extends Mapper |
||
29 | { |
||
30 | use Traits\UrlHelper; |
||
31 | |||
32 | /** |
||
33 | * Fields and their visibility to clients, boolean or string of visible field name |
||
34 | * |
||
35 | * @var array $fieldsVisible |
||
36 | */ |
||
37 | public $fieldsVisible = [ |
||
38 | 'uuid' => 'id', |
||
39 | 'password' => false, |
||
40 | 'scopes' => false, |
||
41 | 'login_count' => false, |
||
42 | ]; |
||
43 | |||
44 | /** |
||
45 | * Fields that are editable to clients, boolean or string of visible field name |
||
46 | * |
||
47 | * @var array $fieldsEditable |
||
48 | */ |
||
49 | public $fieldsEditable = [ |
||
50 | 'email', |
||
51 | 'firstname', |
||
52 | 'lastname', |
||
53 | 'password_question', |
||
54 | 'password_answer', |
||
55 | ]; |
||
56 | |||
57 | /** |
||
58 | * Filter rules for fields |
||
59 | * |
||
60 | * @var array $filterRules |
||
61 | * @link https://github.com/Wixel/GUMP |
||
62 | */ |
||
63 | public $filterRules = [ |
||
64 | 'uuid' => 'trim|sanitize_string|lower', |
||
65 | 'password' => 'trim|sanitize_string', |
||
66 | 'email' => 'trim|sanitize_string|sanitize_email|lower', |
||
67 | 'firstname' => 'trim|sanitize_string', |
||
68 | 'lastname' => 'trim|sanitize_string', |
||
69 | 'scopes' => 'trim|sanitize_string|lower', |
||
70 | 'status' => 'trim|sanitize_string|lower', |
||
71 | 'password_question' => 'trim|sanitize_string', |
||
72 | 'password_answer' => 'trim|sanitize_string', |
||
73 | 'created' => 'trim|sanitize_string', |
||
74 | 'login_count' => 'sanitize_numbers|whole_number', |
||
75 | 'login_last' => 'trim|sanitize_string', |
||
76 | ]; |
||
77 | |||
78 | /** |
||
79 | * Validation rules for fields |
||
80 | * |
||
81 | * @var array $validationRules |
||
82 | * @link https://github.com/Wixel/GUMP |
||
83 | */ |
||
84 | public $validationRules = [ |
||
85 | 'uuid' => 'alpha_dash', |
||
86 | 'email' => 'valid_email', |
||
87 | 'firstname' => 'valid_name', |
||
88 | ]; |
||
89 | |||
90 | /** |
||
91 | * Create if needed, and return the path to the user profile image |
||
92 | * |
||
93 | * @param string $uuid the user uuid |
||
|
|||
94 | * @return string $path to the profile image |
||
95 | */ |
||
96 | public function profileImageFilePath() |
||
105 | |||
106 | /** |
||
107 | * Return the URL path to the image if exists or false |
||
108 | * |
||
109 | * @param string $uuid the user uuid |
||
110 | * @return bool true if the profile image exists |
||
111 | */ |
||
112 | public function profileImageExists() |
||
116 | |||
117 | /** |
||
118 | * Return the URL path to the image if exists or false |
||
119 | * |
||
120 | * @param string $uuid the user uuid |
||
121 | * @return false|string return the url path or false if not exists |
||
122 | */ |
||
123 | public function profileImageUrlPath() |
||
131 | |||
132 | /** |
||
133 | * Create profile image from given file |
||
134 | * |
||
135 | * @param string $file path to file |
||
136 | * @return boolean if the file was written and and asset record created |
||
137 | */ |
||
138 | public function profileImageCreate($file) |
||
183 | } |
||
184 |
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.
Consider the following example. The parameter
$italy
is not defined by the methodfinale(...)
.The most likely cause is that the parameter was removed, but the annotation was not.