Code Duplication    Length = 25-25 lines in 2 locations

src/Arrayy.php 2 locations

@@ 3504-3528 (lines=25) @@
3501
3502
                /** @noinspection PhpParameterByRefIsNotUsedAsReferenceInspection */
3503
                foreach ($this->getGeneratorByReference() as $key => &$value) {
3504
                    if (
3505
                        (
3506
                            $is_array_tmp === false
3507
                            &&
3508
                            $strict === true
3509
                            &&
3510
                            $search_values === $value
3511
                        )
3512
                        ||
3513
                        (
3514
                            $is_array_tmp === false
3515
                            &&
3516
                            $strict === false
3517
                            &&
3518
                            $search_values == $value
3519
                        )
3520
                        ||
3521
                        (
3522
                            $is_array_tmp === true
3523
                            &&
3524
                            \in_array($value, $search_values, $strict)
3525
                        )
3526
                    ) {
3527
                        yield $key;
3528
                    }
3529
                }
3530
            };
3531
        }
@@ 6241-6265 (lines=25) @@
6238
            $is_array_tmp = \is_array($search_values);
6239
6240
            foreach ($input as $key => $value) {
6241
                if (
6242
                    (
6243
                        $is_array_tmp === false
6244
                        &&
6245
                        $strict === true
6246
                        &&
6247
                        $search_values === $value
6248
                    )
6249
                    ||
6250
                    (
6251
                        $is_array_tmp === false
6252
                        &&
6253
                        $strict === false
6254
                        &&
6255
                        $search_values == $value
6256
                    )
6257
                    ||
6258
                    (
6259
                        $is_array_tmp === true
6260
                        &&
6261
                        \in_array($value, $search_values, $strict)
6262
                    )
6263
                ) {
6264
                    $keys[] = $key;
6265
                }
6266
6267
                // check if recursive is needed
6268
                if (\is_array($value) === true) {