-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1c8cd42
commit c92dc57
Showing
3 changed files
with
10 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
use Dmatrenin\Hw6\App; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Dmatrenin\Hw6; | ||
|
@@ -8,7 +9,7 @@ | |
|
||
class App | ||
{ | ||
public function run() | ||
public function run(): void | ||
{ | ||
try { | ||
http_response_code(200); | ||
|
@@ -18,12 +19,11 @@ public function run() | |
'[email protected]', | ||
'[email protected]', //Валидный E-mail. Домен не существует | ||
]); | ||
echo 'Ok'; | ||
} | ||
catch (Exception $exception) { | ||
|
||
echo 'All emails are valid'; | ||
} catch (Exception $exception) { | ||
http_response_code($exception->getCode()); | ||
echo $exception->getMessage(); | ||
} | ||
|
||
} | ||
} | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters