@@ -41,8 +41,9 @@ |
||
41 | 41 | throw new \InvalidArgumentException('Trying to create Entity with no content or location'); |
42 | 42 | } |
43 | 43 | if ($content != null && $location != null) { |
44 | - if ($location->contentId != $content->id) |
|
45 | - throw new \InvalidArgumentException('Trying to create Entity with mismatching content and location'); |
|
44 | + if ($location->contentId != $content->id) { |
|
45 | + throw new \InvalidArgumentException('Trying to create Entity with mismatching content and location'); |
|
46 | + } |
|
46 | 47 | } |
47 | 48 | $this->content = $content; |
48 | 49 | $this->location = $location; |
@@ -22,46 +22,64 @@ |
||
22 | 22 | |
23 | 23 | protected function emergency($message, array $context = array()) |
24 | 24 | { |
25 | - if ($this->logger) $this->logger->emergency($message, $context); |
|
25 | + if ($this->logger) { |
|
26 | + $this->logger->emergency($message, $context); |
|
27 | + } |
|
26 | 28 | } |
27 | 29 | |
28 | 30 | protected function alert($message, array $context = array()) |
29 | 31 | { |
30 | - if ($this->logger) $this->logger->alert($message, $context); |
|
32 | + if ($this->logger) { |
|
33 | + $this->logger->alert($message, $context); |
|
34 | + } |
|
31 | 35 | } |
32 | 36 | |
33 | 37 | protected function critical($message, array $context = array()) |
34 | 38 | { |
35 | - if ($this->logger) $this->logger->critical($message, $context); |
|
39 | + if ($this->logger) { |
|
40 | + $this->logger->critical($message, $context); |
|
41 | + } |
|
36 | 42 | } |
37 | 43 | |
38 | 44 | protected function error($message, array $context = array()) |
39 | 45 | { |
40 | - if ($this->logger) $this->logger->error($message, $context); |
|
46 | + if ($this->logger) { |
|
47 | + $this->logger->error($message, $context); |
|
48 | + } |
|
41 | 49 | } |
42 | 50 | |
43 | 51 | protected function warning($message, array $context = array()) |
44 | 52 | { |
45 | - if ($this->logger) $this->logger->warning($message, $context); |
|
53 | + if ($this->logger) { |
|
54 | + $this->logger->warning($message, $context); |
|
55 | + } |
|
46 | 56 | } |
47 | 57 | |
48 | 58 | protected function notice($message, array $context = array()) |
49 | 59 | { |
50 | - if ($this->logger) $this->logger->notice($message, $context); |
|
60 | + if ($this->logger) { |
|
61 | + $this->logger->notice($message, $context); |
|
62 | + } |
|
51 | 63 | } |
52 | 64 | |
53 | 65 | protected function info($message, array $context = array()) |
54 | 66 | { |
55 | - if ($this->logger) $this->logger->info($message, $context); |
|
67 | + if ($this->logger) { |
|
68 | + $this->logger->info($message, $context); |
|
69 | + } |
|
56 | 70 | } |
57 | 71 | |
58 | 72 | protected function debug($message, array $context = array()) |
59 | 73 | { |
60 | - if ($this->logger) $this->logger->debug($message, $context); |
|
74 | + if ($this->logger) { |
|
75 | + $this->logger->debug($message, $context); |
|
76 | + } |
|
61 | 77 | } |
62 | 78 | |
63 | 79 | protected function log($level, $message, array $context = array()) |
64 | 80 | { |
65 | - if ($this->logger) $this->logger->log($level, $message, $context); |
|
81 | + if ($this->logger) { |
|
82 | + $this->logger->log($level, $message, $context); |
|
83 | + } |
|
66 | 84 | } |
67 | 85 | } |