Code Duplication    Length = 25-25 lines in 2 locations

src/Arrayy.php 2 locations

@@ 3744-3768 (lines=25) @@
3741
3742
                /** @noinspection PhpParameterByRefIsNotUsedAsReferenceInspection */
3743
                foreach ($this->getGeneratorByReference() as $key => &$value) {
3744
                    if (
3745
                        (
3746
                            $is_array_tmp === false
3747
                            &&
3748
                            $strict === true
3749
                            &&
3750
                            $search_values === $value
3751
                        )
3752
                        ||
3753
                        (
3754
                            $is_array_tmp === false
3755
                            &&
3756
                            $strict === false
3757
                            &&
3758
                            $search_values == $value
3759
                        )
3760
                        ||
3761
                        (
3762
                            $is_array_tmp === true
3763
                            &&
3764
                            \in_array($value, $search_values, $strict)
3765
                        )
3766
                    ) {
3767
                        yield $key;
3768
                    }
3769
                }
3770
            };
3771
        }
@@ 6827-6851 (lines=25) @@
6824
            $is_array_tmp = \is_array($search_values);
6825
6826
            foreach ($input as $key => $value) {
6827
                if (
6828
                    (
6829
                        $is_array_tmp === false
6830
                        &&
6831
                        $strict === true
6832
                        &&
6833
                        $search_values === $value
6834
                    )
6835
                    ||
6836
                    (
6837
                        $is_array_tmp === false
6838
                        &&
6839
                        $strict === false
6840
                        &&
6841
                        $search_values == $value
6842
                    )
6843
                    ||
6844
                    (
6845
                        $is_array_tmp === true
6846
                        &&
6847
                        \in_array($value, $search_values, $strict)
6848
                    )
6849
                ) {
6850
                    $keys[] = $key;
6851
                }
6852
6853
                // check if recursive is needed
6854
                if (\is_array($value)) {