From 85da0d569bd6fa649b1391502dedfcc64356f2f0 Mon Sep 17 00:00:00 2001 From: Dusan Malusev Date: Tue, 4 Jun 2019 00:15:40 +0200 Subject: [PATCH] Fixing the EnvParser, reorganizing the code, removing java like namespaces, and writting more unit tests --- .idea/PhpMvc-DotEnv.iml | 41 + .idea/misc.xml | 6 + .idea/modules.xml | 8 + .idea/php-test-framework.xml | 14 + .idea/php.xml | 43 + .idea/vcs.xml | 6 + .idea/workspace.xml | 504 ++++++++++ composer.json | 3 + composer.lock | 1478 +++++++++++++++++++++++++++++- src/EnvParser.php | 204 ++++- src/EnvParserInterface.php | 34 + src/Impl/EnvParserImpl.php | 227 ----- src/SetFile.php | 17 - src/Tokens.php | 9 +- tests/EnvTest/.env | 4 +- tests/EnvTest/.env.interpolation | 2 +- tests/EnvTest/.env.space.error | 16 + tests/EnvTest/EnvParserTest.php | 25 +- 18 files changed, 2367 insertions(+), 274 deletions(-) create mode 100644 .idea/PhpMvc-DotEnv.iml create mode 100644 .idea/misc.xml create mode 100644 .idea/modules.xml create mode 100644 .idea/php-test-framework.xml create mode 100644 .idea/php.xml create mode 100644 .idea/vcs.xml create mode 100644 .idea/workspace.xml create mode 100644 src/EnvParserInterface.php delete mode 100644 src/Impl/EnvParserImpl.php delete mode 100644 src/SetFile.php create mode 100644 tests/EnvTest/.env.space.error diff --git a/.idea/PhpMvc-DotEnv.iml b/.idea/PhpMvc-DotEnv.iml new file mode 100644 index 0000000..3990e24 --- /dev/null +++ b/.idea/PhpMvc-DotEnv.iml @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..28a804d --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..814042c --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/php-test-framework.xml b/.idea/php-test-framework.xml new file mode 100644 index 0000000..e47438f --- /dev/null +++ b/.idea/php-test-framework.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/php.xml b/.idea/php.xml new file mode 100644 index 0000000..7c0e37e --- /dev/null +++ b/.idea/php.xml @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..94a25f7 --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml new file mode 100644 index 0000000..eba9e42 --- /dev/null +++ b/.idea/workspace.xml @@ -0,0 +1,504 @@ + + + + + + + + + + + + + + + + + + + + + + + + + $PROJECT_DIR$/composer.json + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +