Code Duplication    Length = 10-10 lines in 2 locations

src/FlexiPeeHP/FlexiBeeRW.php 2 locations

@@ 204-213 (lines=10) @@
201
     *
202
     * @return string FlexiBee Date or NULL
203
     */
204
    public static function timestampToFlexiDate($timpestamp = null)
205
    {
206
        $flexiDate = null;
207
        if (!is_null($timpestamp)) {
208
            $date      = new \DateTime();
209
            $date->setTimestamp($timpestamp);
210
            $flexiDate = $date->format('Y-m-d');
211
        }
212
        return $flexiDate;
213
    }
214
215
    /**
216
     * Convert Timestamp to Flexi DateTime format.
@@ 222-231 (lines=10) @@
219
     *
220
     * @return string FlexiBee DateTime or NULL
221
     */
222
    public static function timestampToFlexiDateTime($timpestamp = null)
223
    {
224
        $flexiDateTime = null;
225
        if (!is_null($timpestamp)) {
226
            $date          = new \DateTime();
227
            $date->setTimestamp($timpestamp);
228
            $flexiDateTime = $date->format('Y-m-dTH:i:s');
229
        }
230
        return $flexiDateTime;
231
    }
232
233
    /**
234
     * Add Data to evidence Branch