| @@ -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+)\]:', | 
| @@ -28,9 +28,9 @@ | ||
| 28 | 28 | */ | 
| 29 | 29 | public $defaultFormat = '%t %h %p %m'; | 
| 30 | 30 | |
| 31 | - /** | |
| 32 | - * @var array | |
| 33 | - */ | |
| 31 | + /** | |
| 32 | + * @var array | |
| 33 | + */ | |
| 34 | 34 | public $patterns = [ | 
| 35 | 35 | '%t' => '(?P<time>[\w\d+/ :]+)', | 
| 36 | 36 | '%h' => '(?P<hostname>.+)', | 
| @@ -40,5 +40,5 @@ | ||
| 40 | 40 | '%P' => '\[pid (?P<pid>\d+)\]', | 
| 41 | 41 |          '%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})\]', | 
| 42 | 42 | '%M' => '(?P<message>[\w\s\.:\'\-\/_"]+)', | 
| 43 | - ]; | |
| 43 | + ]; | |
| 44 | 44 | } | 
| 45 | 45 | \ No newline at end of file | 
| @@ -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 | |