@@ -58,8 +58,7 @@ |
||
58 | 58 | * Class RuleInterface |
59 | 59 | * @package Platine\Upload\Validator |
60 | 60 | */ |
61 | -interface RuleInterface |
|
62 | -{ |
|
61 | +interface RuleInterface { |
|
63 | 62 | /** |
64 | 63 | * Method to validate this Rule |
65 | 64 | * |
@@ -58,8 +58,7 @@ discard block |
||
58 | 58 | * Class Validator |
59 | 59 | * @package Platine\Upload\Validator |
60 | 60 | */ |
61 | -class Validator |
|
62 | -{ |
|
61 | +class Validator { |
|
63 | 62 | /** |
64 | 63 | * The validate rules |
65 | 64 | * @var array<int, RuleInterface> |
@@ -70,8 +69,7 @@ discard block |
||
70 | 69 | * Create new instance |
71 | 70 | * @param array<int, RuleInterface> $rules |
72 | 71 | */ |
73 | - public function __construct(array $rules = []) |
|
74 | - { |
|
72 | + public function __construct(array $rules = []) { |
|
75 | 73 | $this->rules = $rules; |
76 | 74 | } |
77 | 75 |
@@ -60,8 +60,7 @@ discard block |
||
60 | 60 | * Class Size |
61 | 61 | * @package Platine\Upload\Validator\Rule |
62 | 62 | */ |
63 | -class Size implements RuleInterface |
|
64 | -{ |
|
63 | +class Size implements RuleInterface { |
|
65 | 64 | /** |
66 | 65 | * The uploaded file max size |
67 | 66 | * @var int |
@@ -72,8 +71,7 @@ discard block |
||
72 | 71 | * Create new instance |
73 | 72 | * @param int|string $size |
74 | 73 | */ |
75 | - public function __construct($size) |
|
76 | - { |
|
74 | + public function __construct($size) { |
|
77 | 75 | if (!is_int($size)) { |
78 | 76 | $size = Helper::sizeInBytes($size); |
79 | 77 | } |
@@ -60,8 +60,7 @@ discard block |
||
60 | 60 | * Class MimeType |
61 | 61 | * @package Platine\Upload\Validator\Rule |
62 | 62 | */ |
63 | -class MimeType implements RuleInterface |
|
64 | -{ |
|
63 | +class MimeType implements RuleInterface { |
|
65 | 64 | /** |
66 | 65 | * The list of allowed uploaded file mime type |
67 | 66 | * @var array<int, string> |
@@ -72,8 +71,7 @@ discard block |
||
72 | 71 | * Create new instance |
73 | 72 | * @param array<int, string>|string $mimeType |
74 | 73 | */ |
75 | - public function __construct($mimeType) |
|
76 | - { |
|
74 | + public function __construct($mimeType) { |
|
77 | 75 | if (!is_array($mimeType)) { |
78 | 76 | $mimeType = [$mimeType]; |
79 | 77 | } |
@@ -56,8 +56,7 @@ |
||
56 | 56 | * Class FileInterface |
57 | 57 | * @package Platine\Upload\File |
58 | 58 | */ |
59 | -interface FileInterface |
|
60 | -{ |
|
59 | +interface FileInterface { |
|
61 | 60 | /** |
62 | 61 | * Return the path name of uploaded file |
63 | 62 | * @return string |