Skip to content

Commit 330e984

Browse files
Shorthand example documentation
Adding an example configuration to the class DocBlock and a 'short' DocBlock-Tag.
1 parent b0d397e commit 330e984

File tree

1 file changed

+17
-8
lines changed

1 file changed

+17
-8
lines changed

src/Hook/Condition/Config/CustomValueIsFalsy.php

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,22 +17,31 @@
1717
use SebastianFeldmann\Git\Repository;
1818

1919
/**
20-
* Class CustomValueIsFalsy
20+
* Condition CustomValueIsFalsy
21+
*
22+
* With this condition, you can check if a given custom value is falsy.
23+
* The Action only is executed if the custom value is falsy.
24+
* Values considered falsy are, 0, null, empty string, empty array and false.
2125
*
2226
* Example configuration:
2327
*
24-
* "action": "some-action"
25-
* "conditions": [
26-
* {"exec": "\\CaptainHook\\App\\Hook\\Condition\\Config\\CustomValueIsFalsy",
27-
* "args": [
28-
* "NAME_OF_CUSTOM_VALUE"
29-
* ]}
30-
* ]
28+
* <code>
29+
* {
30+
* "action": "some-action"
31+
* "conditions": [
32+
* {
33+
* "exec": "CaptainHook.Config.CustomValueIsFalsy",
34+
* "args": ["NAME_OF_CUSTOM_VALUE"]
35+
* }
36+
* ]
37+
* }
38+
* </code>
3139
*
3240
* @package CaptainHook
3341
* @author Sebastian Feldmann <[email protected]>
3442
* @link https://github.com/captainhook-git/captainhook
3543
* @since Class available since Release 5.17.2
44+
* @short CaptainHook.Config.CustomValueIsFalsy
3645
*/
3746
class CustomValueIsFalsy extends Condition\Config
3847
{

0 commit comments

Comments
 (0)