diff --git a/.gitignore b/.gitignore index 3bf780b60..7c8fdc245 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,5 @@ .idea -.env \ No newline at end of file +.env +/vendor/ +code/composer.lock +code/vendor diff --git a/code/app/Application.php b/code/app/Application.php new file mode 100644 index 000000000..34a866752 --- /dev/null +++ b/code/app/Application.php @@ -0,0 +1,21 @@ +getCode()); + return $e->getMessage(); + } + } +} diff --git a/code/app/Validator.php b/code/app/Validator.php new file mode 100644 index 000000000..316b5ee53 --- /dev/null +++ b/code/app/Validator.php @@ -0,0 +1,39 @@ + 0) { + throw new Exception("Не хватает зактывающей скобки", 400); + } + + return $bracket; + } +} diff --git a/code/composer.json b/code/composer.json new file mode 100644 index 000000000..b8462c1ad --- /dev/null +++ b/code/composer.json @@ -0,0 +1,15 @@ +{ + "name": "dmatrenin/bracket", + "type": "project", + "autoload": { + "psr-4": { + "Dmatrenin\\Bracket\\": "app" + } + }, + "authors": [ + { + "name": "Dmireiy Matrenin" + } + ], + "require": {} +} diff --git a/code/public/index.php b/code/public/index.php new file mode 100644 index 000000000..db049f8c8 --- /dev/null +++ b/code/public/index.php @@ -0,0 +1,9 @@ +