| @@ 39-46 (lines=8) @@ | ||
| 36 | /** |
|
| 37 | * @param LoggerInterface $logger |
|
| 38 | */ |
|
| 39 | public function __construct(LoggerInterface $logger = null) |
|
| 40 | { |
|
| 41 | if ($logger !== null) { |
|
| 42 | $this->setLogger($logger); |
|
| 43 | } else { |
|
| 44 | $this->setLogger(new NullLogger); |
|
| 45 | } |
|
| 46 | } |
|
| 47 | ||
| 48 | /** |
|
| 49 | * Sets a logger instance on the object. |
|
| @@ 45-54 (lines=10) @@ | ||
| 42 | /** |
|
| 43 | * @param LoggerInterface $logger |
|
| 44 | */ |
|
| 45 | public function __construct(LoggerInterface $logger = null) |
|
| 46 | { |
|
| 47 | if ($logger !== null) { |
|
| 48 | $this->setLogger($logger); |
|
| 49 | } else { |
|
| 50 | $this->setLogger(new NullLogger); |
|
| 51 | } |
|
| 52 | ||
| 53 | $this->setClient(); |
|
| 54 | } |
|
| 55 | ||
| 56 | /** |
|
| 57 | * Sets a logger instance on the object. |
|