Code Duplication    Length = 25-25 lines in 2 locations

src/Arrayy.php 2 locations

@@ 4036-4060 (lines=25) @@
4033
4034
                /** @noinspection PhpParameterByRefIsNotUsedAsReferenceInspection */
4035
                foreach ($this->getGeneratorByReference() as $key => &$value) {
4036
                    if (
4037
                        (
4038
                            $is_array_tmp === false
4039
                            &&
4040
                            $strict === true
4041
                            &&
4042
                            $search_values === $value
4043
                        )
4044
                        ||
4045
                        (
4046
                            $is_array_tmp === false
4047
                            &&
4048
                            $strict === false
4049
                            &&
4050
                            $search_values == $value
4051
                        )
4052
                        ||
4053
                        (
4054
                            $is_array_tmp === true
4055
                            &&
4056
                            \in_array($value, $search_values, $strict)
4057
                        )
4058
                    ) {
4059
                        yield $key;
4060
                    }
4061
                }
4062
            };
4063
        }
@@ 7203-7227 (lines=25) @@
7200
            $is_array_tmp = \is_array($search_values);
7201
7202
            foreach ($input as $key => $value) {
7203
                if (
7204
                    (
7205
                        $is_array_tmp === false
7206
                        &&
7207
                        $strict === true
7208
                        &&
7209
                        $search_values === $value
7210
                    )
7211
                    ||
7212
                    (
7213
                        $is_array_tmp === false
7214
                        &&
7215
                        $strict === false
7216
                        &&
7217
                        $search_values == $value
7218
                    )
7219
                    ||
7220
                    (
7221
                        $is_array_tmp === true
7222
                        &&
7223
                        \in_array($value, $search_values, $strict)
7224
                    )
7225
                ) {
7226
                    $keys[] = $key;
7227
                }
7228
7229
                // check if recursive is needed
7230
                if (\is_array($value)) {