Code Duplication    Length = 13-13 lines in 6 locations

src/matcher/ToBeAnInstanceOf.php 2 locations

@@ 76-88 (lines=13) @@
73
    /**
74
     * {@inheritdoc}
75
     */
76
    public function reportFailed(FailedMessage $message)
77
    {
78
        $message->appendText('Expected ')
79
            ->appendText($this->className)
80
            ->appendText(' to be an instance of ')
81
            ->appendText($this->expected)
82
            ->appendText("\n\n")
83
            ->appendText('    expected: ')
84
            ->appendText($this->expected)
85
            ->appendText("\n")
86
            ->appendText('         got: ')
87
            ->appendText($this->className);
88
    }
89
90
    /**
91
     * {@inheritdoc}
@@ 93-105 (lines=13) @@
90
    /**
91
     * {@inheritdoc}
92
     */
93
    public function reportNegativeFailed(FailedMessage $message)
94
    {
95
        $message->appendText('Expected ')
96
            ->appendText($this->className)
97
            ->appendText(' not to be an instance of ')
98
            ->appendText($this->expected)
99
            ->appendText("\n\n")
100
            ->appendText('    expected not: ')
101
            ->appendText($this->expected)
102
            ->appendText("\n")
103
            ->appendText('             got: ')
104
            ->appendText($this->className);
105
    }
106
}
107

src/matcher/ToEqual.php 2 locations

@@ 62-74 (lines=13) @@
59
    /**
60
     * {@inheritdoc}
61
     */
62
    public function reportFailed(FailedMessage $message)
63
    {
64
        $message->appendText("Expected ")
65
            ->appendValue($this->actual)
66
            ->appendText(' to be ')
67
            ->appendValue($this->expected)
68
            ->appendText("\n\n")
69
            ->appendText('    expected: ')
70
            ->appendValue($this->expected)
71
            ->appendText("\n")
72
            ->appendText('         got: ')
73
            ->appendValue($this->actual);
74
    }
75
76
    /**
77
     * {@inheritdoc}
@@ 79-91 (lines=13) @@
76
    /**
77
     * {@inheritdoc}
78
     */
79
    public function reportNegativeFailed(FailedMessage $message)
80
    {
81
        $message->appendText("Expected ")
82
            ->appendValue($this->actual)
83
            ->appendText(' not to be ')
84
            ->appendValue($this->expected)
85
            ->appendText("\n\n")
86
            ->appendText('    expected not: ')
87
            ->appendValue($this->expected)
88
            ->appendText("\n")
89
            ->appendText('             got: ')
90
            ->appendValue($this->actual);
91
    }
92
}
93

src/matcher/ToHaveLength.php 2 locations

@@ 87-99 (lines=13) @@
84
    /**
85
     * {@inheritdoc}
86
     */
87
    public function reportFailed(FailedMessage $message)
88
    {
89
        $message->appendText('Expected ')
90
            ->appendText($this->type)
91
            ->appendText(' to have a length of ')
92
            ->appendText($this->expected)
93
            ->appendText("\n\n")
94
            ->appendText('    expected: ')
95
            ->appendValue($this->expected)
96
            ->appendText("\n")
97
            ->appendText('      length: ')
98
            ->appendValue($this->length);
99
    }
100
101
    /**
102
     * {@inheritdoc}
@@ 104-116 (lines=13) @@
101
    /**
102
     * {@inheritdoc}
103
     */
104
    public function reportNegativeFailed(FailedMessage $message)
105
    {
106
        $message->appendText('Expected ')
107
            ->appendText($this->type)
108
            ->appendText(' not to have a length of ')
109
            ->appendValue($this->expected)
110
            ->appendText("\n\n")
111
            ->appendText('    expected not: ')
112
            ->appendValue($this->expected)
113
            ->appendText("\n")
114
            ->appendText('          length: ')
115
            ->appendValue($this->length);
116
    }
117
}
118