Code Duplication    Length = 25-25 lines in 2 locations

src/Arrayy.php 2 locations

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