Code Duplication    Length = 15-15 lines in 2 locations

src/Arrayy.php 2 locations

@@ 2355-2369 (lines=15) @@
2352
   *
2353
   * @return static <p>(Mutable) Return this Arrayy object, with pushed elements to the end of array.</p>
2354
   */
2355
  public function push(/* variadic arguments allowed */)
2356
  {
2357
    if (func_num_args()) {
2358
      $args = \array_merge(array(&$this->array), func_get_args());
2359
      if (Bootup::is_php('5.6')) {
2360
        /** @noinspection PhpLanguageLevelInspection */
2361
        array_push(...$args);
2362
      } else {
2363
        /** @noinspection ArgumentUnpackingCanBeUsedInspection */
2364
        call_user_func_array('array_push', $args);
2365
      }
2366
    }
2367
2368
    return $this;
2369
  }
2370
2371
  /**
2372
   * Get a random value from the current array.
@@ 3275-3289 (lines=15) @@
3272
   *
3273
   * @return static <p>(Mutable) Return this Arrayy object, with prepended elements to the beginning of array.</p>
3274
   */
3275
  public function unshift(/* variadic arguments allowed */)
3276
  {
3277
    if (func_num_args()) {
3278
      $args = \array_merge(array(&$this->array), func_get_args());
3279
      if (Bootup::is_php('5.6')) {
3280
        /** @noinspection PhpLanguageLevelInspection */
3281
        array_unshift(...$args);
3282
      } else {
3283
        /** @noinspection ArgumentUnpackingCanBeUsedInspection */
3284
        call_user_func_array('array_unshift', $args);
3285
      }
3286
    }
3287
3288
    return $this;
3289
  }
3290
3291
  /**
3292
   * Get all values from a array.