1 | <?php |
||
16 | abstract class CredentialProviderBase implements ICredentialProvider |
||
17 | { |
||
18 | /** |
||
19 | * @var PdoDatabase |
||
20 | */ |
||
21 | private $database; |
||
22 | /** |
||
23 | * @var SiteConfiguration |
||
24 | */ |
||
25 | private $configuration; |
||
26 | /** @var string */ |
||
27 | private $type; |
||
28 | |||
29 | /** |
||
30 | * CredentialProviderBase constructor. |
||
31 | * |
||
32 | * @param PdoDatabase $database |
||
33 | * @param SiteConfiguration $configuration |
||
34 | * @param string $type |
||
35 | */ |
||
36 | public function __construct(PdoDatabase $database, SiteConfiguration $configuration, $type) |
||
42 | |||
43 | /** |
||
44 | * @param int $userId |
||
45 | * |
||
46 | * @return Credential |
||
|
|||
47 | */ |
||
48 | protected function getCredentialData($userId) |
||
68 | |||
69 | /** |
||
70 | * @return PdoDatabase |
||
71 | */ |
||
72 | public function getDatabase() |
||
76 | |||
77 | /** |
||
78 | * @return SiteConfiguration |
||
79 | */ |
||
80 | public function getConfiguration() |
||
84 | |||
85 | /** |
||
86 | * @param User $user |
||
87 | * |
||
88 | * @return Credential |
||
89 | */ |
||
90 | protected function createNewCredential(User $user) |
||
99 | } |
This check compares the return type specified in the
@return
annotation of a function or method doc comment with the types returned by the function and raises an issue if they mismatch.