Code Duplication    Length = 25-25 lines in 2 locations

src/Arrayy.php 2 locations

@@ 3859-3883 (lines=25) @@
3856
3857
                /** @noinspection PhpParameterByRefIsNotUsedAsReferenceInspection */
3858
                foreach ($this->getGeneratorByReference() as $key => &$value) {
3859
                    if (
3860
                        (
3861
                            $is_array_tmp === false
3862
                            &&
3863
                            $strict === true
3864
                            &&
3865
                            $search_values === $value
3866
                        )
3867
                        ||
3868
                        (
3869
                            $is_array_tmp === false
3870
                            &&
3871
                            $strict === false
3872
                            &&
3873
                            $search_values == $value
3874
                        )
3875
                        ||
3876
                        (
3877
                            $is_array_tmp === true
3878
                            &&
3879
                            \in_array($value, $search_values, $strict)
3880
                        )
3881
                    ) {
3882
                        yield $key;
3883
                    }
3884
                }
3885
            };
3886
        }
@@ 6941-6965 (lines=25) @@
6938
            $is_array_tmp = \is_array($search_values);
6939
6940
            foreach ($input as $key => $value) {
6941
                if (
6942
                    (
6943
                        $is_array_tmp === false
6944
                        &&
6945
                        $strict === true
6946
                        &&
6947
                        $search_values === $value
6948
                    )
6949
                    ||
6950
                    (
6951
                        $is_array_tmp === false
6952
                        &&
6953
                        $strict === false
6954
                        &&
6955
                        $search_values == $value
6956
                    )
6957
                    ||
6958
                    (
6959
                        $is_array_tmp === true
6960
                        &&
6961
                        \in_array($value, $search_values, $strict)
6962
                    )
6963
                ) {
6964
                    $keys[] = $key;
6965
                }
6966
6967
                // check if recursive is needed
6968
                if (\is_array($value)) {