1111final class FileManager
1212{
1313
14- /** @var IEncoderFactory */
15- private $ encoderFactory ;
14+ private IEncoderFactory $ encoderFactory ;
1615
17- /** @var IDecoderFactory */
18- private $ decoderFactory ;
16+ private IDecoderFactory $ decoderFactory ;
1917
2018 public function __construct (
2119 IEncoderFactory $ encoderFactory ,
@@ -31,7 +29,7 @@ public function __construct(
3129 */
3230 public function loadFile (FileConfig $ config ): array
3331 {
34- if (empty ( $ config ->getOutputType ()) ) {
32+ if ($ config ->getOutputType () === null ) {
3533 throw new InvalidStateException ('Invalid file output type ' );
3634 }
3735
@@ -45,7 +43,7 @@ public function loadFile(FileConfig $config): array
4543 */
4644 public function loadDistFile (FileConfig $ config ): array
4745 {
48- if (empty ( $ config ->getSourceType ()) ) {
46+ if ($ config ->getSourceType () === null ) {
4947 throw new InvalidStateException ('Invalid file source type ' );
5048 }
5149
@@ -59,7 +57,7 @@ public function loadDistFile(FileConfig $config): array
5957 */
6058 public function processFile (array $ content , FileConfig $ config ): void
6159 {
62- if (empty ( $ config ->getOutputType ()) ) {
60+ if ($ config ->getOutputType () === null ) {
6361 throw new InvalidStateException ('Invalid file output type ' );
6462 }
6563
0 commit comments