@@ -40,9 +40,9 @@ |
||
40 | 40 | protected $matcher; |
41 | 41 | |
42 | 42 | |
43 | - public function __construct(array $methods, string $uri, array $attribute=[]) |
|
43 | + public function __construct(array $methods, string $uri, array $attribute = []) |
|
44 | 44 | { |
45 | - array_walk($methods, function ($value) { |
|
45 | + array_walk($methods, function($value) { |
|
46 | 46 | return strtoupper($value); |
47 | 47 | }); |
48 | 48 | $this->methods = $methods; |
@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | * |
24 | 24 | * @param RouteMatcher[] $collection |
25 | 25 | */ |
26 | - public function __construct(array $collection=[]) |
|
26 | + public function __construct(array $collection = []) |
|
27 | 27 | { |
28 | 28 | $this->merge($collection); |
29 | 29 | } |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | * @param array $collection |
35 | 35 | * @return void |
36 | 36 | */ |
37 | - public function merge(array $collection=[]) |
|
37 | + public function merge(array $collection = []) |
|
38 | 38 | { |
39 | 39 | $this->collection = array_merge($this->collection, $collection); |
40 | 40 | } |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | * @param string $name |
58 | 58 | * @return RouteMatcher|null |
59 | 59 | */ |
60 | - public function get(string $name):?RouteMatcher |
|
60 | + public function get(string $name): ?RouteMatcher |
|
61 | 61 | { |
62 | 62 | return $this->collection[$name] ?? null; |
63 | 63 | } |
@@ -40,11 +40,11 @@ |
||
40 | 40 | while (!feof($fp)) { |
41 | 41 | fseek($fp, $offset); |
42 | 42 | $content = fread($fp, $this->bufferSize); |
43 | - $content.=(feof($fp))? "\n":''; |
|
43 | + $content .= (feof($fp)) ? "\n" : ''; |
|
44 | 44 | $size = strpos($content, "\n"); |
45 | 45 | $offset += $size; |
46 | 46 | if ($content[$size - 1] === "\r") { |
47 | - $content = substr($content, 0, $size -1); |
|
47 | + $content = substr($content, 0, $size - 1); |
|
48 | 48 | } else { |
49 | 49 | $content = substr($content, 0, $size); |
50 | 50 | } |