Code Duplication    Length = 25-25 lines in 2 locations

src/Arrayy.php 2 locations

@@ 3987-4011 (lines=25) @@
3984
3985
                /** @noinspection PhpParameterByRefIsNotUsedAsReferenceInspection */
3986
                foreach ($this->getGeneratorByReference() as $key => &$value) {
3987
                    if (
3988
                        (
3989
                            $is_array_tmp === false
3990
                            &&
3991
                            $strict === true
3992
                            &&
3993
                            $search_values === $value
3994
                        )
3995
                        ||
3996
                        (
3997
                            $is_array_tmp === false
3998
                            &&
3999
                            $strict === false
4000
                            &&
4001
                            $search_values == $value
4002
                        )
4003
                        ||
4004
                        (
4005
                            $is_array_tmp === true
4006
                            &&
4007
                            \in_array($value, $search_values, $strict)
4008
                        )
4009
                    ) {
4010
                        yield $key;
4011
                    }
4012
                }
4013
            };
4014
        }
@@ 7125-7149 (lines=25) @@
7122
            $is_array_tmp = \is_array($search_values);
7123
7124
            foreach ($input as $key => $value) {
7125
                if (
7126
                    (
7127
                        $is_array_tmp === false
7128
                        &&
7129
                        $strict === true
7130
                        &&
7131
                        $search_values === $value
7132
                    )
7133
                    ||
7134
                    (
7135
                        $is_array_tmp === false
7136
                        &&
7137
                        $strict === false
7138
                        &&
7139
                        $search_values == $value
7140
                    )
7141
                    ||
7142
                    (
7143
                        $is_array_tmp === true
7144
                        &&
7145
                        \in_array($value, $search_values, $strict)
7146
                    )
7147
                ) {
7148
                    $keys[] = $key;
7149
                }
7150
7151
                // check if recursive is needed
7152
                if (\is_array($value)) {