The method getPassword() does not seem to exist on object<Domain\User\User>.
This check looks for calls to methods that do not seem to exist on a given type.
It looks for the method on the type itself as well as in inherited classes or
implemented interfaces.
This is most likely a typographical error or the method has been renamed.
Loading history...
29
$passwordSpecification->validate();
30
}
31
32
public function validateIdentifier()
33
{
34
$userID = $this->user->getUserID();
35
36
if (!is_int($userID)) {
37
throw new UserSpecificationException('Property `userID` must be integer.');
38
}
39
40
if ($userID <= 0) {
41
throw new UserSpecificationException('Property `userID` must be more than 0.');
42
}
43
}
44
45
private function doBasicValidation()
46
{
47
$this->validateEmail();
48
$this->validateName();
49
}
50
51
private function validateEmail()
52
{
53
$email = $this->user->getEmail();
54
if (!filter_var($email, FILTER_VALIDATE_EMAIL)) {
55
throw new UserSpecificationException('Property `email` is not valid.');
56
}
57
}
58
59
private function validateName()
60
{
61
$name = $this->user->getName();
62
if (\mb_strlen($name) < 1) {
63
throw new UserSpecificationException('`name` length should be more than 1 character.');
64
}
65
if (\mb_strlen($name) > 50) {
66
throw new UserSpecificationException('`name` length should be less than 50 characters.');
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.