Code Duplication    Length = 25-25 lines in 2 locations

src/Arrayy.php 2 locations

@@ 3876-3900 (lines=25) @@
3873
3874
                /** @noinspection PhpParameterByRefIsNotUsedAsReferenceInspection */
3875
                foreach ($this->getGeneratorByReference() as $key => &$value) {
3876
                    if (
3877
                        (
3878
                            $is_array_tmp === false
3879
                            &&
3880
                            $strict === true
3881
                            &&
3882
                            $search_values === $value
3883
                        )
3884
                        ||
3885
                        (
3886
                            $is_array_tmp === false
3887
                            &&
3888
                            $strict === false
3889
                            &&
3890
                            $search_values == $value
3891
                        )
3892
                        ||
3893
                        (
3894
                            $is_array_tmp === true
3895
                            &&
3896
                            \in_array($value, $search_values, $strict)
3897
                        )
3898
                    ) {
3899
                        yield $key;
3900
                    }
3901
                }
3902
            };
3903
        }
@@ 6968-6992 (lines=25) @@
6965
            $is_array_tmp = \is_array($search_values);
6966
6967
            foreach ($input as $key => $value) {
6968
                if (
6969
                    (
6970
                        $is_array_tmp === false
6971
                        &&
6972
                        $strict === true
6973
                        &&
6974
                        $search_values === $value
6975
                    )
6976
                    ||
6977
                    (
6978
                        $is_array_tmp === false
6979
                        &&
6980
                        $strict === false
6981
                        &&
6982
                        $search_values == $value
6983
                    )
6984
                    ||
6985
                    (
6986
                        $is_array_tmp === true
6987
                        &&
6988
                        \in_array($value, $search_values, $strict)
6989
                    )
6990
                ) {
6991
                    $keys[] = $key;
6992
                }
6993
6994
                // check if recursive is needed
6995
                if (\is_array($value)) {