@@ -163,7 +163,7 @@ |
||
163 | 163 | * |
164 | 164 | * @throws MxCheckerException if domain is not avaible |
165 | 165 | */ |
166 | - private function checkDomain(){ |
|
166 | + private function checkDomain() { |
|
167 | 167 | |
168 | 168 | return new MxChecker($this->getDomain()); |
169 | 169 | } |
@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | $this->client = new Telnet($domain["target"], 25, $timeout); |
105 | 105 | $this->domain = $domain; |
106 | 106 | break; |
107 | - } catch (\Exception $ex) { |
|
107 | + }catch (\Exception $ex) { |
|
108 | 108 | continue; |
109 | 109 | } |
110 | 110 | } |
@@ -174,7 +174,7 @@ discard block |
||
174 | 174 | private function sayHello() |
175 | 175 | { |
176 | 176 | $host = $this->getDomainObj()->host; |
177 | - try{ |
|
177 | + try { |
|
178 | 178 | $status = $this->commandExec(sprintf("HELO %s", $host)); |
179 | 179 | if (!in_array(self::SMTP_GENERIC_SUCCESS, $status)) { |
180 | 180 | $this->disconnect(); |
@@ -195,7 +195,7 @@ discard block |
||
195 | 195 | */ |
196 | 196 | private function setFrom() |
197 | 197 | { |
198 | - try{ |
|
198 | + try { |
|
199 | 199 | $status = $this->commandExec(sprintf("MAIL FROM:<%s>", $this->getSender())); |
200 | 200 | if (!in_array(self::SMTP_GENERIC_SUCCESS, $status)) { |
201 | 201 | $this->disconnect(); |
@@ -236,12 +236,12 @@ discard block |
||
236 | 236 | } |
237 | 237 | foreach ($strout as $str) { |
238 | 238 | $this->debug[] = $str; |
239 | - if(preg_match('/^[0-9]{3}/', $str, $match)) { |
|
239 | + if (preg_match('/^[0-9]{3}/', $str, $match)) { |
|
240 | 240 | $status[] = current($match); |
241 | 241 | } |
242 | 242 | } |
243 | - if(empty($status)) { |
|
244 | - throw new SmtpCheckerException("SMTP Status request Unknown, ". $output, $this->getDebug()); |
|
243 | + if (empty($status)) { |
|
244 | + throw new SmtpCheckerException("SMTP Status request Unknown, ".$output, $this->getDebug()); |
|
245 | 245 | } |
246 | 246 | return $status; |
247 | 247 | } |
@@ -269,7 +269,7 @@ discard block |
||
269 | 269 | */ |
270 | 270 | public function validate($email) |
271 | 271 | { |
272 | - try{ |
|
272 | + try { |
|
273 | 273 | $command = sprintf("RCPT TO:<%s>", $email); |
274 | 274 | $exec = $this->client->exec($command); |
275 | 275 | $this->debug[] = $command; |
@@ -47,7 +47,7 @@ |
||
47 | 47 | */ |
48 | 48 | public function getRecordMx() |
49 | 49 | { |
50 | - if(empty($this->recordMx)){ |
|
50 | + if (empty($this->recordMx)) { |
|
51 | 51 | throw new MxCheckerException("Record Mx not found"); |
52 | 52 | } |
53 | 53 | $this->sortRecordByPriority(); |
@@ -14,7 +14,7 @@ |
||
14 | 14 | */ |
15 | 15 | public function register() |
16 | 16 | { |
17 | - $this->app->singleton(EmailChecker::class, function ($app) { |
|
17 | + $this->app->singleton(EmailChecker::class, function($app) { |
|
18 | 18 | return new EmailChecker(); |
19 | 19 | }); |
20 | 20 | } |
@@ -70,14 +70,14 @@ |
||
70 | 70 | throw new DisponsableException("DisponsableChecker is disable"); |
71 | 71 | } |
72 | 72 | try { |
73 | - $response = $this->client->get("/v1/disposable/" . $domain); |
|
74 | - $body = json_decode((string)$response->getBody()); |
|
73 | + $response = $this->client->get("/v1/disposable/".$domain); |
|
74 | + $body = json_decode((string) $response->getBody()); |
|
75 | 75 | if (property_exists($body, "disposable")) { |
76 | 76 | return $body->disposable; |
77 | 77 | } else { |
78 | 78 | throw new DisponsableException("Disponsable service unknown response"); |
79 | 79 | } |
80 | - } catch (TransferException $e) { |
|
80 | + }catch (TransferException $e) { |
|
81 | 81 | throw new DisponsableException($e->getMessage()); |
82 | 82 | } |
83 | 83 |