Code Duplication    Length = 25-25 lines in 2 locations

src/Arrayy.php 2 locations

@@ 3895-3919 (lines=25) @@
3892
3893
                /** @noinspection PhpParameterByRefIsNotUsedAsReferenceInspection */
3894
                foreach ($this->getGeneratorByReference() as $key => &$value) {
3895
                    if (
3896
                        (
3897
                            $is_array_tmp === false
3898
                            &&
3899
                            $strict === true
3900
                            &&
3901
                            $search_values === $value
3902
                        )
3903
                        ||
3904
                        (
3905
                            $is_array_tmp === false
3906
                            &&
3907
                            $strict === false
3908
                            &&
3909
                            $search_values == $value
3910
                        )
3911
                        ||
3912
                        (
3913
                            $is_array_tmp === true
3914
                            &&
3915
                            \in_array($value, $search_values, $strict)
3916
                        )
3917
                    ) {
3918
                        yield $key;
3919
                    }
3920
                }
3921
            };
3922
        }
@@ 6987-7011 (lines=25) @@
6984
            $is_array_tmp = \is_array($search_values);
6985
6986
            foreach ($input as $key => $value) {
6987
                if (
6988
                    (
6989
                        $is_array_tmp === false
6990
                        &&
6991
                        $strict === true
6992
                        &&
6993
                        $search_values === $value
6994
                    )
6995
                    ||
6996
                    (
6997
                        $is_array_tmp === false
6998
                        &&
6999
                        $strict === false
7000
                        &&
7001
                        $search_values == $value
7002
                    )
7003
                    ||
7004
                    (
7005
                        $is_array_tmp === true
7006
                        &&
7007
                        \in_array($value, $search_values, $strict)
7008
                    )
7009
                ) {
7010
                    $keys[] = $key;
7011
                }
7012
7013
                // check if recursive is needed
7014
                if (\is_array($value)) {