private function validateTemporaryTaxpayer(string $vatNumber): bool
    {
        if ($vatNumber[10] != 1) {
            return false;
        }

        $weights = [1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2];
        $checksum = (int)$vatNumber[11];
        $checkval = $this->sumWeights($weights, $vatNumber);

        if (($checkval % 11) == 10) {
            $weights = [3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4];
            $checkval = $this->sumWeights($weights, $vatNumber);
            $checkval = ($checkval % 11 == 10) ? 0 : $checkval % 11;

            return $checkval == $checksum;
        }

        return $checkval % 11 == $checksum;
    }
private function validateTemporaryTaxpayer(string $vatNumber): bool
    {
        if ($vatNumber[10] != 1) {
            return false;
        }

        $weights = [1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2];
        $checksum = (int)$vatNumber[11];
        $checkval = $this->sumWeights($weights, $vatNumber);

        if (($checkval % 11) == 10) {
            $weights = [3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4];
            $checkval = $this->sumWeights($weights, $vatNumber);
            $checkval = ($checkval % 11 == 10) ? 0 : $checkval % 11;

            return $checkval == $checksum;
        }

        return $checkval % 11 == $checksum;
    }
private function validateTemporaryTaxpayer ( string $ vatNumber ) : bool { if ( $ vatNumber [ 10 ] != 1 ) { return false ; } $ weights = [ 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 1 , 2 ] ; $ checksum = ( int ) $ vatNumber [ 11 ] ; $ checkval = $ this -> sumWeights ( $ weights , $ vatNumber ) ; if ( ( $ checkval % 11 ) == 10 ) { $ weights = [ 3 , 4 , 5 , 6 , 7 , 8 , 9 , 1 , 2 , 3 , 4 ] ; $ checkval = $ this -> sumWeights ( $ weights , $ vatNumber ) ; $ checkval = ( $ checkval % 11 == 10 ) ? 0 : $ checkval % 11 ; return $ checkval == $ checksum ; } return $ checkval % 11 == $ checksum ; }
Validate Temporary Tax Payer

@param string $vatNumber

@return bool
Validate Temporary Tax Payer