Skip to content
This repository was archived by the owner on Feb 21, 2022. It is now read-only.

Commit 8e15fce

Browse files
committed
Merge pull request #5 from mmoreram/feature/exception-if-no-header-block
Issue #4 Throwing exception when needed
2 parents 7a3d231 + cb2691d commit 8e15fce

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

build/php-formatter.phar

113 Bytes
Binary file not shown.

src/PHPFormatter/Command/HeaderCommand.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,11 @@ protected function execute(InputInterface $input, OutputInterface $output)
100100
$configFinder->findConfigFile($configPath)
101101
);
102102

103+
if (empty($header)) {
104+
105+
throw new Exception('Header definition must be defined in .formatter.yml file under');
106+
}
107+
103108
/**
104109
* Building the real directory or file to work in
105110
*/

0 commit comments

Comments
 (0)