Passed
Push — master ( 4ee327...62eb0a )
by Dmitry
02:50
created

DirectoryMatcher   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
dl 0
loc 19
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A isExist() 0 4 1
A isNotExist() 0 4 1
1
<?php
2
3
namespace PHPKitchen\CodeSpecs\Expectation\Matcher;
4
5
use PHPKitchen\CodeSpecs\Expectation\Matcher\Base\Matcher;
6
use PHPKitchen\CodeSpecs\Expectation\Mixin\FileStateExpectations;
7
8
/**
9
 * DirectoryMatcher is designed to check given directory matches expectation.
10
 *
11
 * @author Dmitry Kolodko <[email protected]>
12
 */
13
class DirectoryMatcher extends Matcher {
14
    use FileStateExpectations;
15
16
    /**
17
     * @return $this
18
     */
19
    public function isExist() {
20
        $this->startStep('is exist')
21
            ->assertDirectoryExists();
22
        return $this;
23
    }
24
25
    /**
26
     * @return $this
27
     */
28
    public function isNotExist() {
29
        $this->startStep('is not exist')
30
            ->assertDirectoryNotExists();
31
        return $this;
32
    }
33
}