1 | <?php |
||
27 | class ProfileService extends AbstractSearchService |
||
28 | { |
||
29 | /** |
||
30 | * @var RaListingRepository |
||
31 | */ |
||
32 | private $raListingRepository; |
||
33 | |||
34 | /** |
||
35 | * @var IdentityService |
||
36 | */ |
||
37 | private $identityService; |
||
38 | |||
39 | public function __construct( |
||
46 | |||
47 | /** |
||
48 | * Uses the identityId to first load the ra credentials (if present) |
||
49 | * These credentials are then used to test what type of administrator we are dealing with ((S)RA(A)). Next the |
||
50 | * authorizations are retrieved from the InstitutionAuthorizationRepository. Finally identity is retrieved for the |
||
51 | * provided identityId. This data is then merged in a Profile value object. |
||
52 | * |
||
53 | * When the profile is incorrect, for example because no identity can be found, null is returned instead of a |
||
54 | * Profile. Its possible to retrieve profile data for a non RA user, in that case no authorization data is set |
||
55 | * on the profile. The same goes for the SRAA user. As that user is allowed all authorizations for all institutions. |
||
56 | * An additional isSraa flag is set to true for these administrators. |
||
57 | * |
||
58 | * @param $identityId |
||
59 | * @return Profile|null |
||
60 | */ |
||
61 | public function createProfile($identityId) |
||
86 | |||
87 | /** |
||
88 | * @param Institution $identity |
||
89 | * @return AuthorizedInstitutionCollection |
||
90 | */ |
||
91 | private function findAuthorizationsBy(IdentityId $identity) |
||
97 | } |
||
98 |
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue.
If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress.
In this case you can add the
@ignore
PhpDoc annotation to the duplicate definition and it will be ignored.