src/Encode.php
private function addPadding(string $base64String): string
    {
        if (strlen($base64String) % 4 !== 0) {
            return $this->addPadding($base64String . '=');
        }

        return $base64String;
    }
private function addPadding(string $base64String): string
    {
        if (strlen($base64String) % 4 !== 0) {
            return $this->addPadding($base64String . '=');
        }

        return $base64String;
    }
private function addPadding ( string $ base64String ) : string { if ( strlen ( $ base64String ) % 4 !== 0 ) { return $ this -> addPadding ( $ base64String . '=' ) ; } return $ base64String ; }
Add padding to base64 strings which require it. Some base64 URL strings
which are decoded will have missing padding which is represented by the
equals sign.

@param string $base64String
@return string
Add padding to base64 strings which require it . Some base64 URL strings which are decoded will have missing padding which is represented by the equals sign .