File tree Expand file tree Collapse file tree 3 files changed +9
-20
lines changed Expand file tree Collapse file tree 3 files changed +9
-20
lines changed Original file line number Diff line number Diff line change 44
55abstract class AbstractProcessor
66{
7- private $ fileOut ;
7+ private string $ fileOut ;
88
9- protected $ fileOriginal ;
9+ protected string $ fileOriginal ;
1010
1111 protected string $ suffix = '' ;
1212
@@ -17,12 +17,12 @@ public function __construct()
1717 clearstatcache ();
1818 }
1919
20- public function compress ()
20+ public function compress (): void
2121 {
2222 $ this ->suffix = '.gz ' ;
2323 }
2424
25- public function setFileOriginal ($ fileOriginal )
25+ public function setFileOriginal ($ fileOriginal ): self
2626 {
2727 $ this ->fileOriginal = $ fileOriginal ;
2828
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ public function handler($file): ?string
3030 return $ this ->processed ($ nextFile );
3131 }
3232
33- private function rotate (int $ number = 1 )
33+ private function rotate (int $ number = 1 ): string
3434 {
3535 $ file = "{$ this ->fileOriginal }. {$ number }{$ this ->suffix }" ;
3636
@@ -51,8 +51,6 @@ private function rotate(int $number = 1)
5151 rename ($ file , $ nextFile );
5252
5353 return "{$ this ->fileOriginal }. {$ number }{$ this ->suffix }" ;
54-
55-
5654 }
5755
5856 private function getnumber (string $ file ): ?int
Original file line number Diff line number Diff line change 88
99class Rotation
1010{
11- /**
12- * @var RotativeProcessor
13- */
14- private $ processor ;
11+ private RotativeProcessor $ processor ;
1512
16- /**
17- * @var boolean
18- */
19- private $ _compress = false ;
13+ private bool $ _compress = false ;
2014
21- /**
22- * @var integer
23- */
24- private $ _minSize = 0 ;
15+ private int $ _minSize = 0 ;
2516
2617 public function __construct ()
2718 {
@@ -135,7 +126,7 @@ private function canRotate(string $file): bool
135126 * @param string $file
136127 * @return void
137128 */
138- private function initProcessorFile (string $ file )
129+ private function initProcessorFile (string $ file ): void
139130 {
140131 $ this ->processor ->setFileOriginal ($ file );
141132 }
You can’t perform that action at this time.
0 commit comments