Code Duplication    Length = 7-10 lines in 2 locations

src/Notifynder/Parsers/NotifynderParser.php 1 location

@@ 131-140 (lines=10) @@
128
     * @param $value
129
     * @return bool
130
     */
131
    protected function isJson($value)
132
    {
133
        if ( ! is_string($value)) {
134
            return false;
135
        }
136
137
        json_decode($value);
138
139
        return (json_last_error() == JSON_ERROR_NONE);
140
    }
141
142
143
    /**

src/Notifynder/Notifications/ExtraParams.php 1 location

@@ 145-151 (lines=7) @@
142
     * @param $value
143
     * @return bool
144
     */
145
    public function isJson($value)
146
    {
147
        if (!is_string($value)) return false;
148
149
        json_decode($value);
150
        return (json_last_error() == JSON_ERROR_NONE);
151
    }
152
}