From be37f608d07c36adfb8e567272a2bf0be1ad44c7 Mon Sep 17 00:00:00 2001 From: envoyr Date: Thu, 27 Oct 2022 19:15:19 +0200 Subject: [PATCH] update namespace --- README.md | 30 +++++++++---------- bin/ngxconf | 12 ++++---- examples/build.php | 12 ++++---- examples/parse.php | 8 ++--- src/Builder.php | 8 ++--- src/Config/Events.php | 6 ++-- src/Config/Http.php | 6 ++-- src/Config/Location.php | 8 ++--- src/Config/Server.php | 4 +-- src/Config/Upstream.php | 8 ++--- src/Exception/GrammarException.php | 2 +- .../UnrecognizedContextException.php | 2 +- src/Factory.php | 10 +++---- src/Node/Context.php | 2 +- src/Node/Directive.php | 4 +-- src/Node/Literal.php | 2 +- src/Node/Node.php | 4 +-- src/Node/Param.php | 2 +- src/Node/RootNode.php | 2 +- src/Parser.php | 26 ++++++++-------- tests/spec/BuilderSpec.php | 10 +++---- tests/spec/FactorySpec.php | 10 +++---- tests/spec/ParserSpec.php | 26 ++++++++-------- 23 files changed, 102 insertions(+), 102 deletions(-) diff --git a/README.md b/README.md index fa0ea7f..62ccb45 100644 --- a/README.md +++ b/README.md @@ -30,9 +30,9 @@ This library requires *PHP* in `>=8.1` version. Parsing configuration string: ```php -use Madkom\NginxConfigurator\Builder; -use Madkom\NginxConfigurator\Config\Server; -use Madkom\NginxConfigurator\Parser; +use Envoyr\NginxConfigurator\Builder; +use Envoyr\NginxConfigurator\Config\Server; +use Envoyr\NginxConfigurator\Parser; require 'vendor/autoload.php'; @@ -84,12 +84,12 @@ if (count($defaultServers) > 0) { Generating configuration string: ```php -use Madkom\NginxConfigurator\Factory; -use Madkom\NginxConfigurator\Builder; -use Madkom\NginxConfigurator\Config\Location; -use Madkom\NginxConfigurator\Node\Directive; -use Madkom\NginxConfigurator\Node\Literal; -use Madkom\NginxConfigurator\Node\Param; +use Envoyr\NginxConfigurator\Factory; +use Envoyr\NginxConfigurator\Builder; +use Envoyr\NginxConfigurator\Config\Location; +use Envoyr\NginxConfigurator\Node\Directive; +use Envoyr\NginxConfigurator\Node\Literal; +use Envoyr\NginxConfigurator\Node\Param; require __DIR__ . '/../vendor/autoload.php'; @@ -170,12 +170,12 @@ server { There are also methods to read and dump file: ```php -use Madkom\NginxConfigurator\Builder; -use Madkom\NginxConfigurator\Config\Location; -use Madkom\NginxConfigurator\Config\Server; -use Madkom\NginxConfigurator\Node\Directive; -use Madkom\NginxConfigurator\Node\Literal; -use Madkom\NginxConfigurator\Parser; +use Envoyr\NginxConfigurator\Builder; +use Envoyr\NginxConfigurator\Config\Location; +use Envoyr\NginxConfigurator\Config\Server; +use Envoyr\NginxConfigurator\Node\Directive; +use Envoyr\NginxConfigurator\Node\Literal; +use Envoyr\NginxConfigurator\Parser; require __DIR__ . '/../vendor/autoload.php'; diff --git a/bin/ngxconf b/bin/ngxconf index 0765388..f50bc07 100755 --- a/bin/ngxconf +++ b/bin/ngxconf @@ -16,12 +16,12 @@ if (file_exists(__DIR__ . '/../vendor/autoload.php')) { ); } -use Madkom\NginxConfigurator\Command\AddLocationCommand; -use Madkom\NginxConfigurator\Command\AddServerCommand; -use Madkom\NginxConfigurator\Command\AddUpstreamServerCommand; -use Madkom\NginxConfigurator\Command\RemoveLocationCommand; -use Madkom\NginxConfigurator\Command\RemoveServerCommand; -use Madkom\NginxConfigurator\Command\RemoveUpstreamServerCommand; +use Envoyr\NginxConfigurator\Command\AddLocationCommand; +use Envoyr\NginxConfigurator\Command\AddServerCommand; +use Envoyr\NginxConfigurator\Command\AddUpstreamServerCommand; +use Envoyr\NginxConfigurator\Command\RemoveLocationCommand; +use Envoyr\NginxConfigurator\Command\RemoveServerCommand; +use Envoyr\NginxConfigurator\Command\RemoveUpstreamServerCommand; use Symfony\Component\Console\Application; use Symfony\Component\Console\Command\Command; diff --git a/examples/build.php b/examples/build.php index 529bbb6..6f4701a 100644 --- a/examples/build.php +++ b/examples/build.php @@ -1,11 +1,11 @@ */ class Builder implements Countable diff --git a/src/Config/Events.php b/src/Config/Events.php index ab09167..3429b99 100644 --- a/src/Config/Events.php +++ b/src/Config/Events.php @@ -7,12 +7,12 @@ */ namespace Envoyr\NginxConfigurator\Config; -use Madkom\NginxConfigurator\Node\Context; -use Madkom\NginxConfigurator\Node\Directive; +use Envoyr\NginxConfigurator\Node\Context; +use Envoyr\NginxConfigurator\Node\Directive; /** * Class Events - * @package Madkom\NginxConfigurator\Config + * @package Envoyr\NginxConfigurator\Config * @author Michał Brzuchalski */ class Events extends Context diff --git a/src/Config/Http.php b/src/Config/Http.php index 2452e9e..70f10e1 100644 --- a/src/Config/Http.php +++ b/src/Config/Http.php @@ -7,12 +7,12 @@ */ namespace Envoyr\NginxConfigurator\Config; -use Madkom\NginxConfigurator\Node\Context; -use Madkom\NginxConfigurator\Node\Directive; +use Envoyr\NginxConfigurator\Node\Context; +use Envoyr\NginxConfigurator\Node\Directive; /** * Class Http - * @package Madkom\NginxConfigurator\Config + * @package Envoyr\NginxConfigurator\Config * @author Michał Brzuchalski */ class Http extends Context diff --git a/src/Config/Location.php b/src/Config/Location.php index 1aa3f73..2345b06 100644 --- a/src/Config/Location.php +++ b/src/Config/Location.php @@ -7,13 +7,13 @@ */ namespace Envoyr\NginxConfigurator\Config; -use Madkom\NginxConfigurator\Node\Context; -use Madkom\NginxConfigurator\Node\Literal; -use Madkom\NginxConfigurator\Node\Param; +use Envoyr\NginxConfigurator\Node\Context; +use Envoyr\NginxConfigurator\Node\Literal; +use Envoyr\NginxConfigurator\Node\Param; /** * Class Location - * @package Madkom\NginxConfigurator\Config + * @package Envoyr\NginxConfigurator\Config * @author Michał Brzuchalski */ class Location extends Context diff --git a/src/Config/Server.php b/src/Config/Server.php index 2dbd798..faf43a8 100644 --- a/src/Config/Server.php +++ b/src/Config/Server.php @@ -7,11 +7,11 @@ */ namespace Envoyr\NginxConfigurator\Config; -use Madkom\NginxConfigurator\Node\Context; +use Envoyr\NginxConfigurator\Node\Context; /** * Class Server - * @package Madkom\NginxConfigurator\Config + * @package Envoyr\NginxConfigurator\Config * @author Michał Brzuchalski */ class Server extends Context diff --git a/src/Config/Upstream.php b/src/Config/Upstream.php index 821d899..751fe7d 100644 --- a/src/Config/Upstream.php +++ b/src/Config/Upstream.php @@ -7,13 +7,13 @@ */ namespace Envoyr\NginxConfigurator\Config; -use Madkom\NginxConfigurator\Node\Context; -use Madkom\NginxConfigurator\Node\Directive; -use Madkom\NginxConfigurator\Node\Param; +use Envoyr\NginxConfigurator\Node\Context; +use Envoyr\NginxConfigurator\Node\Directive; +use Envoyr\NginxConfigurator\Node\Param; /** * Class Upstream - * @package Madkom\NginxConfigurator\Config + * @package Envoyr\NginxConfigurator\Config * @author Michał Brzuchalski */ class Upstream extends Context diff --git a/src/Exception/GrammarException.php b/src/Exception/GrammarException.php index 203b585..2ffe8be 100644 --- a/src/Exception/GrammarException.php +++ b/src/Exception/GrammarException.php @@ -11,7 +11,7 @@ use Exception; /** * Class GrammarException - * @package Madkom\NginxConfigurator\Exception + * @package Envoyr\NginxConfigurator\Exception * @author Michał Brzuchalski */ class GrammarException extends Exception diff --git a/src/Exception/UnrecognizedContextException.php b/src/Exception/UnrecognizedContextException.php index a476756..01de9e4 100644 --- a/src/Exception/UnrecognizedContextException.php +++ b/src/Exception/UnrecognizedContextException.php @@ -11,7 +11,7 @@ use Exception; /** * Class UnrecognizedContextException - * @package Madkom\NginxConfigurator\Exception + * @package Envoyr\NginxConfigurator\Exception * @author Michał Brzuchalski */ class UnrecognizedContextException extends Exception diff --git a/src/Factory.php b/src/Factory.php index bfeade2..87ae4e1 100644 --- a/src/Factory.php +++ b/src/Factory.php @@ -7,14 +7,14 @@ */ namespace Envoyr\NginxConfigurator; -use Madkom\NginxConfigurator\Config\Location; -use Madkom\NginxConfigurator\Config\Server; -use Madkom\NginxConfigurator\Node\Directive; -use Madkom\NginxConfigurator\Node\Param; +use Envoyr\NginxConfigurator\Config\Location; +use Envoyr\NginxConfigurator\Config\Server; +use Envoyr\NginxConfigurator\Node\Directive; +use Envoyr\NginxConfigurator\Node\Param; /** * Class Factory - * @package Madkom\NginxConfigurator + * @package Envoyr\NginxConfigurator * @author Michał Brzuchalski */ class Factory diff --git a/src/Node/Context.php b/src/Node/Context.php index 93c5446..0cf9aff 100644 --- a/src/Node/Context.php +++ b/src/Node/Context.php @@ -9,7 +9,7 @@ namespace Envoyr\NginxConfigurator\Node; /** * Class Context - * @package Madkom\NginxConfigurator\Node + * @package Envoyr\NginxConfigurator\Node * @author Michał Brzuchalski */ abstract class Context extends Node diff --git a/src/Node/Directive.php b/src/Node/Directive.php index 5e91194..bbe5228 100644 --- a/src/Node/Directive.php +++ b/src/Node/Directive.php @@ -7,12 +7,12 @@ */ namespace Envoyr\NginxConfigurator\Node; -use Madkom\Collection\CustomTypedCollection; +use Envoyr\Collection\CustomTypedCollection; use Traversable; /** * Class Directive - * @package Madkom\NginxConfigurator + * @package Envoyr\NginxConfigurator * @author Michał Brzuchalski */ class Directive extends Node diff --git a/src/Node/Literal.php b/src/Node/Literal.php index 5f466cd..38837ea 100644 --- a/src/Node/Literal.php +++ b/src/Node/Literal.php @@ -9,7 +9,7 @@ namespace Envoyr\NginxConfigurator\Node; /** * Class Literal - * @package Madkom\NginxConfigurator + * @package Envoyr\NginxConfigurator * @author Michał Brzuchalski */ class Literal extends Param diff --git a/src/Node/Node.php b/src/Node/Node.php index d840375..ad1a9d4 100644 --- a/src/Node/Node.php +++ b/src/Node/Node.php @@ -9,12 +9,12 @@ namespace Envoyr\NginxConfigurator\Node; use Countable; use IteratorAggregate; -use Madkom\Collection\CustomTypedCollection; +use Envoyr\Collection\CustomTypedCollection; use Traversable; /** * Class Node - * @package Madkom\NginxConfigurator + * @package Envoyr\NginxConfigurator * @author Michał Brzuchalski */ abstract class Node implements Countable, IteratorAggregate diff --git a/src/Node/Param.php b/src/Node/Param.php index 42c4f3d..0fa48fe 100644 --- a/src/Node/Param.php +++ b/src/Node/Param.php @@ -9,7 +9,7 @@ namespace Envoyr\NginxConfigurator\Node; /** * Class Param - * @package Madkom\NginxConfigurator + * @package Envoyr\NginxConfigurator * @author Michał Brzuchalski */ class Param diff --git a/src/Node/RootNode.php b/src/Node/RootNode.php index 0ad1db4..e23df04 100644 --- a/src/Node/RootNode.php +++ b/src/Node/RootNode.php @@ -9,7 +9,7 @@ namespace Envoyr\NginxConfigurator\Node; /** * Class RootNode - * @package Madkom\NginxConfigurator\node + * @package Envoyr\NginxConfigurator\node * @author Michał Brzuchalski */ class RootNode extends Node diff --git a/src/Parser.php b/src/Parser.php index da72f39..972ec09 100644 --- a/src/Parser.php +++ b/src/Parser.php @@ -15,22 +15,22 @@ use Ferno\Loco\LazyAltParser; use Ferno\Loco\ParseFailureException; use Ferno\Loco\RegexParser; use Ferno\Loco\StringParser; -use Madkom\NginxConfigurator\Config\Events; -use Madkom\NginxConfigurator\Config\Http; -use Madkom\NginxConfigurator\Config\Location; -use Madkom\NginxConfigurator\Config\Server; -use Madkom\NginxConfigurator\Config\Upstream; -use Madkom\NginxConfigurator\Exception\GrammarException; -use Madkom\NginxConfigurator\Exception\UnrecognizedContextException; -use Madkom\NginxConfigurator\Node\Context; -use Madkom\NginxConfigurator\Node\Directive; -use Madkom\NginxConfigurator\Node\Literal; -use Madkom\NginxConfigurator\Node\Param; -use Madkom\NginxConfigurator\Node\RootNode; +use Envoyr\NginxConfigurator\Config\Events; +use Envoyr\NginxConfigurator\Config\Http; +use Envoyr\NginxConfigurator\Config\Location; +use Envoyr\NginxConfigurator\Config\Server; +use Envoyr\NginxConfigurator\Config\Upstream; +use Envoyr\NginxConfigurator\Exception\GrammarException; +use Envoyr\NginxConfigurator\Exception\UnrecognizedContextException; +use Envoyr\NginxConfigurator\Node\Context; +use Envoyr\NginxConfigurator\Node\Directive; +use Envoyr\NginxConfigurator\Node\Literal; +use Envoyr\NginxConfigurator\Node\Param; +use Envoyr\NginxConfigurator\Node\RootNode; /** * Class Parser - * @package Madkom\NginxConfigurator + * @package Envoyr\NginxConfigurator * @author Michał Brzuchalski */ class Parser extends Grammar diff --git a/tests/spec/BuilderSpec.php b/tests/spec/BuilderSpec.php index 43ed9a1..df27bee 100644 --- a/tests/spec/BuilderSpec.php +++ b/tests/spec/BuilderSpec.php @@ -1,15 +1,15 @@ * @mixin Builder */ diff --git a/tests/spec/FactorySpec.php b/tests/spec/FactorySpec.php index a384e74..5d78e6b 100644 --- a/tests/spec/FactorySpec.php +++ b/tests/spec/FactorySpec.php @@ -1,15 +1,15 @@ * @mixin Factory */ diff --git a/tests/spec/ParserSpec.php b/tests/spec/ParserSpec.php index 9a4ca37..3379c16 100644 --- a/tests/spec/ParserSpec.php +++ b/tests/spec/ParserSpec.php @@ -1,19 +1,19 @@ * @mixin Parser */