Code Duplication    Length = 25-25 lines in 2 locations

src/Arrayy.php 2 locations

@@ 3946-3970 (lines=25) @@
3943
3944
                /** @noinspection PhpParameterByRefIsNotUsedAsReferenceInspection */
3945
                foreach ($this->getGeneratorByReference() as $key => &$value) {
3946
                    if (
3947
                        (
3948
                            $is_array_tmp === false
3949
                            &&
3950
                            $strict === true
3951
                            &&
3952
                            $search_values === $value
3953
                        )
3954
                        ||
3955
                        (
3956
                            $is_array_tmp === false
3957
                            &&
3958
                            $strict === false
3959
                            &&
3960
                            $search_values == $value
3961
                        )
3962
                        ||
3963
                        (
3964
                            $is_array_tmp === true
3965
                            &&
3966
                            \in_array($value, $search_values, $strict)
3967
                        )
3968
                    ) {
3969
                        yield $key;
3970
                    }
3971
                }
3972
            };
3973
        }
@@ 7069-7093 (lines=25) @@
7066
            $is_array_tmp = \is_array($search_values);
7067
7068
            foreach ($input as $key => $value) {
7069
                if (
7070
                    (
7071
                        $is_array_tmp === false
7072
                        &&
7073
                        $strict === true
7074
                        &&
7075
                        $search_values === $value
7076
                    )
7077
                    ||
7078
                    (
7079
                        $is_array_tmp === false
7080
                        &&
7081
                        $strict === false
7082
                        &&
7083
                        $search_values == $value
7084
                    )
7085
                    ||
7086
                    (
7087
                        $is_array_tmp === true
7088
                        &&
7089
                        \in_array($value, $search_values, $strict)
7090
                    )
7091
                ) {
7092
                    $keys[] = $key;
7093
                }
7094
7095
                // check if recursive is needed
7096
                if (\is_array($value)) {