We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 700f5b7 commit 3fba9f3Copy full SHA for 3fba9f3
src/PhpGitHooks/Application/Config/ConfigFile.php
@@ -54,13 +54,16 @@ public function getMessageCommitConfiguration()
54
{
55
$data = $this->getConfigurationData();
56
57
- if (!isset($data['commit-msg']) ||
58
- !isset($data['commit-msg']['enabled']) ||
59
- !isset($data['commit-msg']['regular-expression'])
60
- ) {
+ if (!isset($data['commit-msg']) || !isset($data['commit-msg']['enabled'])) {
61
throw new InvalidConfigStructureException();
62
}
63
+ if (true === $data['commit-msg']['enabled']) {
+ if (!isset($data['commit-msg']['regular-expression'])) {
+ throw new InvalidConfigStructureException();
64
+ }
65
66
+
67
return $data['commit-msg'];
68
69
0 commit comments