| Conditions | 3 |
| Paths | 3 |
| Total Lines | 14 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 27 | public function auth(MTProto $proto): void |
||
| 28 | { |
||
| 29 | parent::auth($proto); |
||
| 30 | if ($this->isAuthorized($proto)) { |
||
| 31 | return; |
||
| 32 | } |
||
| 33 | |||
| 34 | $proto->phone_login($this->config->getPhone()); |
||
| 35 | $result = $proto->complete_phone_login($this->config->getCode()); |
||
| 36 | if ('account.password' !== $result['_']) { |
||
| 37 | return; |
||
| 38 | } |
||
| 39 | |||
| 40 | $proto->complete_2fa_login($this->config->getPassword()); |
||
| 41 | } |
||
| 43 |