Skip to content

Commit 7ec07c8

Browse files
committed
feat(checker): make validator injectable
1 parent 0d6d85a commit 7ec07c8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/SegmentChecker.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ class SegmentChecker
2323
/** @var Validator */
2424
protected $validator;
2525

26-
public function __construct()
26+
public function __construct(Validator $validator = null)
2727
{
28-
$this->validator = new Validator;
28+
$this->validator = $validator ?: new Validator;
2929
}
3030

3131
/**

0 commit comments

Comments
 (0)