Code Duplication    Length = 25-25 lines in 2 locations

src/Arrayy.php 2 locations

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