Code Duplication    Length = 25-25 lines in 2 locations

src/Arrayy.php 2 locations

@@ 3977-4001 (lines=25) @@
3974
3975
                /** @noinspection PhpParameterByRefIsNotUsedAsReferenceInspection */
3976
                foreach ($this->getGeneratorByReference() as $key => &$value) {
3977
                    if (
3978
                        (
3979
                            $is_array_tmp === false
3980
                            &&
3981
                            $strict === true
3982
                            &&
3983
                            $search_values === $value
3984
                        )
3985
                        ||
3986
                        (
3987
                            $is_array_tmp === false
3988
                            &&
3989
                            $strict === false
3990
                            &&
3991
                            $search_values == $value
3992
                        )
3993
                        ||
3994
                        (
3995
                            $is_array_tmp === true
3996
                            &&
3997
                            \in_array($value, $search_values, $strict)
3998
                        )
3999
                    ) {
4000
                        yield $key;
4001
                    }
4002
                }
4003
            };
4004
        }
@@ 7120-7144 (lines=25) @@
7117
            $is_array_tmp = \is_array($search_values);
7118
7119
            foreach ($input as $key => $value) {
7120
                if (
7121
                    (
7122
                        $is_array_tmp === false
7123
                        &&
7124
                        $strict === true
7125
                        &&
7126
                        $search_values === $value
7127
                    )
7128
                    ||
7129
                    (
7130
                        $is_array_tmp === false
7131
                        &&
7132
                        $strict === false
7133
                        &&
7134
                        $search_values == $value
7135
                    )
7136
                    ||
7137
                    (
7138
                        $is_array_tmp === true
7139
                        &&
7140
                        \in_array($value, $search_values, $strict)
7141
                    )
7142
                ) {
7143
                    $keys[] = $key;
7144
                }
7145
7146
                // check if recursive is needed
7147
                if (\is_array($value)) {