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
        }
@@ 7067-7091 (lines=25) @@
7064
            $is_array_tmp = \is_array($search_values);
7065
7066
            foreach ($input as $key => $value) {
7067
                if (
7068
                    (
7069
                        $is_array_tmp === false
7070
                        &&
7071
                        $strict === true
7072
                        &&
7073
                        $search_values === $value
7074
                    )
7075
                    ||
7076
                    (
7077
                        $is_array_tmp === false
7078
                        &&
7079
                        $strict === false
7080
                        &&
7081
                        $search_values == $value
7082
                    )
7083
                    ||
7084
                    (
7085
                        $is_array_tmp === true
7086
                        &&
7087
                        \in_array($value, $search_values, $strict)
7088
                    )
7089
                ) {
7090
                    $keys[] = $key;
7091
                }
7092
7093
                // check if recursive is needed
7094
                if (\is_array($value)) {