@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | * |
32 | 32 | * @var string |
33 | 33 | */ |
34 | - protected $filePath= ''; |
|
34 | + protected $filePath=''; |
|
35 | 35 | |
36 | 36 | /** |
37 | 37 | * Constructing a buffer reading HTSL content from somewhere. |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | */ |
43 | 43 | public function __construct( Htsl$htsl ) |
44 | 44 | { |
45 | - $this->htsl= $htsl; |
|
45 | + $this->htsl=$htsl; |
|
46 | 46 | } |
47 | 47 | |
48 | 48 | /** |
@@ -28,14 +28,14 @@ discard block |
||
28 | 28 | */ |
29 | 29 | public function __construct( Htsl$htsl, string$content, string$filePath='' ) |
30 | 30 | { |
31 | - if( false!==strpos($content,"\r") ){ |
|
31 | + if( false!==strpos($content, "\r") ){ |
|
32 | 32 | throw new \Exception("Line ending must be LF.", 1); |
33 | 33 | } |
34 | 34 | |
35 | - $this->filePath= $filePath; |
|
35 | + $this->filePath=$filePath; |
|
36 | 36 | |
37 | - $this->lines= array_filter(explode("\n",$content),'strlen'); |
|
38 | - array_unshift($this->lines,null); |
|
37 | + $this->lines=array_filter(explode("\n", $content), 'strlen'); |
|
38 | + array_unshift($this->lines, null); |
|
39 | 39 | |
40 | 40 | parent::__construct($htsl); |
41 | 41 | } |
@@ -63,9 +63,9 @@ discard block |
||
63 | 63 | */ |
64 | 64 | public function goSide( $fileName ):parent |
65 | 65 | { |
66 | - $filePath= $this->htsl->getFilePath($fileName,dirname($this->filePath)); |
|
67 | - $content= $this->htsl->getFileContent($filePath); |
|
66 | + $filePath=$this->htsl->getFilePath($fileName, dirname($this->filePath)); |
|
67 | + $content=$this->htsl->getFileContent($filePath); |
|
68 | 68 | |
69 | - return new static($this->htsl,$content,$filePath); |
|
69 | + return new static($this->htsl, $content, $filePath); |
|
70 | 70 | } |
71 | 71 | } |
@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | */ |
24 | 24 | function studly_case( string$input ):string |
25 | 25 | { |
26 | - return str_replace(' ','',ucwords(str_replace(['-', '_'], ' ', $input))); |
|
26 | + return str_replace(' ', '', ucwords(str_replace([ '-', '_' ], ' ', $input))); |
|
27 | 27 | } |
28 | 28 | |
29 | 29 | /** |
@@ -35,5 +35,5 @@ discard block |
||
35 | 35 | */ |
36 | 36 | function snake_case( string$input ):string |
37 | 37 | { |
38 | - return strtolower(preg_replace('/(?<=[^A-Z])(?=[A-Z])|(?<=[A-Z])(?=[A-Z][^A-Z])/','_',$input)); |
|
38 | + return strtolower(preg_replace('/(?<=[^A-Z])(?=[A-Z])|(?<=[A-Z])(?=[A-Z][^A-Z])/', '_', $input)); |
|
39 | 39 | } |
@@ -12,6 +12,7 @@ |
||
12 | 12 | * @access public |
13 | 13 | * |
14 | 14 | * @param string ...$key |
15 | + * @param string[] $key |
|
15 | 16 | * |
16 | 17 | * @return mixed |
17 | 18 | */ |