<?php

namespace App\Classes\Modules\Segments\Services;

class RemoveItemFromConstantValueArray
{

    /**
     * @param array $array
     * @param $item
     * @return array
     */
    public function execute($array, $item): array {
        foreach($array as $key => $value){
            if($array[$key] == $item){
                unset($array[$key]);
            }
        }
        return array_values($array);
    }

}