File tree 2 files changed +5
-3
lines changed 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -76,7 +76,7 @@ public function records() : array
76
76
array_push ($ records , $ fileinfo ->getFilename ());
77
77
}
78
78
}
79
-
79
+
80
80
return $ records ;
81
81
}
82
82
@@ -147,6 +147,6 @@ private function isValidFilename(SplFileInfo $fileinfo) : bool
147
147
148
148
$ pattern = '/^\d{ ' . DecisionRecord::NUMBER_LENGTH . '}-[a-z\-]+ \\' . DecisionRecord::EXTENSION . '$/ ' ;
149
149
150
- return false !== preg_match ($ pattern , $ fileinfo ->getFilename ());
150
+ return ( boolean ) preg_match ($ pattern , $ fileinfo ->getFilename ());
151
151
}
152
152
}
Original file line number Diff line number Diff line change 4
4
5
5
use PHPUnit \Framework \TestCase ;
6
6
use org \bovigo \vfs \vfsStream ;
7
- use RuntimeException ;
8
7
use ADR \Domain \DecisionRecord ;
8
+ use RuntimeException ;
9
9
10
10
class WorkspaceTest extends TestCase
11
11
{
@@ -36,6 +36,8 @@ public function testCount()
36
36
37
37
$ vfs ->addChild (vfsStream::newFile ('0001-foo.md ' ));
38
38
$ vfs ->addChild (vfsStream::newFile ('0002-bar.md ' ));
39
+ $ vfs ->addChild (vfsStream::newFile ('any-file.md ' ));
40
+ $ vfs ->addChild (vfsStream::newDirectory ('any-directory ' ));
39
41
40
42
$ this ->assertEquals (2 , $ workspace ->count ());
41
43
}
You can’t perform that action at this time.
0 commit comments