Code Duplication    Length = 7-7 lines in 3 locations

src/Json/JsonContext.php 3 locations

@@ 67-73 (lines=7) @@
64
    /**
65
     * @Then /^the JSON array node "(?P<jsonNode>[^"]*)" should contain "(?P<expectedValue>.*)" element$/
66
     */
67
    public function theJsonArrayNodeShouldContainElements($jsonNode, $expectedValue)
68
    {
69
        $this->assert(function () use ($jsonNode, $expectedValue) {
70
            $realValue = $this->evaluateJsonNodeValue($jsonNode);
71
            $this->asserter->phpArray($realValue)->contains($expectedValue);
72
        });
73
    }
74
75
    /**
76
     * @Then /^the JSON array node "(?P<jsonNode>[^"]*)" should not contain "(?P<expectedValue>.*)" element$/
@@ 89-95 (lines=7) @@
86
    /**
87
     * @Then /^the JSON node "(?P<jsonNode>[^"]*)" should contain "(?P<expectedValue>.*)"$/
88
     */
89
    public function theJsonNodeShouldContain($jsonNode, $expectedValue)
90
    {
91
        $this->assert(function () use ($jsonNode, $expectedValue) {
92
            $realValue = $this->evaluateJsonNodeValue($jsonNode);
93
            $this->asserter->string((string) $realValue)->contains($expectedValue);
94
        });
95
    }
96
97
    /**
98
     * Checks, that given JSON node does not contain given value
@@ 102-108 (lines=7) @@
99
     *
100
     * @Then /^the JSON node "(?P<jsonNode>[^"]*)" should not contain "(?P<unexpectedValue>.*)"$/
101
     */
102
    public function theJsonNodeShouldNotContain($jsonNode, $unexpectedValue)
103
    {
104
        $this->assert(function () use ($jsonNode, $unexpectedValue) {
105
            $realValue = $this->evaluateJsonNodeValue($jsonNode);
106
            $this->asserter->string((string) $realValue)->notContains($unexpectedValue);
107
        });
108
    }
109
110
    /**
111
     * Checks, that given JSON node exist