| Conditions | 2 |
| Paths | 2 |
| Total Lines | 16 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 34 | public function __construct($description) |
||
| 35 | { |
||
| 36 | $description = trim($description, ' ()'); |
||
| 37 | |||
| 38 | if (!preg_match('/([0-9e\-+\.]+), *([0-9e\-+\.]+)/', $description, $matches)) { |
||
| 39 | throw new \InvalidArgumentException( |
||
| 40 | sprintf( |
||
| 41 | "Could not parse point representation '%s'.", |
||
| 42 | $description |
||
| 43 | ) |
||
| 44 | ); |
||
| 45 | } |
||
| 46 | |||
| 47 | $this->x = (float) $matches[1]; |
||
| 48 | $this->y = (float) $matches[2]; |
||
| 49 | } |
||
| 50 | |||
| 67 |