Code Duplication    Length = 25-25 lines in 2 locations

src/Arrayy.php 2 locations

@@ 2564-2588 (lines=25) @@
2561
                $is_array_tmp = \is_array($search_values);
2562
2563
                foreach ($this->getGenerator() as $key => $value) {
2564
                    if (
2565
                        (
2566
                            $is_array_tmp === false
2567
                            &&
2568
                            $strict === true
2569
                            &&
2570
                            $search_values === $value
2571
                        )
2572
                        ||
2573
                        (
2574
                            $is_array_tmp === false
2575
                            &&
2576
                            $strict === false
2577
                            &&
2578
                            $search_values == $value
2579
                        )
2580
                        ||
2581
                        (
2582
                            $is_array_tmp === true
2583
                            &&
2584
                            \in_array($value, $search_values, $strict)
2585
                        )
2586
                    ) {
2587
                        yield $key;
2588
                    }
2589
                }
2590
            };
2591
        }
@@ 4739-4763 (lines=25) @@
4736
            $is_array_tmp = \is_array($search_values);
4737
4738
            foreach ($input as $key => $value) {
4739
                if (
4740
                    (
4741
                        $is_array_tmp === false
4742
                        &&
4743
                        $strict === true
4744
                        &&
4745
                        $search_values === $value
4746
                    )
4747
                    ||
4748
                    (
4749
                        $is_array_tmp === false
4750
                        &&
4751
                        $strict === false
4752
                        &&
4753
                        $search_values == $value
4754
                    )
4755
                    ||
4756
                    (
4757
                        $is_array_tmp === true
4758
                        &&
4759
                        \in_array($value, $search_values, $strict)
4760
                    )
4761
                ) {
4762
                    $keys[] = $key;
4763
                }
4764
4765
                // check if recursive is needed
4766
                if (\is_array($value) === true) {