Conditions | 3 |
Paths | 3 |
Total Lines | 17 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
25 | protected function getMember(InputInterface $input, OutputInterface $output) |
||
26 | { |
||
27 | $email = $this->getOrAskForArgument($input, $output, 'email', 'Enter email address: '); |
||
28 | if (empty($email)) { |
||
29 | $output->writeln('<error>Please enter an email address.</error>'); |
||
30 | return false; |
||
31 | } |
||
32 | |||
33 | /** @var Member $member */ |
||
34 | $member = Member::get()->filter('email', $email)->first(); |
||
35 | if (!$member) { |
||
36 | $output->writeln('<error>Member with email "' . $email . '" was not found.'); |
||
37 | return false; |
||
38 | } |
||
39 | |||
40 | return $member; |
||
41 | } |
||
42 | } |
||
44 |