Code Duplication    Length = 8-8 lines in 3 locations

classes/fields/date.php 1 location

@@ 243-250 (lines=8) @@
240
     * @return mixed|null|string
241
     * @since 2.0
242
     */
243
    public function ui ( $id, $value, $name = null, $options = null, $fields = null, $pod = null ) {
244
        $value = $this->display( $value, $name, $options, $pod, $id );
245
246
        if ( 1 == pods_var( self::$type . '_allow_empty', $options, 1 ) && ( empty( $value ) || in_array( $value, array( '0000-00-00', '0000-00-00 00:00:00', '00:00:00' ) ) ) )
247
            $value = false;
248
249
        return $value;
250
    }
251
252
    /**
253
     * Build date/time format string based on options

classes/fields/datetime.php 1 location

@@ 290-297 (lines=8) @@
287
     * @return mixed|null|string
288
     * @since 2.0
289
     */
290
    public function ui ( $id, $value, $name = null, $options = null, $fields = null, $pod = null ) {
291
        $value = $this->display( $value, $name, $options, $pod, $id );
292
293
        if ( 1 == pods_var( self::$type . '_allow_empty', $options, 1 ) && ( empty( $value ) || in_array( $value, array( '0000-00-00', '0000-00-00 00:00:00', '00:00:00' ) ) ) )
294
            $value = false;
295
296
        return $value;
297
    }
298
299
    /**
300
     * Build date/time format string based on options

classes/fields/time.php 1 location

@@ 253-260 (lines=8) @@
250
     * @return mixed|null|string
251
     * @since 2.0
252
     */
253
    public function ui ( $id, $value, $name = null, $options = null, $fields = null, $pod = null ) {
254
        $value = $this->display( $value, $name, $options, $pod, $id );
255
256
        if ( 1 == pods_var( self::$type . '_allow_empty', $options, 1 ) && ( empty( $value ) || in_array( $value, array( '0000-00-00', '0000-00-00 00:00:00', '00:00:00' ) ) ) )
257
            $value = false;
258
259
        return $value;
260
    }
261
262
    /**
263
     * Build date/time format string based on options