src/Gpupo/Coordinate/Conversion.php
public function setDMS($string)
    {

        $string = preg_replace(
            "/[^a-zA-Z0-9,.\s]/",
            ' ',
            trim($string)
        );

        $string = str_replace(
            array('S', 'N', 'E', 'W'),
            array(' S', ' N', ' E', ' W'),
            strtoupper($string)
        );

        $string = preg_replace(
            '/\s+/',
            ' ',
            $string
        );

        $this->dms = explode(' ',$string);
    }
public function setDMS($string)
    {

        $string = preg_replace(
            "/[^a-zA-Z0-9,.\s]/",
            ' ',
            trim($string)
        );

        $string = str_replace(
            array('S', 'N', 'E', 'W'),
            array(' S', ' N', ' E', ' W'),
            strtoupper($string)
        );

        $string = preg_replace(
            '/\s+/',
            ' ',
            $string
        );

        $this->dms = explode(' ',$string);
    }
public function setDMS ( $ string ) { $ string = preg_replace ( "/[^a-zA-Z0-9,.\s]/" , ' ' , trim ( $ string ) ) ; $ string = str_replace ( array ( 'S' , 'N' , 'E' , 'W' ) , array ( ' S' , ' N' , ' E' , ' W' ) , strtoupper ( $ string ) ) ; $ string = preg_replace ( '/\s+/' , ' ' , $ string ) ; $ this -> dms = explode ( ' ' , $ string ) ; }
Clean input DMS and set as array.
Clean input DMS and set as array .