Code Duplication    Length = 25-25 lines in 2 locations

src/Arrayy.php 2 locations

@@ 3849-3873 (lines=25) @@
3846
3847
                /** @noinspection PhpParameterByRefIsNotUsedAsReferenceInspection */
3848
                foreach ($this->getGeneratorByReference() as $key => &$value) {
3849
                    if (
3850
                        (
3851
                            $is_array_tmp === false
3852
                            &&
3853
                            $strict === true
3854
                            &&
3855
                            $search_values === $value
3856
                        )
3857
                        ||
3858
                        (
3859
                            $is_array_tmp === false
3860
                            &&
3861
                            $strict === false
3862
                            &&
3863
                            $search_values == $value
3864
                        )
3865
                        ||
3866
                        (
3867
                            $is_array_tmp === true
3868
                            &&
3869
                            \in_array($value, $search_values, $strict)
3870
                        )
3871
                    ) {
3872
                        yield $key;
3873
                    }
3874
                }
3875
            };
3876
        }
@@ 6928-6952 (lines=25) @@
6925
            $is_array_tmp = \is_array($search_values);
6926
6927
            foreach ($input as $key => $value) {
6928
                if (
6929
                    (
6930
                        $is_array_tmp === false
6931
                        &&
6932
                        $strict === true
6933
                        &&
6934
                        $search_values === $value
6935
                    )
6936
                    ||
6937
                    (
6938
                        $is_array_tmp === false
6939
                        &&
6940
                        $strict === false
6941
                        &&
6942
                        $search_values == $value
6943
                    )
6944
                    ||
6945
                    (
6946
                        $is_array_tmp === true
6947
                        &&
6948
                        \in_array($value, $search_values, $strict)
6949
                    )
6950
                ) {
6951
                    $keys[] = $key;
6952
                }
6953
6954
                // check if recursive is needed
6955
                if (\is_array($value)) {