Passed
Push — main ( 241083...5efb85 )
by Sebastian
04:13
created

All::isTrue()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 2
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
c 0
b 0
f 0
1
<?php
2
3
/**
4
 * This file is part of CaptainHook
5
 *
6
 * (c) Sebastian Feldmann <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace CaptainHook\App\Hook\Condition\FileStaged;
13
14
use CaptainHook\App\Hook\Condition\File;
15
16
/**
17
 * Class All
18
 *
19
 * The FileStaged condition is applicable for `pre-commit` hooks.
20
 * It checks if all configured files are staged for commit.
21
 *
22
 * Example configuration:
23
 *
24
 * <code>
25
 * {
26
 *   "action": "some-action"
27
 *   "conditions": [
28
 *     {
29
 *       "exec": "CaptainHook.FileStaged.All",
30
 *       "args": [
31
 *         ["list", "of", "files"]
32
 *       ]
33
 *     }
34
 *   ]
35
 * }
36
 * </code>
37
 *
38
 * The file list can also be defined as comma seperated string "file1,file2,file3"
39
 *
40
 * @package CaptainHook
41
 * @author  Sebastian Feldmann <[email protected]>
42
 * @link    https://github.com/captainhook-git/captainhook
43
 * @since   Class available since Release 5.2.0
44
 */
45
class All extends File\All
46
{
47
    use File\Staged;
48
}
49