src/Pro6pp.php
public function determinePostalType($postalcode)
    {
        $postalcode = str_replace(' ', '', $postalcode);

        if (strlen($postalcode) == 6) {
            return ['nl_sixpp' => $postalcode];
        }

        if (strlen($postalcode) == 4) {
            return ['nl_fourpp' => $postalcode];
        }

        throw new \Exception('No valid postalcode was found (nl_sixpp or nl_fourpp)');
    }
public function determinePostalType($postalcode)
    {
        $postalcode = str_replace(' ', '', $postalcode);

        if (strlen($postalcode) == 6) {
            return ['nl_sixpp' => $postalcode];
        }

        if (strlen($postalcode) == 4) {
            return ['nl_fourpp' => $postalcode];
        }

        throw new \Exception('No valid postalcode was found (nl_sixpp or nl_fourpp)');
    }
public function determinePostalType ( $ postalcode ) { $ postalcode = str_replace ( ' ' , '' , $ postalcode ) ; if ( strlen ( $ postalcode ) == 6 ) { return [ 'nl_sixpp' => $ postalcode ] ; } if ( strlen ( $ postalcode ) == 4 ) { return [ 'nl_fourpp' => $ postalcode ] ; } throw new \ Exception ( 'No valid postalcode was found (nl_sixpp or nl_fourpp)' ) ; }
Checks if one of two valid postal types was sent along.

@param $postalcode

@throws \Exception

@return array
Checks if one of two valid postal types was sent along .