private function formatPoints($points)
    {
        $ipoints = [];
        $count = 1;

        foreach ($points as $key => $value) {
            if ($count%2 === 0) {
                $y = $value;
                $ipoints[] = ['x' => $x, 'y' => $y];
            } else {
                $x = $value;
            }
            $count++;
        }

        return $ipoints;
    }
private function formatPoints($points)
    {
        $ipoints = [];
        $count = 1;

        foreach ($points as $key => $value) {
            if ($count%2 === 0) {
                $y = $value;
                $ipoints[] = ['x' => $x, 'y' => $y];
            } else {
                $x = $value;
            }
            $count++;
        }

        return $ipoints;
    }
private function formatPoints ( $ points ) { $ ipoints = [ ] ; $ count = 1 ; foreach ( $ points as $ key => $ value ) { if ( $ count % 2 === 0 ) { $ y = $ value ; $ ipoints [ ] = [ 'x' => $ x , 'y' => $ y ] ; } else { $ x = $ value ; } $ count ++ ; } return $ ipoints ; }
Format polygon points to Imagick format

@param  Array $points
@return Array
Format polygon points to Imagick format