| Conditions | 1 |
| Paths | 1 |
| Total Lines | 15 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 10 |
| CRAP Score | 1 |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 32 | 34 | public function __construct($url) |
|
| 33 | { |
||
| 34 | 34 | $this->url = Http::createFromString($url); |
|
| 35 | |||
| 36 | 34 | $this->url = (new RemoveQueryKeys($this->url->query->keys()))->__invoke($this->url); |
|
| 37 | |||
| 38 | 34 | preg_match( |
|
| 39 | 34 | '/\/(.*)\/(.*)\.htm/', |
|
| 40 | 34 | parse_url($this->url, PHP_URL_PATH), |
|
| 41 | 34 | $matches |
|
| 42 | ); |
||
| 43 | |||
| 44 | 34 | $this->category = $matches[1]; |
|
| 45 | 34 | $this->id = $matches[2]; |
|
| 46 | 34 | } |
|
| 47 | |||
| 72 |