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
        }
@@ 6843-6867 (lines=25) @@
6840
            $is_array_tmp = \is_array($search_values);
6841
6842
            foreach ($input as $key => $value) {
6843
                if (
6844
                    (
6845
                        $is_array_tmp === false
6846
                        &&
6847
                        $strict === true
6848
                        &&
6849
                        $search_values === $value
6850
                    )
6851
                    ||
6852
                    (
6853
                        $is_array_tmp === false
6854
                        &&
6855
                        $strict === false
6856
                        &&
6857
                        $search_values == $value
6858
                    )
6859
                    ||
6860
                    (
6861
                        $is_array_tmp === true
6862
                        &&
6863
                        \in_array($value, $search_values, $strict)
6864
                    )
6865
                ) {
6866
                    $keys[] = $key;
6867
                }
6868
6869
                // check if recursive is needed
6870
                if (\is_array($value)) {