Code Duplication    Length = 25-25 lines in 2 locations

src/Arrayy.php 2 locations

@@ 4016-4040 (lines=25) @@
4013
4014
                /** @noinspection PhpParameterByRefIsNotUsedAsReferenceInspection */
4015
                foreach ($this->getGeneratorByReference() as $key => &$value) {
4016
                    if (
4017
                        (
4018
                            $is_array_tmp === false
4019
                            &&
4020
                            $strict === true
4021
                            &&
4022
                            $search_values === $value
4023
                        )
4024
                        ||
4025
                        (
4026
                            $is_array_tmp === false
4027
                            &&
4028
                            $strict === false
4029
                            &&
4030
                            $search_values == $value
4031
                        )
4032
                        ||
4033
                        (
4034
                            $is_array_tmp === true
4035
                            &&
4036
                            \in_array($value, $search_values, $strict)
4037
                        )
4038
                    ) {
4039
                        yield $key;
4040
                    }
4041
                }
4042
            };
4043
        }
@@ 7171-7195 (lines=25) @@
7168
            $is_array_tmp = \is_array($search_values);
7169
7170
            foreach ($input as $key => $value) {
7171
                if (
7172
                    (
7173
                        $is_array_tmp === false
7174
                        &&
7175
                        $strict === true
7176
                        &&
7177
                        $search_values === $value
7178
                    )
7179
                    ||
7180
                    (
7181
                        $is_array_tmp === false
7182
                        &&
7183
                        $strict === false
7184
                        &&
7185
                        $search_values == $value
7186
                    )
7187
                    ||
7188
                    (
7189
                        $is_array_tmp === true
7190
                        &&
7191
                        \in_array($value, $search_values, $strict)
7192
                    )
7193
                ) {
7194
                    $keys[] = $key;
7195
                }
7196
7197
                // check if recursive is needed
7198
                if (\is_array($value)) {