private function getIndex($searchedHour, $hours)
    {
        foreach ($hours as $index => $hour) {
            if ($hour == $searchedHour) {
                return $index;
            }
        }
    }
private function getIndex($searchedHour, $hours)
    {
        foreach ($hours as $index => $hour) {
            if ($hour == $searchedHour) {
                return $index;
            }
        }
    }
private function getIndex ( $ searchedHour , $ hours ) { foreach ( $ hours as $ index => $ hour ) { if ( $ hour == $ searchedHour ) { return $ index ; } } }
returns index of the given value in array
returns index of the given value in array