... | ... |
@@ -11,13 +11,7 @@ class Parser { |
11 | 11 |
private $restaurants = array(); |
12 | 12 |
private $logger; |
13 | 13 |
|
14 |
- function __construct($logger, $restaurants) { |
|
15 |
- |
|
16 |
- // Check if logger implements iOutput interface |
|
17 |
- if ( !in_array("iOutput", class_implements($logger)) ) { |
|
18 |
- throw new InvalidArgumentException("Logger class must implement interface iOutput"); |
|
19 |
- } |
|
20 |
- |
|
14 |
+ function __construct(iOutput $logger, $restaurants) { |
|
21 | 15 |
$this->logger = $logger; |
22 | 16 |
|
23 | 17 |
if (empty($restaurants) || !is_array($restaurants)) { |
... | ... |
@@ -61,7 +55,7 @@ class Parser { |
61 | 61 |
} |
62 | 62 |
} |
63 | 63 |
if (!$exists) { |
64 |
- $this->logger->log($this->logger->newLine()."{}"); |
|
64 |
+ $this->logger->log($this->logger->newLine()."Hovno. Nic nemaju."); |
|
65 | 65 |
} |
66 | 66 |
$this->logger->log($this->logger->newLine()); |
67 | 67 |
} |