File tree Expand file tree Collapse file tree
tests/Unit/DataType/Filter Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -8,7 +8,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
88
99### Added
1010- ` DataType\Filter\AbstractNumberFilter `
11- - ` DataType\Filter\StringFilter::matches() ` to check if string match the filter conditions
1211
1312### Changed
1413- Use ` DataType\Filter\AbstractNumberFilter ` for ` DataType\Filter\IntegerFilter ` and ` DataType\Filter\FloatFilter `
Original file line number Diff line number Diff line change @@ -44,11 +44,11 @@ public function contains(): ?string
4444
4545 public function matches (string $ value ): bool
4646 {
47- if ($ this ->equals !== null && $ value !== $ this ->equals ) {
47+ if ($ this ->contains !== null && ! str_contains ( $ value, $ this ->contains ) ) {
4848 return false ;
4949 }
5050
51- if ($ this ->contains !== null && ! str_contains ( $ value, $ this ->contains ) ) {
51+ if ($ this ->equals !== null && $ value !== $ this ->equals ) {
5252 return false ;
5353 }
5454
Original file line number Diff line number Diff line change @@ -171,7 +171,7 @@ public static function matchesDataProvider(): \Generator
171171
172172 yield "test match begins with " => [
173173 'stringForTrueCase ' => 'this start ' ,
174- 'stringForFalseCase ' => 'this does not start with ' ,
174+ 'stringForFalseCase ' => 'this deos not start with ' ,
175175 'initFilter ' => new StringFilter (beginsWith: 'this start ' )
176176 ];
177177 }
You can’t perform that action at this time.
0 commit comments