@@ -28,7 +28,7 @@ |
||
28 | 28 | $entry = new LogEntry(); |
29 | 29 | |
30 | 30 | foreach (array_filter(array_keys($data), 'is_string') as $key) { |
31 | - $entry->{$key} = trim($data[$key]); |
|
31 | + $entry->{$key} = trim($data[ $key ]); |
|
32 | 32 | } |
33 | 33 | |
34 | 34 | if (isset($entry->time)) { |
@@ -36,7 +36,7 @@ |
||
36 | 36 | * @var array |
37 | 37 | */ |
38 | 38 | public $patterns = [ |
39 | - // '%d' => '(?P<date>[\d \-,:]+)', |
|
39 | + // '%d' => '(?P<date>[\d \-,:]+)', |
|
40 | 40 | '%t' => '(?P<time>[\d \-:]+)(,\d+)', |
41 | 41 | '%s' => '(?P<service>[\w\d\. :]+(|\s+))', |
42 | 42 | '%p' => '\[(?P<pid>\d+)\]:', |
@@ -39,9 +39,9 @@ |
||
39 | 39 | */ |
40 | 40 | private $logFormat = ''; |
41 | 41 | |
42 | - /** |
|
43 | - * @var array |
|
44 | - */ |
|
42 | + /** |
|
43 | + * @var array |
|
44 | + */ |
|
45 | 45 | public $patterns = []; |
46 | 46 | |
47 | 47 | /** |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | /** |
43 | 43 | * @var array |
44 | 44 | */ |
45 | - public $patterns = []; |
|
45 | + public $patterns = [ ]; |
|
46 | 46 | |
47 | 47 | /** |
48 | 48 | * @var string |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | */ |
75 | 75 | public function addPattern(string $placeholder, string $pattern): void |
76 | 76 | { |
77 | - $this->patterns[$placeholder] = $pattern; |
|
77 | + $this->patterns[ $placeholder ] = $pattern; |
|
78 | 78 | $this->updateIpPatterns(); |
79 | 79 | } |
80 | 80 |
@@ -45,5 +45,5 @@ |
||
45 | 45 | '%P' => '?(\[pid (?P<pid>\d+)\])', |
46 | 46 | '%t' => '\[(?P<time>(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun) (?:Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) \d{2} \d{2}:\d{2}:\d{2}\.\d{6} \d{4})\]', |
47 | 47 | '%M' => '(?P<message>.+?)', |
48 | - ]; |
|
48 | + ]; |
|
49 | 49 | } |
50 | 50 | \ No newline at end of file |