Conditions | 1 |
Paths | 1 |
Total Lines | 15 |
Code Lines | 6 |
Lines | 15 |
Ratio | 100 % |
1 | <?php |
||
31 | View Code Duplication | public function it_falls_back_to_empty_front_matter_with_the_original_as_body() |
|
32 | { |
||
33 | $contents = " |
||
34 | --- |
||
35 | foo: bar |
||
36 | -- |
||
37 | |||
38 | Lorem ipsum. |
||
39 | "; |
||
40 | |||
41 | $this->parse($contents)->shouldHaveType(Document::class); |
||
42 | $this->parse($contents)->shouldHaveFrontMatter([]); |
||
43 | $this->parse($contents)->shouldHaveBodyContaining('foo: bar'); |
||
44 | $this->parse($contents)->shouldHaveBodyContaining('Lorem ipsum.'); |
||
45 | } |
||
46 | |||
59 |
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.