| Conditions | 2 |
| Paths | 2 |
| Total Lines | 11 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 26 | 2 | public function getQRCodeGoogleUrl($company, $holder, $secret, $size = 200) |
|
| 27 | { |
||
| 28 | 2 | if (!$this->allowInsecureCallToGoogleApis) { |
|
| 29 | 1 | throw new InsecureCallException("It's not secure to send secret keys to Google Apis, you have to explicitly allow it by calling \$google2fa->setAllowInsecureCallToGoogleApis(true)."); |
|
| 30 | } |
||
| 31 | |||
| 32 | 1 | return Url::generateGoogleQRCodeUrl( |
|
| 33 | 1 | 'https://chart.googleapis.com/', |
|
| 34 | 1 | 'chart', |
|
| 35 | 1 | 'chs='.$size.'x'.$size.'&chld=M|0&cht=qr&chl=', |
|
| 36 | 1 | $this->getQRCodeUrl($company, $holder, $secret) |
|
| 37 | ); |
||
| 68 |