Code Duplication    Length = 28-28 lines in 2 locations

classes/PodsUI.php 2 locations

@@ 4320-4347 (lines=28) @@
4317
4318
                        $value = null;
4319
4320
                        if ( is_object( $this->pod ) )
4321
                            $value = $this->pod->field( $the_match, true );
4322
                        else {
4323
                            if ( empty( $row ) )
4324
                                $row = $this->row;
4325
4326
                            if ( isset( $row[ $the_match ] ) ) {
4327
                                if ( is_array( $row[ $the_match ] ) ) {
4328
                                    if ( false !== strpos( $the_match, '.' ) ) {
4329
                                        $the_matches = explode( '.', $the_match );
4330
4331
                                        $value = $row[ $the_match ];
4332
4333
                                        foreach ( $the_matches as $m ) {
4334
                                            if ( is_array( $value ) && isset( $value[ $m ] ) )
4335
                                                $value = $value[ $m ];
4336
                                            else {
4337
                                                $value = null;
4338
4339
                                                break;
4340
                                            }
4341
                                        }
4342
                                    }
4343
                                }
4344
                                else
4345
                                    $value = $row[ $the_match ];
4346
                            }
4347
                        }
4348
4349
                        if ( is_array( $value ) ) {
4350
                            if ( !in_array( $the_match, $value ) )
@@ 4378-4405 (lines=28) @@
4375
                else {
4376
                    $value = null;
4377
4378
                    if ( is_object( $this->pod ) )
4379
                        $value = $this->pod->field( $match, true );
4380
                    else {
4381
                        if ( empty( $row ) )
4382
                            $row = $this->row;
4383
4384
                        if ( isset( $row[ $match ] ) ) {
4385
                            if ( is_array( $row[ $match ] ) ) {
4386
                                if ( false !== strpos( $match, '.' ) ) {
4387
                                    $matches = explode( '.', $match );
4388
4389
                                    $value = $row[ $match ];
4390
4391
                                    foreach ( $matches as $m ) {
4392
                                        if ( is_array( $value ) && isset( $value[ $m ] ) )
4393
                                            $value = $value[ $m ];
4394
                                        else {
4395
                                            $value = null;
4396
4397
                                            break;
4398
                                        }
4399
                                    }
4400
                                }
4401
                            }
4402
                            else
4403
                                $value = $row[ $match ];
4404
                        }
4405
                    }
4406
4407
                    if ( is_array( $value ) ) {
4408
                        if ( !in_array( $match, $value ) )