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 | protected $profileImageFileName = 'profile.png'; |
||
91 | |||
92 | /** |
||
93 | * Return the URL path to the image if exists or false |
||
94 | * |
||
95 | * @param null|string $uuid the user uuid |
||
|
|||
96 | * @return string return the url path or false if not exists |
||
97 | */ |
||
98 | public function profileImageUrlPath($filename = null): string |
||
106 | |||
107 | /** |
||
108 | * Create if needed, and return the dir to the user profile image |
||
109 | * |
||
110 | * @return string $dir to the profile image |
||
111 | */ |
||
112 | public function profileImageDirPath(): string |
||
121 | |||
122 | /** |
||
123 | * Create if needed, and return the path to the user profile image |
||
124 | * |
||
125 | * @param null|string $filename filename for image |
||
126 | * @return string $path to the profile image |
||
127 | */ |
||
128 | public function profileImageFilePath($filename = null): string |
||
135 | |||
136 | /** |
||
137 | * Return the URL path to the image if exists or false |
||
138 | * |
||
139 | * @param string $uuid the user uuid |
||
140 | * @return null|string $path to the profile image |
||
141 | * @return bool true if the profile image exists |
||
142 | */ |
||
143 | public function profileImageExists($filename = null) |
||
147 | |||
148 | /** |
||
149 | * Return the URL path to the image if exists or false |
||
150 | * |
||
151 | * @param null|string $uuid the user uuid |
||
152 | * @return false|string return the url path or false if not exists |
||
153 | */ |
||
154 | public function profileImageUrl($filename = null) |
||
162 | |||
163 | |||
164 | /** |
||
165 | * Create profile image from given file |
||
166 | * |
||
167 | * @param string $file path to file |
||
168 | * @return boolean if the file was written and and asset record created |
||
169 | */ |
||
170 | public function profileImageCreate($file) |
||
230 | } |
||
231 |
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.