| 1 | <?php |
||
| 17 | class CdbXmlCreatedByToUserIdResolver implements LoggerAwareInterface, CreatedByToUserIdResolverInterface |
||
| 18 | { |
||
| 19 | use LoggerAwareTrait; |
||
| 20 | |||
| 21 | /** |
||
| 22 | * @var UsersInterface |
||
| 23 | */ |
||
| 24 | private $users; |
||
| 25 | |||
| 26 | /** |
||
| 27 | * @param UsersInterface $users |
||
| 28 | */ |
||
| 29 | public function __construct(UsersInterface $users) |
||
| 34 | |||
| 35 | /** |
||
| 36 | * @inheritdoc |
||
| 37 | */ |
||
| 38 | public function resolveCreatedByToUserId(String $createdByIdentifier) |
||
| 65 | |||
| 66 | /** |
||
| 67 | * @param String $createdByIdentifier |
||
| 68 | * @return String |
||
| 69 | */ |
||
| 70 | private function resolveByEmailOrByNick(String $createdByIdentifier) |
||
| 81 | } |
||
| 82 |
If a variable is not always an object, we recommend to add an additional type check to ensure your method call is safe: