1 | <?php |
||
19 | class BoolValueParserTest extends TestCase |
||
20 | { |
||
21 | /** @var BoolValueParser */ |
||
22 | private $parser; |
||
23 | |||
24 | public function setUp() |
||
28 | |||
29 | /** |
||
30 | * @dataProvider getCanParseData |
||
31 | * |
||
32 | * @param string $string |
||
33 | * @param bool $expected |
||
34 | */ |
||
35 | public function testCanParse($string, $expected) |
||
39 | |||
40 | /** |
||
41 | * @return array |
||
42 | */ |
||
43 | public function getCanParseData() |
||
55 | |||
56 | /** |
||
57 | * @dataProvider getParseData |
||
58 | * |
||
59 | * @param string $string |
||
60 | * @param bool $expected |
||
61 | */ |
||
62 | public function testParse($string, $expected) |
||
66 | |||
67 | /** |
||
68 | * @return array |
||
69 | */ |
||
70 | public function getParseData() |
||
77 | } |
||
78 |
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.