public static function getClosest(
        $latitude1,
        $longitude1,
        $items,
        $decimals = 1,
        $unit = 'km'
    ) {
        // init result
        $distances = array();

        // loop items
        foreach ($items as $key => $item) {
            // define second item
            $latitude2 = $item['latitude'];
            $longitude2 = $item['longitude'];

            // define distance
            $distance = self::between(
                $latitude1,
                $longitude1,
                $latitude2,
                $longitude2,
                10,
                $unit
            );

            // add distance
            $distances[$distance] = $key;

            // add rounded distance to array
            $items[$key]['distance'] = round($distance, $decimals);
        }

        // return the item with the closest distance
        return $items[$distances[min(array_keys($distances))]];
    }