Code Duplication    Length = 25-25 lines in 2 locations

src/Arrayy.php 2 locations

@@ 3511-3535 (lines=25) @@
3508
3509
                /** @noinspection PhpParameterByRefIsNotUsedAsReferenceInspection */
3510
                foreach ($this->getGeneratorByReference() as $key => &$value) {
3511
                    if (
3512
                        (
3513
                            $is_array_tmp === false
3514
                            &&
3515
                            $strict === true
3516
                            &&
3517
                            $search_values === $value
3518
                        )
3519
                        ||
3520
                        (
3521
                            $is_array_tmp === false
3522
                            &&
3523
                            $strict === false
3524
                            &&
3525
                            $search_values == $value
3526
                        )
3527
                        ||
3528
                        (
3529
                            $is_array_tmp === true
3530
                            &&
3531
                            \in_array($value, $search_values, $strict)
3532
                        )
3533
                    ) {
3534
                        yield $key;
3535
                    }
3536
                }
3537
            };
3538
        }
@@ 6258-6282 (lines=25) @@
6255
            $is_array_tmp = \is_array($search_values);
6256
6257
            foreach ($input as $key => $value) {
6258
                if (
6259
                    (
6260
                        $is_array_tmp === false
6261
                        &&
6262
                        $strict === true
6263
                        &&
6264
                        $search_values === $value
6265
                    )
6266
                    ||
6267
                    (
6268
                        $is_array_tmp === false
6269
                        &&
6270
                        $strict === false
6271
                        &&
6272
                        $search_values == $value
6273
                    )
6274
                    ||
6275
                    (
6276
                        $is_array_tmp === true
6277
                        &&
6278
                        \in_array($value, $search_values, $strict)
6279
                    )
6280
                ) {
6281
                    $keys[] = $key;
6282
                }
6283
6284
                // check if recursive is needed
6285
                if (\is_array($value) === true) {