Add type-hint to hasPermission() #3415189
1 unresolved thread
1 unresolved thread
Closes #3415189
Merge request reports
Activity
added 2 commits
50 50 * @return bool 51 51 * TRUE if the user has the permission, FALSE otherwise. 52 52 */ 53 public function hasPermission(/* string */$permission); 53 public function hasPermission(string $permission): bool; - Comment on lines -53 to +53
I am not sure we can add the
bool
return type straight ahead here. That would break covariance in contrib that implements the interface. As a minimum we should doin 10.3 and then implement the returntype in 11.
Please register or sign in to reply