@@ -59,7 +59,7 @@ public function calendar(\DateTime $start, \DateTime $end, string $summary, stri
5959 */
6060 public function email (string $ toEmail , string $ body , string $ subject ): QR_EmailMessage
6161 {
62- if (trim ($ toEmail ) === '' ) {
62+ if (trim ($ toEmail ) === null ) {
6363 throw new EmptyTextException ('Recipient email cannot be empty ' );
6464 }
6565
@@ -117,7 +117,7 @@ public function sms(string $number, string $text): QR_Sms
117117 */
118118 public function text (string $ data ): QR_Text
119119 {
120- if (trim ($ data ) === '' ) {
120+ if (trim ($ data ) === null ) {
121121 throw new EmptyTextException ('Text cannot be empty ' );
122122 }
123123
@@ -135,7 +135,7 @@ public function text(string $data): QR_Text
135135 */
136136 public function url (string $ url = null ): QR_Url
137137 {
138- // if (trim($url) === '' ) {
138+ // if (trim($url) === null ) {
139139 // throw new EmptyTextException('Url cannot be empty');
140140 // }
141141
@@ -167,7 +167,7 @@ public function url(string $url = null): QR_Url
167167 * @throws \QR_Code\Exceptions\InvalidVCardAddressEntryException
168168 * @throws \QR_Code\Exceptions\InvalidVCardPhoneEntryException
169169 */
170- public function vCard (string $ firstName = null , string $ lastName = null , string $ title = '' , string $ email = '' , string $ company = '' ,string $ job = '' ,string $ url = '' , array $ addresses = [], array $ phones = []): QR_VCard
170+ public function vCard (string $ firstName = null , string $ lastName = null , string $ title = null , string $ email = null , string $ company = null ,string $ job = null ,string $ url = null , array $ addresses = [], array $ phones = []): QR_VCard
171171 {
172172 // $this->validateVCardAddresses($addresses);
173173 // $this->validatePrefAddresses($addresses);
0 commit comments