Any reason not to wrap this into a switch?

```php
<?php
switch (strtolower($app->request->get('role'))) {
    case PARTNERSHIP_ROLE_MENTOR:
        $partnerships = $partnershipManager->retrieveByMentor($id);
    break;

    case PARTNERSHIP_ROLE_APPRENTICE:
        $partnerships = $partnershipManager->retrieveByApprentice($id);
    break;

    default:
        $partnerships = $partnershipManager->retrieve($id);
}
```

Alternatively you could move this functionality into the `PartnershipManager` with a `retrieveByRole($role)` method or similar to clean up the logic in the controller a bit.