Code Duplication    Length = 3-3 lines in 2 locations

src/Solr/SolrIndex.php 2 locations

@@ 560-562 (lines=3) @@
557
                }
558
559
                /* Solr requires numbers to be valid if presented, not just empty */
560
                if (($type == 'tint' || $type == 'tfloat' || $type == 'tdouble') && !is_numeric($sub)) {
561
                    continue;
562
                }
563
564
                $doc->addField($field['name'], $sub);
565
            }
@@ 576-578 (lines=3) @@
573
            }
574
575
            /* Solr requires numbers to be valid if presented, not just empty */
576
            if (($type == 'tint' || $type == 'tfloat' || $type == 'tdouble') && !is_numeric($value)) {
577
                return;
578
            }
579
580
            // Only index fields that are not null
581
            if ($value !== null) {