@@ -7,18 +7,21 @@ class EmailValidation {
77 private $ disposableEmailApiUrl = 'https://api.mailboxvalidator.com/v1/email/disposable ' ;
88 private $ freeEmailApiUrl = 'https://api.mailboxvalidator.com/v1/email/free ' ;
99
10- public function __construct ($ key ) {
10+ public function __construct ($ key )
11+ {
1112 $ this ->apiKey = $ key ;
1213 }
1314
14- public function __destruct () {
15+ public function __destruct ()
16+ {
1517
1618 }
1719
1820 /*
1921 * Validate whether an email address is a valid email or not.
2022 */
21- public function validateEmail ($ email ) {
23+ public function validateEmail ($ email )
24+ {
2225 try {
2326 $ params = [ 'email ' => $ email , 'key ' => $ this ->apiKey , 'format ' => 'json ' ];
2427 $ params2 = [];
@@ -43,7 +46,8 @@ public function validateEmail($email) {
4346 /*
4447 * Validate whether an email address is a disposable email or not.
4548 */
46- public function isDisposableEmail ($ email ) {
49+ public function isDisposableEmail ($ email )
50+ {
4751 try {
4852 $ params = [ 'email ' => $ email , 'key ' => $ this ->apiKey , 'format ' => 'json ' ];
4953 $ params2 = [];
@@ -68,7 +72,8 @@ public function isDisposableEmail($email) {
6872 /*
6973 * Validate whether an email address is a free email or not.
7074 */
71- public function isFreeEmail ($ email ) {
75+ public function isFreeEmail ($ email )
76+ {
7277 try {
7378 $ params = [ 'email ' => $ email , 'key ' => $ this ->apiKey , 'format ' => 'json ' ];
7479 $ params2 = [];
@@ -90,4 +95,3 @@ public function isFreeEmail($email) {
9095 }
9196 }
9297}
93- ?>
0 commit comments