| Conditions | 3 |
| Paths | 3 |
| Total Lines | 17 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 42 | public function bbs($url = null): Driver |
||
| 43 | { |
||
| 44 | if (null === $url) { |
||
| 45 | throw new \InvalidArgumentException('Drivier is null'); |
||
| 46 | } |
||
| 47 | |||
| 48 | $client = new Client([ |
||
| 49 | 'cookies' => true, |
||
| 50 | 'http_errors' => false, |
||
| 51 | ]); |
||
| 52 | |||
| 53 | if ($this->startsWith($url, self::SHITARABA)) { |
||
| 54 | return new ShitarabaDriver($url, $client); |
||
| 55 | } |
||
| 56 | |||
| 57 | return new TwoChanDriver($url, $client); |
||
| 58 | } |
||
| 59 | |||
| 71 |