diff --git a/.gitignore b/.gitignore index 0bc45760..5cbbce09 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,6 @@ composer.phar /vendor/ .idea -/SelfDoc/__cache/ /demo/demo1/docs/ /demo/demo1/__cache/ /demo/demo2-templates-generation/__cache/ @@ -13,3 +12,4 @@ composer.phar /last_run.log /.phpunit.result.cache /demo/demo2-templates-generation/templates/ +/.bumbleDocGenCache/ diff --git a/SelfDoc/Configuration/config.yaml b/SelfDoc/Configuration/config.yaml deleted file mode 100644 index 5fa09bea..00000000 --- a/SelfDoc/Configuration/config.yaml +++ /dev/null @@ -1,25 +0,0 @@ -project_root: '%DOC_GEN_LIB_PATH%' -templates_dir: '%DOC_GEN_LIB_PATH%/SelfDoc/Configuration/templates' -cache_dir: '%project_root%/SelfDoc/__cache' -language_handlers: - php: - class: \BumbleDocGen\LanguageHandler\Php\PhpHandler - settings: - file_source_base_url: 'https://github.com/bumble-tech/bumble-doc-gen/blob/master' - async_source_loading_enabled: true -source_locators: - - class: \BumbleDocGen\Core\Parser\SourceLocator\RecursiveDirectoriesSourceLocator - arguments: - directories: - - "%project_root%/BumbleDocGen" - - "%project_root%/SelfDoc" -twig_filters: - - class: \SelfDoc\Configuration\Twig\CustomFilter\EvalString -twig_functions: - - class: \SelfDoc\Configuration\Twig\CustomFunction\FindEntitiesClassesByCollectionClassName - - class: \SelfDoc\Configuration\Twig\CustomFunction\PrintClassCollectionAsGroupedTable - - class: \SelfDoc\Configuration\Twig\CustomFunction\GetConfigParametersDescription -plugins: - - class: \SelfDoc\Configuration\Plugin\RoaveStubber\BetterReflectionStubberPlugin - - class: \SelfDoc\Configuration\Plugin\TwigFilterClassParser\TwigFilterClassParserPlugin - - class: \SelfDoc\Configuration\Plugin\TwigFunctionClassParser\TwigFunctionClassParserPlugin diff --git a/SelfDoc/Console/App.php b/SelfDoc/Console/App.php deleted file mode 100644 index 51804d51..00000000 --- a/SelfDoc/Console/App.php +++ /dev/null @@ -1,17 +0,0 @@ -add(new GenerateCommand()); - } -} diff --git a/SelfDoc/Console/Command/GenerateCommand.php b/SelfDoc/Console/Command/GenerateCommand.php deleted file mode 100644 index a6665750..00000000 --- a/SelfDoc/Console/Command/GenerateCommand.php +++ /dev/null @@ -1,42 +0,0 @@ -setName('generate'); - } - - /** - * @throws SyntaxError - * @throws NotFoundException - * @throws RuntimeError - * @throws DependencyException - * @throws LoaderError - * @throws InvalidArgumentException - */ - protected function execute( - \Symfony\Component\Console\Input\InputInterface $input, - \Symfony\Component\Console\Output\OutputInterface $output - ): int - { - $docGenerator = (new DocGeneratorFactory())->create( - dirname(__DIR__, 2) . '/Configuration/config.yaml' - ); - $docGenerator->generate(); - return self::SUCCESS; - } -} diff --git a/SelfDoc/docGen.php b/SelfDoc/docGen.php deleted file mode 100644 index 574dc74b..00000000 --- a/SelfDoc/docGen.php +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/env php -run(); \ No newline at end of file diff --git a/bin/bumbleDocGen b/bin/bumbleDocGen new file mode 100755 index 00000000..ddd02ff5 --- /dev/null +++ b/bin/bumbleDocGen @@ -0,0 +1,22 @@ +#!/usr/bin/env php +run(); diff --git a/bumble_doc_gen.yaml b/bumble_doc_gen.yaml new file mode 100644 index 00000000..cd0da1e7 --- /dev/null +++ b/bumble_doc_gen.yaml @@ -0,0 +1,27 @@ +project_root: '%WORKING_DIR%' +templates_dir: '%project_root%/selfdoc/templates' +output_dir: "%project_root%/docs" +cache_dir: '%project_root%/.bumbleDocGenCache' +output_dir_base_url: "/docs" +language_handlers: + php: + class: \BumbleDocGen\LanguageHandler\Php\PhpHandler + settings: + file_source_base_url: 'https://github.com/bumble-tech/bumble-doc-gen/blob/master' + async_source_loading_enabled: true +source_locators: + - class: \BumbleDocGen\Core\Parser\SourceLocator\RecursiveDirectoriesSourceLocator + arguments: + directories: + - "%project_root%/src" + - "%project_root%/selfdoc" +twig_filters: + - class: \SelfDocConfig\Twig\CustomFilter\EvalString +twig_functions: + - class: \SelfDocConfig\Twig\CustomFunction\FindEntitiesClassesByCollectionClassName + - class: \SelfDocConfig\Twig\CustomFunction\PrintClassCollectionAsGroupedTable + - class: \SelfDocConfig\Twig\CustomFunction\GetConfigParametersDescription +plugins: + - class: \SelfDocConfig\Plugin\RoaveStubber\BetterReflectionStubberPlugin + - class: \SelfDocConfig\Plugin\TwigFilterClassParser\TwigFilterClassParserPlugin + - class: \SelfDocConfig\Plugin\TwigFunctionClassParser\TwigFunctionClassParserPlugin diff --git a/composer.json b/composer.json index 2fa304d1..b1a3cfcd 100644 --- a/composer.json +++ b/composer.json @@ -46,16 +46,16 @@ }, "autoload": { "psr-4": { - "BumbleDocGen\\": "BumbleDocGen/" + "BumbleDocGen\\": "src/" }, "files": [ - "BumbleDocGen/Core/utils.php" + "src/Core/utils.php" ] }, "autoload-dev": { "psr-4": { "Test\\": "tests/", - "SelfDoc\\": "SelfDoc/" + "SelfDocConfig\\": "selfdoc/" } }, "config": { @@ -63,5 +63,8 @@ "php-http/discovery": true, "captainhook/plugin-composer": true } - } + }, + "bin": [ + "bin/bumbleDocGen" + ] } diff --git a/docs/readme.md b/docs/README.md similarity index 83% rename from docs/readme.md rename to docs/README.md index be5deb5d..df29b435 100644 --- a/docs/readme.md +++ b/docs/README.md @@ -49,6 +49,8 @@ BumbleDocGen's interface consists of mainly two classes: BumbleDocGen / DocGenerator
LOG_FILE_NAME
VERSION
Construct the exception. Note: The message is NOT binary safe.
String representation of the exception
Gets the Exception code
Gets the file in which the exception occurred
Gets the line in which the exception occurred
Gets the Exception message
Returns previous Exception
Gets the stack trace
Gets the stack trace as a string
DEFAULT_SETTINGS_FILE
DEFAULT_URL
Returns an array of event names this subscriber wants to listen to.
Returns the absolute path to a file if it can be retrieved and if the file is in the project directory
Get parsed links from description and doc blocks `see` and `link`
Get the doc comment of an entity
Get parsed examples from `examples` doc block
Get first example from @examples doc block
Get parsed throws from `throws` doc block
NAME
Retrieve an external iterator
Get entity unique ID
Returns the relative path to a file if it can be retrieved and if the file is in the project directory
Get parent collection of entities
DEFAULT_PREV_PAGE_NAME_TEMPLATE
Since the documentation generator supports several programming languages, +their entities need to correspond to the same interfaces
Checking if it is possible to get the entity data
Check if entity name is valid
The entity file is in the git repository
Is propagation stopped?
Stops the propagation of the event to further event listeners.
Exception is the base class for +all Exceptions.
An Application is the container for a collection of commands.
Adds a command object.
Adds an array of command objects.
Gets the commands (registered in the given namespace if provided).
Gets whether to catch exceptions or not during commands execution.
Adds suggestions to $suggestions for the current completion input (e.g. option or argument).
Runs the current application.
Returns the namespace part of the command name.
Finds a command by name or alias.
Finds a registered namespace by a name or an abbreviation.
Returns a registered command by name or alias.
Returns an array of possible abbreviations given a set of names.
Gets the InputDefinition related to this Application.
Gets the help message.
Get the helper set associated with the command.
Returns the long version of the application.
Gets the name of the application.
Returns an array of all unique namespaces used by currently registered commands.
Gets the application version.
Returns true if the command exists, false otherwise.
Gets whether to automatically exit after a command execution or not.
Registers a new command.
Sets whether to automatically exit after a command execution or not.
Sets whether to catch exceptions or not during commands execution.
Sets the default Command name.
Sets the application name.
Sets the application version.
DAY_SECONDS
HOUR_SECONDS
MONTH_SECONDS
AND
OR
CLASS_ENTITY_FULL_LINK_OPTION
CLASS_ENTITY_ONLY_CURSOR_LINK_OPTION
CLASS_ENTITY_SHORT_LINK_OPTION
Base class for all commands.
FAILURE
INVALID
SUCCESS
Adds an argument.
Adds an option.
Add a command usage example, it'll be prefixed with the command name.
Returns the aliases for the command.
Gets the application instance for this command.
Gets the InputDefinition attached to this Command.
Returns the description for the command.
Returns the help for the command.
Gets a helper instance by name.
Gets the helper set.
Returns the command name.
Gets the InputDefinition to be used to create representations of this Command.
Returns the processed help for the command replacing the %command.name% and +%command.full_name% patterns with the real values dynamically.
Returns the synopsis for the command.
Returns alternative usages of the command.
Ignores validation errors.
Checks whether the command is enabled or not in the current environment.
Merges the application definition with the command definition.
Runs the command.
Sets the aliases for the command.
Sets the code to execute when running this command.
Sets an array of argument and option instances.
Sets the description for the command.
Sets the help for the command.
Sets the name of the command.
Sets the process title of the command.
Returns the node visitor instances to add to the existing list.
Returns a list of operators to add to the existing list.
Returns a list of tests to add to the existing list.
Returns the token parser instances to add to the existing list.
MODEL_GPT_4
MODE_READ_ALL_CODE
MODE_READ_ONLY_SIGNATURES
BLOCK_AFTER_HEADER
BLOCK_AFTER_MAIN_INFO
BLOCK_BEFORE_DETAILS
SETTINGS_PREFIX
Adds an event listener that listens on the specified events.
Adds an event subscriber.
Gets the listener priority for a specific event.
Gets the listeners of a specific event or all listeners sorted by descending priority.
Checks whether an event has any registered listeners.
Removes an event listener from the specified events.
Locate some source code.
Find all identifiers of a type
NONE
PRIVATE
PROTECTED
PUBLIC
└──BumbleDocGen/ + └──src/ +│ ├──Console/ +│ │ ├──Command/ +│ │ │ └── GenerateCommand.php — Base class for all commands. +│ │ └── App.php — An Application is the container for a collection of commands. │ ├──Core/ │ │ ├──Cache/ │ │ │ ├──LocalCache/ @@ -229,4 +233,4 @@ Directory layout ( only documented files shown ): -Last page committer: fshcherbanich <filipp.shcherbanich@team.bumble.com>Last modified date: Sat Jul 29 13:26:44 2023 +0300Page content update date: Thu Aug 31 2023Made with Bumble Documentation Generator \ No newline at end of file +Last page committer: fshcherbanich <filipp.shcherbanich@team.bumble.com>Last modified date: Sat Sep 2 21:01:47 2023 +0300Page content update date: Sun Sep 10 2023Made with Bumble Documentation Generator \ No newline at end of file diff --git a/docs/tech/readme.md b/docs/tech/readme.md index 18a38e2b..9de1491c 100644 --- a/docs/tech/readme.md +++ b/docs/tech/readme.md @@ -1,4 +1,4 @@ - BumbleDocGen / Technical description of the project + BumbleDocGen / Technical description of the project Technical description of the project @@ -37,4 +37,4 @@ After that, the process of parsing the project code according to the configurati -Last page committer: fshcherbanich <filipp.shcherbanich@team.bumble.com>Last modified date: Sun Jul 30 16:27:42 2023 +0300Page content update date: Thu Aug 31 2023Made with Bumble Documentation Generator \ No newline at end of file +Last page committer: fshcherbanich <filipp.shcherbanich@team.bumble.com>Last modified date: Sat Sep 2 21:01:47 2023 +0300Page content update date: Sun Sep 10 2023Made with Bumble Documentation Generator \ No newline at end of file diff --git a/SelfDoc/Configuration/Plugin/RoaveStubber/BetterReflectionStubberPlugin.php b/selfdoc/Plugin/RoaveStubber/BetterReflectionStubberPlugin.php similarity index 96% rename from SelfDoc/Configuration/Plugin/RoaveStubber/BetterReflectionStubberPlugin.php rename to selfdoc/Plugin/RoaveStubber/BetterReflectionStubberPlugin.php index 22cdabbc..858f4b7e 100644 --- a/SelfDoc/Configuration/Plugin/RoaveStubber/BetterReflectionStubberPlugin.php +++ b/selfdoc/Plugin/RoaveStubber/BetterReflectionStubberPlugin.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace SelfDoc\Configuration\Plugin\RoaveStubber; +namespace SelfDocConfig\Plugin\RoaveStubber; use BumbleDocGen\Core\Plugin\Event\Renderer\OnGettingResourceLink; use BumbleDocGen\Core\Plugin\PluginInterface; diff --git a/SelfDoc/Configuration/Plugin/TwigFilterClassParser/FilterClassPluginTwigEnvironment.php b/selfdoc/Plugin/TwigFilterClassParser/FilterClassPluginTwigEnvironment.php similarity index 91% rename from SelfDoc/Configuration/Plugin/TwigFilterClassParser/FilterClassPluginTwigEnvironment.php rename to selfdoc/Plugin/TwigFilterClassParser/FilterClassPluginTwigEnvironment.php index 5d9d5b47..e3e61a02 100644 --- a/SelfDoc/Configuration/Plugin/TwigFilterClassParser/FilterClassPluginTwigEnvironment.php +++ b/selfdoc/Plugin/TwigFilterClassParser/FilterClassPluginTwigEnvironment.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace SelfDoc\Configuration\Plugin\TwigFilterClassParser; +namespace SelfDocConfig\Plugin\TwigFilterClassParser; use Twig\Environment; use Twig\Error\LoaderError; diff --git a/SelfDoc/Configuration/Plugin/TwigFilterClassParser/TwigFilterClassParserPlugin.php b/selfdoc/Plugin/TwigFilterClassParser/TwigFilterClassParserPlugin.php similarity index 94% rename from SelfDoc/Configuration/Plugin/TwigFilterClassParser/TwigFilterClassParserPlugin.php rename to selfdoc/Plugin/TwigFilterClassParser/TwigFilterClassParserPlugin.php index cdf29cf0..edb43e63 100644 --- a/SelfDoc/Configuration/Plugin/TwigFilterClassParser/TwigFilterClassParserPlugin.php +++ b/selfdoc/Plugin/TwigFilterClassParser/TwigFilterClassParserPlugin.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace SelfDoc\Configuration\Plugin\TwigFilterClassParser; +namespace SelfDocConfig\Plugin\TwigFilterClassParser; use BumbleDocGen\Core\Configuration\Configuration; use BumbleDocGen\Core\Configuration\Exception\InvalidConfigurationParameterException; @@ -21,17 +21,16 @@ final class TwigFilterClassParserPlugin implements PluginInterface { private const TWIG_FILTER_DIR_NAMES = [ - '/BumbleDocGen/Core/Renderer/Twig/Filter', - '/BumbleDocGen/LanguageHandler/Php/Renderer/Twig/Filter' + '/src/Core/Renderer/Twig/Filter', + '/src/LanguageHandler/Php/Renderer/Twig/Filter' ]; public const PLUGIN_KEY = 'twigFilterClassParserPlugin'; public function __construct( private FilterClassPluginTwigEnvironment $twigEnvironment, - private RendererContext $context, - private Configuration $configuration, - ) - { + private RendererContext $context, + private Configuration $configuration, + ) { } public static function getSubscribedEvents(): array diff --git a/SelfDoc/Configuration/Plugin/TwigFilterClassParser/templates/twigFilterInfoBlock.twig b/selfdoc/Plugin/TwigFilterClassParser/templates/twigFilterInfoBlock.twig similarity index 100% rename from SelfDoc/Configuration/Plugin/TwigFilterClassParser/templates/twigFilterInfoBlock.twig rename to selfdoc/Plugin/TwigFilterClassParser/templates/twigFilterInfoBlock.twig diff --git a/SelfDoc/Configuration/Plugin/TwigFunctionClassParser/FunctionClassPluginTwigEnvironment.php b/selfdoc/Plugin/TwigFunctionClassParser/FunctionClassPluginTwigEnvironment.php similarity index 91% rename from SelfDoc/Configuration/Plugin/TwigFunctionClassParser/FunctionClassPluginTwigEnvironment.php rename to selfdoc/Plugin/TwigFunctionClassParser/FunctionClassPluginTwigEnvironment.php index bda56698..5acccc57 100644 --- a/SelfDoc/Configuration/Plugin/TwigFunctionClassParser/FunctionClassPluginTwigEnvironment.php +++ b/selfdoc/Plugin/TwigFunctionClassParser/FunctionClassPluginTwigEnvironment.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace SelfDoc\Configuration\Plugin\TwigFunctionClassParser; +namespace SelfDocConfig\Plugin\TwigFunctionClassParser; use Twig\Environment; use Twig\Error\LoaderError; diff --git a/SelfDoc/Configuration/Plugin/TwigFunctionClassParser/TwigFunctionClassParserPlugin.php b/selfdoc/Plugin/TwigFunctionClassParser/TwigFunctionClassParserPlugin.php similarity index 93% rename from SelfDoc/Configuration/Plugin/TwigFunctionClassParser/TwigFunctionClassParserPlugin.php rename to selfdoc/Plugin/TwigFunctionClassParser/TwigFunctionClassParserPlugin.php index 2248c1c7..0ae14e07 100644 --- a/SelfDoc/Configuration/Plugin/TwigFunctionClassParser/TwigFunctionClassParserPlugin.php +++ b/selfdoc/Plugin/TwigFunctionClassParser/TwigFunctionClassParserPlugin.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace SelfDoc\Configuration\Plugin\TwigFunctionClassParser; +namespace SelfDocConfig\Plugin\TwigFunctionClassParser; use BumbleDocGen\Core\Configuration\Configuration; use BumbleDocGen\Core\Configuration\Exception\InvalidConfigurationParameterException; @@ -21,17 +21,16 @@ final class TwigFunctionClassParserPlugin implements PluginInterface { private const TWIG_FUNCTION_DIR_NAMES = [ - '/BumbleDocGen/Core/Renderer/Twig/Function', - '/BumbleDocGen/LanguageHandler/Php/Renderer/Twig/Function' + '/src/Core/Renderer/Twig/Function', + '/src/LanguageHandler/Php/Renderer/Twig/Function' ]; public const PLUGIN_KEY = 'twigFunctionClassParserPlugin'; public function __construct( private FunctionClassPluginTwigEnvironment $twigEnvironment, - private RendererContext $context, - private Configuration $configuration, - ) - { + private RendererContext $context, + private Configuration $configuration, + ) { } public static function getSubscribedEvents(): array @@ -137,7 +136,7 @@ private function getFunctionData(ClassEntityCollection $classEntityCollection, s return null; } $entity = $classEntityCollection->getEntityByClassName($className); - if (str_starts_with($entity->getFileName(), '/SelfDoc')) { + if (str_starts_with($entity->getFileName(), '/selfdoc')) { return null; } diff --git a/SelfDoc/Configuration/Plugin/TwigFunctionClassParser/templates/twigFunctionInfoBlock.twig b/selfdoc/Plugin/TwigFunctionClassParser/templates/twigFunctionInfoBlock.twig similarity index 100% rename from SelfDoc/Configuration/Plugin/TwigFunctionClassParser/templates/twigFunctionInfoBlock.twig rename to selfdoc/Plugin/TwigFunctionClassParser/templates/twigFunctionInfoBlock.twig diff --git a/SelfDoc/Configuration/Twig/CustomFilter/EvalString.php b/selfdoc/Twig/CustomFilter/EvalString.php similarity index 90% rename from SelfDoc/Configuration/Twig/CustomFilter/EvalString.php rename to selfdoc/Twig/CustomFilter/EvalString.php index c11643bc..df32b43a 100644 --- a/SelfDoc/Configuration/Twig/CustomFilter/EvalString.php +++ b/selfdoc/Twig/CustomFilter/EvalString.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace SelfDoc\Configuration\Twig\CustomFilter; +namespace SelfDocConfig\Twig\CustomFilter; use BumbleDocGen\Core\Renderer\Twig\Filter\CustomFilterInterface; diff --git a/SelfDoc/Configuration/Twig/CustomFunction/FindEntitiesClassesByCollectionClassName.php b/selfdoc/Twig/CustomFunction/FindEntitiesClassesByCollectionClassName.php similarity index 97% rename from SelfDoc/Configuration/Twig/CustomFunction/FindEntitiesClassesByCollectionClassName.php rename to selfdoc/Twig/CustomFunction/FindEntitiesClassesByCollectionClassName.php index 68f262ac..4d99893d 100644 --- a/SelfDoc/Configuration/Twig/CustomFunction/FindEntitiesClassesByCollectionClassName.php +++ b/selfdoc/Twig/CustomFunction/FindEntitiesClassesByCollectionClassName.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace SelfDoc\Configuration\Twig\CustomFunction; +namespace SelfDocConfig\Twig\CustomFunction; use BumbleDocGen\Core\Configuration\Exception\InvalidConfigurationParameterException; use BumbleDocGen\Core\Parser\Entity\RootEntityCollectionsGroup; diff --git a/SelfDoc/Configuration/Twig/CustomFunction/GetConfigParametersDescription.php b/selfdoc/Twig/CustomFunction/GetConfigParametersDescription.php similarity index 97% rename from SelfDoc/Configuration/Twig/CustomFunction/GetConfigParametersDescription.php rename to selfdoc/Twig/CustomFunction/GetConfigParametersDescription.php index b46e1931..58df212a 100644 --- a/SelfDoc/Configuration/Twig/CustomFunction/GetConfigParametersDescription.php +++ b/selfdoc/Twig/CustomFunction/GetConfigParametersDescription.php @@ -2,12 +2,13 @@ declare(strict_types=1); -namespace SelfDoc\Configuration\Twig\CustomFunction; +namespace SelfDocConfig\Twig\CustomFunction; use BumbleDocGen\Core\Configuration\ConfigurationParameterBag; use BumbleDocGen\Core\Parser\Entity\RootEntityCollection; use BumbleDocGen\Core\Renderer\Twig\Function\CustomFunctionInterface; use Noodlehaus\Config; + use function BumbleDocGen\Core\is_associative_array; final class GetConfigParametersDescription implements CustomFunctionInterface diff --git a/SelfDoc/Configuration/Twig/CustomFunction/PrintClassCollectionAsGroupedTable.php b/selfdoc/Twig/CustomFunction/PrintClassCollectionAsGroupedTable.php similarity index 98% rename from SelfDoc/Configuration/Twig/CustomFunction/PrintClassCollectionAsGroupedTable.php rename to selfdoc/Twig/CustomFunction/PrintClassCollectionAsGroupedTable.php index 79045b0c..1023f39e 100644 --- a/SelfDoc/Configuration/Twig/CustomFunction/PrintClassCollectionAsGroupedTable.php +++ b/selfdoc/Twig/CustomFunction/PrintClassCollectionAsGroupedTable.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace SelfDoc\Configuration\Twig\CustomFunction; +namespace SelfDocConfig\Twig\CustomFunction; use BumbleDocGen\Core\Configuration\Exception\InvalidConfigurationParameterException; use BumbleDocGen\Core\Renderer\Twig\Function\CustomFunctionInterface; diff --git a/SelfDoc/Configuration/templates/readme.md.twig b/selfdoc/templates/README.md.twig similarity index 88% rename from SelfDoc/Configuration/templates/readme.md.twig rename to selfdoc/templates/README.md.twig index 6f093ab6..16616b4b 100644 --- a/SelfDoc/Configuration/templates/readme.md.twig +++ b/selfdoc/templates/README.md.twig @@ -47,6 +47,8 @@ BumbleDocGen's interface consists of mainly two classes: DocGenerator and {{ "Examples of usage" | textToHeading('H3') }} +1) Working with a library in a PHP file + ```php require_once 'vendor/autoload.php'; @@ -62,10 +64,23 @@ $docgen = $factory->create('/path/to/configuration/files'); $docgen->generate(); ``` +2) Working with the library through a console application + +```bash +# List of available commands +./vendor/bin/bumbleDocGen list + +# Documentation generation example +./vendor/bin/bumbleDocGen generate -c + +# Getting detailed information about a command +./vendor/bin/bumbleDocGen generate -h +``` + ------------------ **This documentation was generated using the Bumble Documentation Generator, and is an example of how it works.** To update this documentation, run the following command: -{{ 'php SelfDoc/docGen.php generate' | textToCodeBlock('console') }} +{{ './bin/bumbleDocGen generate' | textToCodeBlock('console') }} diff --git a/SelfDoc/Configuration/templates/_config.yml b/selfdoc/templates/_config.yml similarity index 100% rename from SelfDoc/Configuration/templates/_config.yml rename to selfdoc/templates/_config.yml diff --git a/SelfDoc/Configuration/templates/_layouts/default.html b/selfdoc/templates/_layouts/default.html similarity index 100% rename from SelfDoc/Configuration/templates/_layouts/default.html rename to selfdoc/templates/_layouts/default.html diff --git a/SelfDoc/Configuration/templates/assets/doc_example.png b/selfdoc/templates/assets/doc_example.png similarity index 100% rename from SelfDoc/Configuration/templates/assets/doc_example.png rename to selfdoc/templates/assets/doc_example.png diff --git a/SelfDoc/Configuration/templates/assets/doc_structure.png b/selfdoc/templates/assets/doc_structure.png similarity index 100% rename from SelfDoc/Configuration/templates/assets/doc_structure.png rename to selfdoc/templates/assets/doc_structure.png diff --git a/SelfDoc/Configuration/templates/assets/doc_structure2.png b/selfdoc/templates/assets/doc_structure2.png similarity index 100% rename from SelfDoc/Configuration/templates/assets/doc_structure2.png rename to selfdoc/templates/assets/doc_structure2.png diff --git a/SelfDoc/Configuration/templates/tech/1.configuration/readme.md.twig b/selfdoc/templates/tech/1.configuration/readme.md.twig similarity index 93% rename from SelfDoc/Configuration/templates/tech/1.configuration/readme.md.twig rename to selfdoc/templates/tech/1.configuration/readme.md.twig index 209686a0..dd18ddcf 100644 --- a/SelfDoc/Configuration/templates/tech/1.configuration/readme.md.twig +++ b/selfdoc/templates/tech/1.configuration/readme.md.twig @@ -12,7 +12,7 @@ During the generation process, the data from these files is loaded into the C Let's look at an example of a real configuration in more detail: -{{ fileGetContents('%templates_dir%/../config.yaml') | textToCodeBlock('yaml') }} +{{ fileGetContents('%WORKING_DIR%/bumble_doc_gen.yaml') | textToCodeBlock('yaml') }} In this example, we see the real configuration of the self-documentation of this project. @@ -35,7 +35,7 @@ The inheritance algorithm is as follows: scalar types can be overwritten by each {{ "Configuration parameters" | textToHeading('H2') }} -{% set parameters = getConfigParametersDescription(phpClassEntityCollection, '%WORKING_DIR%/BumbleDocGen/Core/Configuration/defaultConfiguration.yaml') %} +{% set parameters = getConfigParametersDescription(phpClassEntityCollection, '%WORKING_DIR%/src/Core/Configuration/defaultConfiguration.yaml') %} diff --git a/SelfDoc/Configuration/templates/tech/2.parser/entity.md.twig b/selfdoc/templates/tech/2.parser/entity.md.twig similarity index 100% rename from SelfDoc/Configuration/templates/tech/2.parser/entity.md.twig rename to selfdoc/templates/tech/2.parser/entity.md.twig diff --git a/SelfDoc/Configuration/templates/tech/2.parser/entityFilterCondition.md.twig b/selfdoc/templates/tech/2.parser/entityFilterCondition.md.twig similarity index 96% rename from SelfDoc/Configuration/templates/tech/2.parser/entityFilterCondition.md.twig rename to selfdoc/templates/tech/2.parser/entityFilterCondition.md.twig index 3fba4b4c..414282da 100644 --- a/SelfDoc/Configuration/templates/tech/2.parser/entityFilterCondition.md.twig +++ b/selfdoc/templates/tech/2.parser/entityFilterCondition.md.twig @@ -72,11 +72,11 @@ language_handlers: Common filtering conditions that are available for any entity: {{ printEntityCollectionAsList( - filterConditions.filterByPaths(['/BumbleDocGen/Core']) + filterConditions.filterByPaths(['/src/Core']) ) }} Filter condition for working with entities PHP language handler: {{ printClassCollectionAsGroupedTable( - filterConditions.filterByPaths(['/BumbleDocGen/LanguageHandler/Php/Parser/FilterCondition']) + filterConditions.filterByPaths(['/src/LanguageHandler/Php/Parser/FilterCondition']) ) }} diff --git a/SelfDoc/Configuration/templates/tech/2.parser/readme.md.twig b/selfdoc/templates/tech/2.parser/readme.md.twig similarity index 100% rename from SelfDoc/Configuration/templates/tech/2.parser/readme.md.twig rename to selfdoc/templates/tech/2.parser/readme.md.twig diff --git a/SelfDoc/Configuration/templates/tech/2.parser/sourceLocator.md.twig b/selfdoc/templates/tech/2.parser/sourceLocator.md.twig similarity index 83% rename from SelfDoc/Configuration/templates/tech/2.parser/sourceLocator.md.twig rename to selfdoc/templates/tech/2.parser/sourceLocator.md.twig index 0e243dbf..328d857d 100644 --- a/SelfDoc/Configuration/templates/tech/2.parser/sourceLocator.md.twig +++ b/selfdoc/templates/tech/2.parser/sourceLocator.md.twig @@ -12,8 +12,8 @@ Source locators are set in the configuration: - class: \\BumbleDocGen\\Core\\Parser\\SourceLocator\\RecursiveDirectoriesSourceLocator arguments: directories: - - "%project_root%/BumbleDocGen" - - "%project_root%/SelfDoc"' | textToCodeBlock('yaml') }} + - "%project_root%/src" + - "%project_root%/selfdoc"' | textToCodeBlock('yaml') }} You can create your own source locators or use any existing ones. All source locators must implement the SourceLocatorInterface interface. @@ -24,7 +24,7 @@ You can create your own source locators or use any existing ones. All source loc {{ printEntityCollectionAsList( phpClassEntityCollection .filterByInterfaces(['BumbleDocGen\\Core\\Parser\\SourceLocator\\SourceLocatorInterface']) - .filterByPaths(['/BumbleDocGen/Core/Parser']) + .filterByPaths(['/src/Core/Parser']) .getOnlyInstantiable() ) }} @@ -33,6 +33,6 @@ You can create your own source locators or use any existing ones. All source loc {{ printEntityCollectionAsList( phpClassEntityCollection .filterByInterfaces(['BumbleDocGen\\Core\\Parser\\SourceLocator\\SourceLocatorInterface']) - .filterByPaths(['/BumbleDocGen/LanguageHandler/Php/Parser']) + .filterByPaths(['/src/LanguageHandler/Php/Parser']) .getOnlyInstantiable() ) }} \ No newline at end of file diff --git a/SelfDoc/Configuration/templates/tech/3.renderer/breadcrumbs.md.twig b/selfdoc/templates/tech/3.renderer/breadcrumbs.md.twig similarity index 100% rename from SelfDoc/Configuration/templates/tech/3.renderer/breadcrumbs.md.twig rename to selfdoc/templates/tech/3.renderer/breadcrumbs.md.twig diff --git a/SelfDoc/Configuration/templates/tech/3.renderer/readme.md.twig b/selfdoc/templates/tech/3.renderer/readme.md.twig similarity index 100% rename from SelfDoc/Configuration/templates/tech/3.renderer/readme.md.twig rename to selfdoc/templates/tech/3.renderer/readme.md.twig diff --git a/SelfDoc/Configuration/templates/tech/3.renderer/templates.md.twig b/selfdoc/templates/tech/3.renderer/templates.md.twig similarity index 100% rename from SelfDoc/Configuration/templates/tech/3.renderer/templates.md.twig rename to selfdoc/templates/tech/3.renderer/templates.md.twig diff --git a/SelfDoc/Configuration/templates/tech/3.renderer/templatesDynamicBlocks.md.twig b/selfdoc/templates/tech/3.renderer/templatesDynamicBlocks.md.twig similarity index 100% rename from SelfDoc/Configuration/templates/tech/3.renderer/templatesDynamicBlocks.md.twig rename to selfdoc/templates/tech/3.renderer/templatesDynamicBlocks.md.twig diff --git a/SelfDoc/Configuration/templates/tech/3.renderer/templatesLinking.md.twig b/selfdoc/templates/tech/3.renderer/templatesLinking.md.twig similarity index 100% rename from SelfDoc/Configuration/templates/tech/3.renderer/templatesLinking.md.twig rename to selfdoc/templates/tech/3.renderer/templatesLinking.md.twig diff --git a/SelfDoc/Configuration/templates/tech/3.renderer/templatesVariables.md.twig b/selfdoc/templates/tech/3.renderer/templatesVariables.md.twig similarity index 100% rename from SelfDoc/Configuration/templates/tech/3.renderer/templatesVariables.md.twig rename to selfdoc/templates/tech/3.renderer/templatesVariables.md.twig diff --git a/SelfDoc/Configuration/templates/tech/3.renderer/twigCustomFilters.md.twig b/selfdoc/templates/tech/3.renderer/twigCustomFilters.md.twig similarity index 96% rename from SelfDoc/Configuration/templates/tech/3.renderer/twigCustomFilters.md.twig rename to selfdoc/templates/tech/3.renderer/twigCustomFilters.md.twig index 21825a0c..188f4b94 100644 --- a/SelfDoc/Configuration/templates/tech/3.renderer/twigCustomFilters.md.twig +++ b/selfdoc/templates/tech/3.renderer/twigCustomFilters.md.twig @@ -56,8 +56,8 @@ Here is a list of filters available by default: {% for filter in phpClassEntityCollection.filterByPaths([ - '/BumbleDocGen/Core/Renderer/Twig/Filter', - '/BumbleDocGen/LanguageHandler/Php/Renderer/Twig/Filter' + '/src/Core/Renderer/Twig/Filter', + '/src/LanguageHandler/Php/Renderer/Twig/Filter' ]) .filterByInterfaces(['BumbleDocGen\\Core\\Renderer\\Twig\\Filter\\CustomFilterInterface']) .getOnlyInstantiable() diff --git a/SelfDoc/Configuration/templates/tech/3.renderer/twigCustomFunctions.md.twig b/selfdoc/templates/tech/3.renderer/twigCustomFunctions.md.twig similarity index 90% rename from SelfDoc/Configuration/templates/tech/3.renderer/twigCustomFunctions.md.twig rename to selfdoc/templates/tech/3.renderer/twigCustomFunctions.md.twig index cadbb42f..aaf23456 100644 --- a/SelfDoc/Configuration/templates/tech/3.renderer/twigCustomFunctions.md.twig +++ b/selfdoc/templates/tech/3.renderer/twigCustomFunctions.md.twig @@ -22,9 +22,9 @@ You can add your custom functions to the configuration like this: ```yaml twig_functions: - - class: \SelfDoc\Configuration\Twig\CustomFunction\FindEntitiesClassesByCollectionClassName - - class: \SelfDoc\Configuration\Twig\CustomFunction\PrintClassCollectionAsGroupedTable - - class: \SelfDoc\Configuration\Twig\CustomFunction\GetConfigParametersDescription + - class: \SelfDocConfig\Twig\CustomFunction\FindEntitiesClassesByCollectionClassName + - class: \SelfDocConfig\Twig\CustomFunction\PrintClassCollectionAsGroupedTable + - class: \SelfDocConfig\Twig\CustomFunction\GetConfigParametersDescription ``` It is important to remember that when a template is inherited, custom functions are not overridden and augmented. @@ -54,8 +54,8 @@ Here is a list of functions available by default: {% for function in phpClassEntityCollection.filterByPaths([ - '/BumbleDocGen/Core/Renderer/Twig/Function', - '/BumbleDocGen/LanguageHandler/Php/Renderer/Twig/Function' + '/src/Core/Renderer/Twig/Function', + '/src/LanguageHandler/Php/Renderer/Twig/Function' ]) .filterByInterfaces(['BumbleDocGen\\Core\\Renderer\\Twig\\Function\\CustomFunctionInterface']) .getOnlyInstantiable() diff --git a/SelfDoc/Configuration/templates/tech/4.pluginSystem/readme.md.twig b/selfdoc/templates/tech/4.pluginSystem/readme.md.twig similarity index 87% rename from SelfDoc/Configuration/templates/tech/4.pluginSystem/readme.md.twig rename to selfdoc/templates/tech/4.pluginSystem/readme.md.twig index d9c26052..40436636 100644 --- a/SelfDoc/Configuration/templates/tech/4.pluginSystem/readme.md.twig +++ b/selfdoc/templates/tech/4.pluginSystem/readme.md.twig @@ -13,9 +13,9 @@ You can add your plugins to the configuration like this: ```yaml plugins: - - class: \SelfDoc\Configuration\Plugin\RoaveStubber\BetterReflectionStubberPlugin - - class: \SelfDoc\Configuration\Plugin\TwigFilterClassParser\TwigFilterClassParserPlugin - - class: \SelfDoc\Configuration\Plugin\TwigFunctionClassParser\TwigFunctionClassParserPlugin + - class: \SelfDocConfig\Plugin\RoaveStubber\BetterReflectionStubberPlugin + - class: \SelfDocConfig\Plugin\TwigFilterClassParser\TwigFilterClassParserPlugin + - class: \SelfDocConfig\Plugin\TwigFunctionClassParser\TwigFunctionClassParserPlugin ``` {{ "Default plugins" | textToHeading('H2') }} @@ -32,8 +32,8 @@ Plugins for any programming languages work regardless of which language handler {% for pluginEntity in phpClassEntityCollection .filterByPaths([ - '/BumbleDocGen/Core', - '/BumbleDocGen/LanguageHandler', + '/src/Core', + '/src/LanguageHandler', ]) .filterByInterfaces(['BumbleDocGen\\Core\\Plugin\\PluginInterface']) .getOnlyInstantiable() @@ -58,8 +58,8 @@ Plugins for any programming languages work regardless of which language handler {{ printEntityCollectionAsList( phpClassEntityCollection .filterByPaths([ - '/BumbleDocGen/Core', - '/BumbleDocGen/LanguageHandler', + '/src/Core', + '/src/LanguageHandler', ]) .filterByParentClassNames(['Symfony\\Contracts\\EventDispatcher\\Event']) .getOnlyInstantiable() ) }} diff --git a/SelfDoc/Configuration/templates/tech/map.md.twig b/selfdoc/templates/tech/map.md.twig similarity index 70% rename from SelfDoc/Configuration/templates/tech/map.md.twig rename to selfdoc/templates/tech/map.md.twig index af1591f6..ff9ed9a4 100644 --- a/SelfDoc/Configuration/templates/tech/map.md.twig +++ b/selfdoc/templates/tech/map.md.twig @@ -4,4 +4,4 @@ Directory layout ( only documented files shown ): -{{ drawClassMap( phpClassEntityCollection.filterByPaths(['/BumbleDocGen']) ) }} \ No newline at end of file +{{ drawClassMap( phpClassEntityCollection.filterByPaths(['/src']) ) }} \ No newline at end of file diff --git a/SelfDoc/Configuration/templates/tech/readme.md.twig b/selfdoc/templates/tech/readme.md.twig similarity index 100% rename from SelfDoc/Configuration/templates/tech/readme.md.twig rename to selfdoc/templates/tech/readme.md.twig diff --git a/src/Console/App.php b/src/Console/App.php new file mode 100644 index 00000000..94761263 --- /dev/null +++ b/src/Console/App.php @@ -0,0 +1,17 @@ +add(new GenerateCommand()); + } +} diff --git a/src/Console/Command/GenerateCommand.php b/src/Console/Command/GenerateCommand.php new file mode 100644 index 00000000..13ef870c --- /dev/null +++ b/src/Console/Command/GenerateCommand.php @@ -0,0 +1,84 @@ + 'Path to the directory of the documented project', + 'templates_dir' => 'Path to directory with documentation templates', + 'output_dir' => 'Path to the directory where the finished documentation will be generated', + 'cache_dir' => 'Configuration parameter: Path to the directory where the documentation generator cache will be saved', + ]; + + protected function configure(): void + { + $this->setName('generate') + ->setDescription('Generate documentation') + ->addOption( + 'config', + 'c', + InputOption::VALUE_NEGATABLE, + 'Path to the configuration file, specified as absolute or relative to the working directory [default: "bumble_doc_gen.yaml"]>', + 'bumble_doc_gen.yaml' + ); + + foreach ($this->customConfigOptions as $optionName => $description) { + $this->addOption( + $optionName, + null, + InputOption::VALUE_OPTIONAL, + "Config parameter:> {$description}" + ); + } + } + + /** + * @throws NotFoundException + * @throws DependencyException + * @throws InvalidArgumentException + */ + protected function execute( + InputInterface $input, + OutputInterface $output + ): int { + $docGeneratorFactory = (new DocGeneratorFactory()); + $docGeneratorFactory->setCustomConfigurationParameters( + $this->getCustomConfigurationParameters($input) + ); + + $configFile = $input->getOption('config'); + if ($configFile && Path::isRelative($configFile)) { + $configFile = getcwd() . DIRECTORY_SEPARATOR . $configFile; + $docGeneratorFactory->create($configFile)->generate(); + } else { + $docGeneratorFactory->create()->generate(); + } + + return self::SUCCESS; + } + + private function getCustomConfigurationParameters(InputInterface $input): array + { + $customConfigurationParameters = []; + foreach ($this->customConfigOptions as $optionName => $description) { + $optionValue = $input->getOption($optionName); + if (!is_null($optionValue)) { + $customConfigurationParameters[$optionName] = $optionValue; + } + } + return $customConfigurationParameters; + } +} diff --git a/BumbleDocGen/Core/Cache/EntityCacheItemPool.php b/src/Core/Cache/EntityCacheItemPool.php similarity index 100% rename from BumbleDocGen/Core/Cache/EntityCacheItemPool.php rename to src/Core/Cache/EntityCacheItemPool.php diff --git a/BumbleDocGen/Core/Cache/LocalCache/Exception/ObjectNotFoundException.php b/src/Core/Cache/LocalCache/Exception/ObjectNotFoundException.php similarity index 100% rename from BumbleDocGen/Core/Cache/LocalCache/Exception/ObjectNotFoundException.php rename to src/Core/Cache/LocalCache/Exception/ObjectNotFoundException.php diff --git a/BumbleDocGen/Core/Cache/LocalCache/LocalObjectCache.php b/src/Core/Cache/LocalCache/LocalObjectCache.php similarity index 100% rename from BumbleDocGen/Core/Cache/LocalCache/LocalObjectCache.php rename to src/Core/Cache/LocalCache/LocalObjectCache.php diff --git a/BumbleDocGen/Core/Cache/SharedCompressedDocumentFileCache.php b/src/Core/Cache/SharedCompressedDocumentFileCache.php similarity index 100% rename from BumbleDocGen/Core/Cache/SharedCompressedDocumentFileCache.php rename to src/Core/Cache/SharedCompressedDocumentFileCache.php diff --git a/BumbleDocGen/Core/Cache/SourceLocatorCacheItemPool.php b/src/Core/Cache/SourceLocatorCacheItemPool.php similarity index 100% rename from BumbleDocGen/Core/Cache/SourceLocatorCacheItemPool.php rename to src/Core/Cache/SourceLocatorCacheItemPool.php diff --git a/BumbleDocGen/Core/Configuration/Configuration.php b/src/Core/Configuration/Configuration.php similarity index 98% rename from BumbleDocGen/Core/Configuration/Configuration.php rename to src/Core/Configuration/Configuration.php index 6c7ca308..4bff70a4 100644 --- a/BumbleDocGen/Core/Configuration/Configuration.php +++ b/src/Core/Configuration/Configuration.php @@ -112,6 +112,13 @@ public function getOutputDir(): string "`output_dir` cannot be created because parent directory `{$parentDir}` does not exist" ); } + + if (!is_writable($parentDir)) { + throw new InvalidConfigurationParameterException( + "`output_dir` cannot be created because parent directory `{$parentDir}` is not writable" + ); + } + if (!file_exists($outputDir)) { $this->logger->notice("Creating `{$outputDir}` directory"); mkdir($outputDir); diff --git a/BumbleDocGen/Core/Configuration/ConfigurationParameterBag.php b/src/Core/Configuration/ConfigurationParameterBag.php similarity index 99% rename from BumbleDocGen/Core/Configuration/ConfigurationParameterBag.php rename to src/Core/Configuration/ConfigurationParameterBag.php index 40ac81bf..a8c7f1f7 100644 --- a/BumbleDocGen/Core/Configuration/ConfigurationParameterBag.php +++ b/src/Core/Configuration/ConfigurationParameterBag.php @@ -72,7 +72,7 @@ public function set(string $name, mixed $value): void foreach ($keys as $key) { $value = [$key => $value]; } - $this->parameters = array_merge_recursive($value, $this->parameters); + $this->parameters = $this->mergeConfigParams($this->parameters, $value); } public function addValueIfNotExists(string $name, mixed $value): void diff --git a/BumbleDocGen/Core/Configuration/Exception/InvalidConfigurationParameterException.php b/src/Core/Configuration/Exception/InvalidConfigurationParameterException.php similarity index 100% rename from BumbleDocGen/Core/Configuration/Exception/InvalidConfigurationParameterException.php rename to src/Core/Configuration/Exception/InvalidConfigurationParameterException.php diff --git a/BumbleDocGen/Core/Configuration/ValueResolver/ArgvValueResolver.php b/src/Core/Configuration/ValueResolver/ArgvValueResolver.php similarity index 100% rename from BumbleDocGen/Core/Configuration/ValueResolver/ArgvValueResolver.php rename to src/Core/Configuration/ValueResolver/ArgvValueResolver.php diff --git a/BumbleDocGen/Core/Configuration/ValueResolver/InternalValueResolver.php b/src/Core/Configuration/ValueResolver/InternalValueResolver.php similarity index 100% rename from BumbleDocGen/Core/Configuration/ValueResolver/InternalValueResolver.php rename to src/Core/Configuration/ValueResolver/InternalValueResolver.php diff --git a/BumbleDocGen/Core/Configuration/ValueResolver/RefValueResolver.php b/src/Core/Configuration/ValueResolver/RefValueResolver.php similarity index 100% rename from BumbleDocGen/Core/Configuration/ValueResolver/RefValueResolver.php rename to src/Core/Configuration/ValueResolver/RefValueResolver.php diff --git a/BumbleDocGen/Core/Configuration/ValueResolver/ValueResolverInterface.php b/src/Core/Configuration/ValueResolver/ValueResolverInterface.php similarity index 100% rename from BumbleDocGen/Core/Configuration/ValueResolver/ValueResolverInterface.php rename to src/Core/Configuration/ValueResolver/ValueResolverInterface.php diff --git a/BumbleDocGen/Core/Configuration/ValueTransformer/ValueToClassTransformer.php b/src/Core/Configuration/ValueTransformer/ValueToClassTransformer.php similarity index 100% rename from BumbleDocGen/Core/Configuration/ValueTransformer/ValueToClassTransformer.php rename to src/Core/Configuration/ValueTransformer/ValueToClassTransformer.php diff --git a/BumbleDocGen/Core/Configuration/ValueTransformer/ValueTransformerInterface.php b/src/Core/Configuration/ValueTransformer/ValueTransformerInterface.php similarity index 100% rename from BumbleDocGen/Core/Configuration/ValueTransformer/ValueTransformerInterface.php rename to src/Core/Configuration/ValueTransformer/ValueTransformerInterface.php diff --git a/BumbleDocGen/Core/Configuration/defaultConfiguration.yaml b/src/Core/Configuration/defaultConfiguration.yaml similarity index 95% rename from BumbleDocGen/Core/Configuration/defaultConfiguration.yaml rename to src/Core/Configuration/defaultConfiguration.yaml index bd1c6332..e652c1e2 100644 --- a/BumbleDocGen/Core/Configuration/defaultConfiguration.yaml +++ b/src/Core/Configuration/defaultConfiguration.yaml @@ -2,7 +2,7 @@ parent_configuration: # (string|null) Path to parent configuration f project_root: # (string) Path to the directory of the documented project (or part of the project) templates_dir: # (string) Path to directory with documentation templates output_dir: "%project_root%/docs" # (string) Path to the directory where the finished documentation will be generated -cache_dir: '%WORKING_DIR%/__cache'# (string|null) Path to the directory where the documentation generator cache will be saved +cache_dir: '%WORKING_DIR%/.bumbleDocGenCache'# (string|null) Path to the directory where the documentation generator cache will be saved output_dir_base_url: "/docs" # (string) Basic part of url documentation. Used to form links in generated documents. git_client_path: "git" # (string) Path to git client check_file_in_git_before_creating_doc: true # (bool) Checking if a document exists in GIT before creating a document diff --git a/BumbleDocGen/Core/Console/ProgressBarFactory.php b/src/Core/Console/ProgressBarFactory.php similarity index 100% rename from BumbleDocGen/Core/Console/ProgressBarFactory.php rename to src/Core/Console/ProgressBarFactory.php diff --git a/BumbleDocGen/Core/Console/StylizedProgressBar.php b/src/Core/Console/StylizedProgressBar.php similarity index 100% rename from BumbleDocGen/Core/Console/StylizedProgressBar.php rename to src/Core/Console/StylizedProgressBar.php diff --git a/BumbleDocGen/Core/Parser/Entity/BaseEntityCollection.php b/src/Core/Parser/Entity/BaseEntityCollection.php similarity index 100% rename from BumbleDocGen/Core/Parser/Entity/BaseEntityCollection.php rename to src/Core/Parser/Entity/BaseEntityCollection.php diff --git a/BumbleDocGen/Core/Parser/Entity/Cache/CacheKey/CacheKeyGeneratorInterface.php b/src/Core/Parser/Entity/Cache/CacheKey/CacheKeyGeneratorInterface.php similarity index 100% rename from BumbleDocGen/Core/Parser/Entity/Cache/CacheKey/CacheKeyGeneratorInterface.php rename to src/Core/Parser/Entity/Cache/CacheKey/CacheKeyGeneratorInterface.php diff --git a/BumbleDocGen/Core/Parser/Entity/Cache/CacheKey/DefaultCacheKeyGenerator.php b/src/Core/Parser/Entity/Cache/CacheKey/DefaultCacheKeyGenerator.php similarity index 100% rename from BumbleDocGen/Core/Parser/Entity/Cache/CacheKey/DefaultCacheKeyGenerator.php rename to src/Core/Parser/Entity/Cache/CacheKey/DefaultCacheKeyGenerator.php diff --git a/BumbleDocGen/Core/Parser/Entity/Cache/CacheKey/RendererContextCacheKeyGenerator.php b/src/Core/Parser/Entity/Cache/CacheKey/RendererContextCacheKeyGenerator.php similarity index 100% rename from BumbleDocGen/Core/Parser/Entity/Cache/CacheKey/RendererContextCacheKeyGenerator.php rename to src/Core/Parser/Entity/Cache/CacheKey/RendererContextCacheKeyGenerator.php diff --git a/BumbleDocGen/Core/Parser/Entity/Cache/CacheableEntityInterface.php b/src/Core/Parser/Entity/Cache/CacheableEntityInterface.php similarity index 100% rename from BumbleDocGen/Core/Parser/Entity/Cache/CacheableEntityInterface.php rename to src/Core/Parser/Entity/Cache/CacheableEntityInterface.php diff --git a/BumbleDocGen/Core/Parser/Entity/Cache/CacheableEntityTrait.php b/src/Core/Parser/Entity/Cache/CacheableEntityTrait.php similarity index 100% rename from BumbleDocGen/Core/Parser/Entity/Cache/CacheableEntityTrait.php rename to src/Core/Parser/Entity/Cache/CacheableEntityTrait.php diff --git a/BumbleDocGen/Core/Parser/Entity/Cache/CacheableEntityWrapperFactory.php b/src/Core/Parser/Entity/Cache/CacheableEntityWrapperFactory.php similarity index 100% rename from BumbleDocGen/Core/Parser/Entity/Cache/CacheableEntityWrapperFactory.php rename to src/Core/Parser/Entity/Cache/CacheableEntityWrapperFactory.php diff --git a/BumbleDocGen/Core/Parser/Entity/Cache/CacheableEntityWrapperTrait.php b/src/Core/Parser/Entity/Cache/CacheableEntityWrapperTrait.php similarity index 100% rename from BumbleDocGen/Core/Parser/Entity/Cache/CacheableEntityWrapperTrait.php rename to src/Core/Parser/Entity/Cache/CacheableEntityWrapperTrait.php diff --git a/BumbleDocGen/Core/Parser/Entity/Cache/CacheableMethod.php b/src/Core/Parser/Entity/Cache/CacheableMethod.php similarity index 100% rename from BumbleDocGen/Core/Parser/Entity/Cache/CacheableMethod.php rename to src/Core/Parser/Entity/Cache/CacheableMethod.php diff --git a/BumbleDocGen/Core/Parser/Entity/Cache/EntityCacheStorageHelper.php b/src/Core/Parser/Entity/Cache/EntityCacheStorageHelper.php similarity index 100% rename from BumbleDocGen/Core/Parser/Entity/Cache/EntityCacheStorageHelper.php rename to src/Core/Parser/Entity/Cache/EntityCacheStorageHelper.php diff --git a/BumbleDocGen/Core/Parser/Entity/CollectionLogOperation/CloneOperation.php b/src/Core/Parser/Entity/CollectionLogOperation/CloneOperation.php similarity index 100% rename from BumbleDocGen/Core/Parser/Entity/CollectionLogOperation/CloneOperation.php rename to src/Core/Parser/Entity/CollectionLogOperation/CloneOperation.php diff --git a/BumbleDocGen/Core/Parser/Entity/CollectionLogOperation/IterateEntitiesOperation.php b/src/Core/Parser/Entity/CollectionLogOperation/IterateEntitiesOperation.php similarity index 100% rename from BumbleDocGen/Core/Parser/Entity/CollectionLogOperation/IterateEntitiesOperation.php rename to src/Core/Parser/Entity/CollectionLogOperation/IterateEntitiesOperation.php diff --git a/BumbleDocGen/Core/Parser/Entity/CollectionLogOperation/OperationInterface.php b/src/Core/Parser/Entity/CollectionLogOperation/OperationInterface.php similarity index 100% rename from BumbleDocGen/Core/Parser/Entity/CollectionLogOperation/OperationInterface.php rename to src/Core/Parser/Entity/CollectionLogOperation/OperationInterface.php diff --git a/BumbleDocGen/Core/Parser/Entity/CollectionLogOperation/OperationsCollection.php b/src/Core/Parser/Entity/CollectionLogOperation/OperationsCollection.php similarity index 100% rename from BumbleDocGen/Core/Parser/Entity/CollectionLogOperation/OperationsCollection.php rename to src/Core/Parser/Entity/CollectionLogOperation/OperationsCollection.php diff --git a/BumbleDocGen/Core/Parser/Entity/CollectionLogOperation/SingleEntitySearchOperation.php b/src/Core/Parser/Entity/CollectionLogOperation/SingleEntitySearchOperation.php similarity index 100% rename from BumbleDocGen/Core/Parser/Entity/CollectionLogOperation/SingleEntitySearchOperation.php rename to src/Core/Parser/Entity/CollectionLogOperation/SingleEntitySearchOperation.php diff --git a/BumbleDocGen/Core/Parser/Entity/EntityInterface.php b/src/Core/Parser/Entity/EntityInterface.php similarity index 100% rename from BumbleDocGen/Core/Parser/Entity/EntityInterface.php rename to src/Core/Parser/Entity/EntityInterface.php diff --git a/BumbleDocGen/Core/Parser/Entity/LoggableRootEntityCollection.php b/src/Core/Parser/Entity/LoggableRootEntityCollection.php similarity index 100% rename from BumbleDocGen/Core/Parser/Entity/LoggableRootEntityCollection.php rename to src/Core/Parser/Entity/LoggableRootEntityCollection.php diff --git a/BumbleDocGen/Core/Parser/Entity/RootEntityCollection.php b/src/Core/Parser/Entity/RootEntityCollection.php similarity index 100% rename from BumbleDocGen/Core/Parser/Entity/RootEntityCollection.php rename to src/Core/Parser/Entity/RootEntityCollection.php diff --git a/BumbleDocGen/Core/Parser/Entity/RootEntityCollectionsGroup.php b/src/Core/Parser/Entity/RootEntityCollectionsGroup.php similarity index 100% rename from BumbleDocGen/Core/Parser/Entity/RootEntityCollectionsGroup.php rename to src/Core/Parser/Entity/RootEntityCollectionsGroup.php diff --git a/BumbleDocGen/Core/Parser/Entity/RootEntityInterface.php b/src/Core/Parser/Entity/RootEntityInterface.php similarity index 100% rename from BumbleDocGen/Core/Parser/Entity/RootEntityInterface.php rename to src/Core/Parser/Entity/RootEntityInterface.php diff --git a/BumbleDocGen/Core/Parser/FilterCondition/CommonFilterCondition/FalseCondition.php b/src/Core/Parser/FilterCondition/CommonFilterCondition/FalseCondition.php similarity index 100% rename from BumbleDocGen/Core/Parser/FilterCondition/CommonFilterCondition/FalseCondition.php rename to src/Core/Parser/FilterCondition/CommonFilterCondition/FalseCondition.php diff --git a/BumbleDocGen/Core/Parser/FilterCondition/CommonFilterCondition/FileTextContainsCondition.php b/src/Core/Parser/FilterCondition/CommonFilterCondition/FileTextContainsCondition.php similarity index 100% rename from BumbleDocGen/Core/Parser/FilterCondition/CommonFilterCondition/FileTextContainsCondition.php rename to src/Core/Parser/FilterCondition/CommonFilterCondition/FileTextContainsCondition.php diff --git a/BumbleDocGen/Core/Parser/FilterCondition/CommonFilterCondition/LocatedInCondition.php b/src/Core/Parser/FilterCondition/CommonFilterCondition/LocatedInCondition.php similarity index 100% rename from BumbleDocGen/Core/Parser/FilterCondition/CommonFilterCondition/LocatedInCondition.php rename to src/Core/Parser/FilterCondition/CommonFilterCondition/LocatedInCondition.php diff --git a/BumbleDocGen/Core/Parser/FilterCondition/CommonFilterCondition/TrueCondition.php b/src/Core/Parser/FilterCondition/CommonFilterCondition/TrueCondition.php similarity index 100% rename from BumbleDocGen/Core/Parser/FilterCondition/CommonFilterCondition/TrueCondition.php rename to src/Core/Parser/FilterCondition/CommonFilterCondition/TrueCondition.php diff --git a/BumbleDocGen/Core/Parser/FilterCondition/ConditionGroup.php b/src/Core/Parser/FilterCondition/ConditionGroup.php similarity index 100% rename from BumbleDocGen/Core/Parser/FilterCondition/ConditionGroup.php rename to src/Core/Parser/FilterCondition/ConditionGroup.php diff --git a/BumbleDocGen/Core/Parser/FilterCondition/ConditionGroupTypeEnum.php b/src/Core/Parser/FilterCondition/ConditionGroupTypeEnum.php similarity index 100% rename from BumbleDocGen/Core/Parser/FilterCondition/ConditionGroupTypeEnum.php rename to src/Core/Parser/FilterCondition/ConditionGroupTypeEnum.php diff --git a/BumbleDocGen/Core/Parser/FilterCondition/ConditionInterface.php b/src/Core/Parser/FilterCondition/ConditionInterface.php similarity index 100% rename from BumbleDocGen/Core/Parser/FilterCondition/ConditionInterface.php rename to src/Core/Parser/FilterCondition/ConditionInterface.php diff --git a/BumbleDocGen/Core/Parser/ProjectParser.php b/src/Core/Parser/ProjectParser.php similarity index 100% rename from BumbleDocGen/Core/Parser/ProjectParser.php rename to src/Core/Parser/ProjectParser.php diff --git a/BumbleDocGen/Core/Parser/SourceLocator/BaseSourceLocator.php b/src/Core/Parser/SourceLocator/BaseSourceLocator.php similarity index 100% rename from BumbleDocGen/Core/Parser/SourceLocator/BaseSourceLocator.php rename to src/Core/Parser/SourceLocator/BaseSourceLocator.php diff --git a/BumbleDocGen/Core/Parser/SourceLocator/DirectoriesSourceLocator.php b/src/Core/Parser/SourceLocator/DirectoriesSourceLocator.php similarity index 100% rename from BumbleDocGen/Core/Parser/SourceLocator/DirectoriesSourceLocator.php rename to src/Core/Parser/SourceLocator/DirectoriesSourceLocator.php diff --git a/BumbleDocGen/Core/Parser/SourceLocator/FileIteratorSourceLocator.php b/src/Core/Parser/SourceLocator/FileIteratorSourceLocator.php similarity index 100% rename from BumbleDocGen/Core/Parser/SourceLocator/FileIteratorSourceLocator.php rename to src/Core/Parser/SourceLocator/FileIteratorSourceLocator.php diff --git a/BumbleDocGen/Core/Parser/SourceLocator/RecursiveDirectoriesSourceLocator.php b/src/Core/Parser/SourceLocator/RecursiveDirectoriesSourceLocator.php similarity index 100% rename from BumbleDocGen/Core/Parser/SourceLocator/RecursiveDirectoriesSourceLocator.php rename to src/Core/Parser/SourceLocator/RecursiveDirectoriesSourceLocator.php diff --git a/BumbleDocGen/Core/Parser/SourceLocator/SingleFileSourceLocator.php b/src/Core/Parser/SourceLocator/SingleFileSourceLocator.php similarity index 100% rename from BumbleDocGen/Core/Parser/SourceLocator/SingleFileSourceLocator.php rename to src/Core/Parser/SourceLocator/SingleFileSourceLocator.php diff --git a/BumbleDocGen/Core/Parser/SourceLocator/SourceLocatorInterface.php b/src/Core/Parser/SourceLocator/SourceLocatorInterface.php similarity index 100% rename from BumbleDocGen/Core/Parser/SourceLocator/SourceLocatorInterface.php rename to src/Core/Parser/SourceLocator/SourceLocatorInterface.php diff --git a/BumbleDocGen/Core/Parser/SourceLocator/SourceLocatorsCollection.php b/src/Core/Parser/SourceLocator/SourceLocatorsCollection.php similarity index 100% rename from BumbleDocGen/Core/Parser/SourceLocator/SourceLocatorsCollection.php rename to src/Core/Parser/SourceLocator/SourceLocatorsCollection.php diff --git a/BumbleDocGen/Core/Plugin/CorePlugin/LastPageCommitter/LastPageCommitter.php b/src/Core/Plugin/CorePlugin/LastPageCommitter/LastPageCommitter.php similarity index 96% rename from BumbleDocGen/Core/Plugin/CorePlugin/LastPageCommitter/LastPageCommitter.php rename to src/Core/Plugin/CorePlugin/LastPageCommitter/LastPageCommitter.php index 840c41bc..a39b2ba6 100644 --- a/BumbleDocGen/Core/Plugin/CorePlugin/LastPageCommitter/LastPageCommitter.php +++ b/src/Core/Plugin/CorePlugin/LastPageCommitter/LastPageCommitter.php @@ -46,7 +46,7 @@ final public function beforeCreatingDocFile(BeforeCreatingDocFile $event): void $author = str_replace('Author:', 'Last page committer:', htmlspecialchars($output[1])); $date = str_replace('Date:', 'Last modified date:', $output[2]); $contentRegenerationDate = 'Page content update date: ' . date('D M d Y'); - $content .= "\n\n\n\n{$author}{$date}{$contentRegenerationDate}Made with Bumble Documentation Generator"; + $content .= "\n\n\n\n{$author}{$date}{$contentRegenerationDate}Made with Bumble Documentation Generator"; } $event->setContent($content); } diff --git a/BumbleDocGen/Core/Plugin/CorePlugin/PageLinker/BasePageLinker.php b/src/Core/Plugin/CorePlugin/PageLinker/BasePageLinker.php similarity index 100% rename from BumbleDocGen/Core/Plugin/CorePlugin/PageLinker/BasePageLinker.php rename to src/Core/Plugin/CorePlugin/PageLinker/BasePageLinker.php diff --git a/BumbleDocGen/Core/Plugin/CorePlugin/PageLinker/PageHtmlLinkerPlugin.php b/src/Core/Plugin/CorePlugin/PageLinker/PageHtmlLinkerPlugin.php similarity index 100% rename from BumbleDocGen/Core/Plugin/CorePlugin/PageLinker/PageHtmlLinkerPlugin.php rename to src/Core/Plugin/CorePlugin/PageLinker/PageHtmlLinkerPlugin.php diff --git a/BumbleDocGen/Core/Plugin/CorePlugin/PageLinker/PageRstLinkerPlugin.php b/src/Core/Plugin/CorePlugin/PageLinker/PageRstLinkerPlugin.php similarity index 100% rename from BumbleDocGen/Core/Plugin/CorePlugin/PageLinker/PageRstLinkerPlugin.php rename to src/Core/Plugin/CorePlugin/PageLinker/PageRstLinkerPlugin.php diff --git a/BumbleDocGen/Core/Plugin/Event/Parser/OnLoadSourceLocatorsCollection.php b/src/Core/Plugin/Event/Parser/OnLoadSourceLocatorsCollection.php similarity index 100% rename from BumbleDocGen/Core/Plugin/Event/Parser/OnLoadSourceLocatorsCollection.php rename to src/Core/Plugin/Event/Parser/OnLoadSourceLocatorsCollection.php diff --git a/BumbleDocGen/Core/Plugin/Event/Renderer/BeforeCreatingDocFile.php b/src/Core/Plugin/Event/Renderer/BeforeCreatingDocFile.php similarity index 100% rename from BumbleDocGen/Core/Plugin/Event/Renderer/BeforeCreatingDocFile.php rename to src/Core/Plugin/Event/Renderer/BeforeCreatingDocFile.php diff --git a/BumbleDocGen/Core/Plugin/Event/Renderer/OnGettingResourceLink.php b/src/Core/Plugin/Event/Renderer/OnGettingResourceLink.php similarity index 100% rename from BumbleDocGen/Core/Plugin/Event/Renderer/OnGettingResourceLink.php rename to src/Core/Plugin/Event/Renderer/OnGettingResourceLink.php diff --git a/BumbleDocGen/Core/Plugin/Event/Renderer/OnLoadEntityDocPluginContent.php b/src/Core/Plugin/Event/Renderer/OnLoadEntityDocPluginContent.php similarity index 100% rename from BumbleDocGen/Core/Plugin/Event/Renderer/OnLoadEntityDocPluginContent.php rename to src/Core/Plugin/Event/Renderer/OnLoadEntityDocPluginContent.php diff --git a/BumbleDocGen/Core/Plugin/OnlySingleExecutionEvent.php b/src/Core/Plugin/OnlySingleExecutionEvent.php similarity index 100% rename from BumbleDocGen/Core/Plugin/OnlySingleExecutionEvent.php rename to src/Core/Plugin/OnlySingleExecutionEvent.php diff --git a/BumbleDocGen/Core/Plugin/PluginEventDispatcher.php b/src/Core/Plugin/PluginEventDispatcher.php similarity index 100% rename from BumbleDocGen/Core/Plugin/PluginEventDispatcher.php rename to src/Core/Plugin/PluginEventDispatcher.php diff --git a/BumbleDocGen/Core/Plugin/PluginInterface.php b/src/Core/Plugin/PluginInterface.php similarity index 100% rename from BumbleDocGen/Core/Plugin/PluginInterface.php rename to src/Core/Plugin/PluginInterface.php diff --git a/BumbleDocGen/Core/Plugin/PluginsCollection.php b/src/Core/Plugin/PluginsCollection.php similarity index 100% rename from BumbleDocGen/Core/Plugin/PluginsCollection.php rename to src/Core/Plugin/PluginsCollection.php diff --git a/BumbleDocGen/Core/Renderer/Breadcrumbs/BreadcrumbsHelper.php b/src/Core/Renderer/Breadcrumbs/BreadcrumbsHelper.php similarity index 99% rename from BumbleDocGen/Core/Renderer/Breadcrumbs/BreadcrumbsHelper.php rename to src/Core/Renderer/Breadcrumbs/BreadcrumbsHelper.php index 8a197d6d..aa43054b 100644 --- a/BumbleDocGen/Core/Renderer/Breadcrumbs/BreadcrumbsHelper.php +++ b/src/Core/Renderer/Breadcrumbs/BreadcrumbsHelper.php @@ -23,7 +23,7 @@ final class BreadcrumbsHelper /** * The name template of the file that will be the entry point when switching between pages */ - public const DEFAULT_PREV_PAGE_NAME_TEMPLATE = '/^((readme|index)\.(rst|md)\.twig)/'; + public const DEFAULT_PREV_PAGE_NAME_TEMPLATE = '/^((readme|index)\.(rst|md)\.twig)/i'; private array $keyUsageCount = []; diff --git a/BumbleDocGen/Core/Renderer/Breadcrumbs/BreadcrumbsTwigEnvironment.php b/src/Core/Renderer/Breadcrumbs/BreadcrumbsTwigEnvironment.php similarity index 100% rename from BumbleDocGen/Core/Renderer/Breadcrumbs/BreadcrumbsTwigEnvironment.php rename to src/Core/Renderer/Breadcrumbs/BreadcrumbsTwigEnvironment.php diff --git a/BumbleDocGen/Core/Renderer/Breadcrumbs/templates/breadcrumbs.html.twig b/src/Core/Renderer/Breadcrumbs/templates/breadcrumbs.html.twig similarity index 100% rename from BumbleDocGen/Core/Renderer/Breadcrumbs/templates/breadcrumbs.html.twig rename to src/Core/Renderer/Breadcrumbs/templates/breadcrumbs.html.twig diff --git a/BumbleDocGen/Core/Renderer/Context/Dependency/DirectoryDependency.php b/src/Core/Renderer/Context/Dependency/DirectoryDependency.php similarity index 100% rename from BumbleDocGen/Core/Renderer/Context/Dependency/DirectoryDependency.php rename to src/Core/Renderer/Context/Dependency/DirectoryDependency.php diff --git a/BumbleDocGen/Core/Renderer/Context/Dependency/FileDependency.php b/src/Core/Renderer/Context/Dependency/FileDependency.php similarity index 100% rename from BumbleDocGen/Core/Renderer/Context/Dependency/FileDependency.php rename to src/Core/Renderer/Context/Dependency/FileDependency.php diff --git a/BumbleDocGen/Core/Renderer/Context/Dependency/RendererDependencyFactory.php b/src/Core/Renderer/Context/Dependency/RendererDependencyFactory.php similarity index 100% rename from BumbleDocGen/Core/Renderer/Context/Dependency/RendererDependencyFactory.php rename to src/Core/Renderer/Context/Dependency/RendererDependencyFactory.php diff --git a/BumbleDocGen/Core/Renderer/Context/Dependency/RendererDependencyInterface.php b/src/Core/Renderer/Context/Dependency/RendererDependencyInterface.php similarity index 100% rename from BumbleDocGen/Core/Renderer/Context/Dependency/RendererDependencyInterface.php rename to src/Core/Renderer/Context/Dependency/RendererDependencyInterface.php diff --git a/BumbleDocGen/Core/Renderer/Context/DocumentTransformableEntityInterface.php b/src/Core/Renderer/Context/DocumentTransformableEntityInterface.php similarity index 100% rename from BumbleDocGen/Core/Renderer/Context/DocumentTransformableEntityInterface.php rename to src/Core/Renderer/Context/DocumentTransformableEntityInterface.php diff --git a/BumbleDocGen/Core/Renderer/Context/DocumentedEntityWrapper.php b/src/Core/Renderer/Context/DocumentedEntityWrapper.php similarity index 100% rename from BumbleDocGen/Core/Renderer/Context/DocumentedEntityWrapper.php rename to src/Core/Renderer/Context/DocumentedEntityWrapper.php diff --git a/BumbleDocGen/Core/Renderer/Context/DocumentedEntityWrappersCollection.php b/src/Core/Renderer/Context/DocumentedEntityWrappersCollection.php similarity index 100% rename from BumbleDocGen/Core/Renderer/Context/DocumentedEntityWrappersCollection.php rename to src/Core/Renderer/Context/DocumentedEntityWrappersCollection.php diff --git a/BumbleDocGen/Core/Renderer/Context/RendererContext.php b/src/Core/Renderer/Context/RendererContext.php similarity index 100% rename from BumbleDocGen/Core/Renderer/Context/RendererContext.php rename to src/Core/Renderer/Context/RendererContext.php diff --git a/BumbleDocGen/Core/Renderer/EntityDocRenderer/EntityDocRendererInterface.php b/src/Core/Renderer/EntityDocRenderer/EntityDocRendererInterface.php similarity index 100% rename from BumbleDocGen/Core/Renderer/EntityDocRenderer/EntityDocRendererInterface.php rename to src/Core/Renderer/EntityDocRenderer/EntityDocRendererInterface.php diff --git a/BumbleDocGen/Core/Renderer/EntityDocRenderer/EntityDocRenderersCollection.php b/src/Core/Renderer/EntityDocRenderer/EntityDocRenderersCollection.php similarity index 100% rename from BumbleDocGen/Core/Renderer/EntityDocRenderer/EntityDocRenderersCollection.php rename to src/Core/Renderer/EntityDocRenderer/EntityDocRenderersCollection.php diff --git a/BumbleDocGen/Core/Renderer/PageLinkProcessor/BasePageLinkProcessor.php b/src/Core/Renderer/PageLinkProcessor/BasePageLinkProcessor.php similarity index 100% rename from BumbleDocGen/Core/Renderer/PageLinkProcessor/BasePageLinkProcessor.php rename to src/Core/Renderer/PageLinkProcessor/BasePageLinkProcessor.php diff --git a/BumbleDocGen/Core/Renderer/PageLinkProcessor/GithubPagesLinkProcessor.php b/src/Core/Renderer/PageLinkProcessor/GithubPagesLinkProcessor.php similarity index 100% rename from BumbleDocGen/Core/Renderer/PageLinkProcessor/GithubPagesLinkProcessor.php rename to src/Core/Renderer/PageLinkProcessor/GithubPagesLinkProcessor.php diff --git a/BumbleDocGen/Core/Renderer/PageLinkProcessor/PageLinkProcessorInterface.php b/src/Core/Renderer/PageLinkProcessor/PageLinkProcessorInterface.php similarity index 100% rename from BumbleDocGen/Core/Renderer/PageLinkProcessor/PageLinkProcessorInterface.php rename to src/Core/Renderer/PageLinkProcessor/PageLinkProcessorInterface.php diff --git a/BumbleDocGen/Core/Renderer/Renderer.php b/src/Core/Renderer/Renderer.php similarity index 100% rename from BumbleDocGen/Core/Renderer/Renderer.php rename to src/Core/Renderer/Renderer.php diff --git a/BumbleDocGen/Core/Renderer/RendererHelper.php b/src/Core/Renderer/RendererHelper.php similarity index 100% rename from BumbleDocGen/Core/Renderer/RendererHelper.php rename to src/Core/Renderer/RendererHelper.php diff --git a/BumbleDocGen/Core/Renderer/RendererIteratorFactory.php b/src/Core/Renderer/RendererIteratorFactory.php similarity index 100% rename from BumbleDocGen/Core/Renderer/RendererIteratorFactory.php rename to src/Core/Renderer/RendererIteratorFactory.php diff --git a/BumbleDocGen/Core/Renderer/Twig/Filter/AddIndentFromLeft.php b/src/Core/Renderer/Twig/Filter/AddIndentFromLeft.php similarity index 100% rename from BumbleDocGen/Core/Renderer/Twig/Filter/AddIndentFromLeft.php rename to src/Core/Renderer/Twig/Filter/AddIndentFromLeft.php diff --git a/BumbleDocGen/Core/Renderer/Twig/Filter/CustomFilterInterface.php b/src/Core/Renderer/Twig/Filter/CustomFilterInterface.php similarity index 100% rename from BumbleDocGen/Core/Renderer/Twig/Filter/CustomFilterInterface.php rename to src/Core/Renderer/Twig/Filter/CustomFilterInterface.php diff --git a/BumbleDocGen/Core/Renderer/Twig/Filter/CustomFiltersCollection.php b/src/Core/Renderer/Twig/Filter/CustomFiltersCollection.php similarity index 100% rename from BumbleDocGen/Core/Renderer/Twig/Filter/CustomFiltersCollection.php rename to src/Core/Renderer/Twig/Filter/CustomFiltersCollection.php diff --git a/BumbleDocGen/Core/Renderer/Twig/Filter/FixStrSize.php b/src/Core/Renderer/Twig/Filter/FixStrSize.php similarity index 100% rename from BumbleDocGen/Core/Renderer/Twig/Filter/FixStrSize.php rename to src/Core/Renderer/Twig/Filter/FixStrSize.php diff --git a/BumbleDocGen/Core/Renderer/Twig/Filter/PregMatch.php b/src/Core/Renderer/Twig/Filter/PregMatch.php similarity index 100% rename from BumbleDocGen/Core/Renderer/Twig/Filter/PregMatch.php rename to src/Core/Renderer/Twig/Filter/PregMatch.php diff --git a/BumbleDocGen/Core/Renderer/Twig/Filter/PrepareSourceLink.php b/src/Core/Renderer/Twig/Filter/PrepareSourceLink.php similarity index 100% rename from BumbleDocGen/Core/Renderer/Twig/Filter/PrepareSourceLink.php rename to src/Core/Renderer/Twig/Filter/PrepareSourceLink.php diff --git a/BumbleDocGen/Core/Renderer/Twig/Filter/Quotemeta.php b/src/Core/Renderer/Twig/Filter/Quotemeta.php similarity index 100% rename from BumbleDocGen/Core/Renderer/Twig/Filter/Quotemeta.php rename to src/Core/Renderer/Twig/Filter/Quotemeta.php diff --git a/BumbleDocGen/Core/Renderer/Twig/Filter/RemoveLineBrakes.php b/src/Core/Renderer/Twig/Filter/RemoveLineBrakes.php similarity index 100% rename from BumbleDocGen/Core/Renderer/Twig/Filter/RemoveLineBrakes.php rename to src/Core/Renderer/Twig/Filter/RemoveLineBrakes.php diff --git a/BumbleDocGen/Core/Renderer/Twig/Filter/StrTypeToUrl.php b/src/Core/Renderer/Twig/Filter/StrTypeToUrl.php similarity index 93% rename from BumbleDocGen/Core/Renderer/Twig/Filter/StrTypeToUrl.php rename to src/Core/Renderer/Twig/Filter/StrTypeToUrl.php index aac42857..3764fe10 100644 --- a/BumbleDocGen/Core/Renderer/Twig/Filter/StrTypeToUrl.php +++ b/src/Core/Renderer/Twig/Filter/StrTypeToUrl.php @@ -81,7 +81,12 @@ public function __invoke( } else { $type = "\\{$entityOfLink->getName()}"; } - $preparedTypes[] = "{$type}"; + + if ($link && $link !== '#') { + $preparedTypes[] = "{$type}"; + } else { + $preparedTypes[] = $type; + } } } else { if ($entityOfLink::isEntityNameValid($type)) { diff --git a/BumbleDocGen/Core/Renderer/Twig/Filter/TextToCodeBlock.php b/src/Core/Renderer/Twig/Filter/TextToCodeBlock.php similarity index 100% rename from BumbleDocGen/Core/Renderer/Twig/Filter/TextToCodeBlock.php rename to src/Core/Renderer/Twig/Filter/TextToCodeBlock.php diff --git a/BumbleDocGen/Core/Renderer/Twig/Filter/TextToHeading.php b/src/Core/Renderer/Twig/Filter/TextToHeading.php similarity index 100% rename from BumbleDocGen/Core/Renderer/Twig/Filter/TextToHeading.php rename to src/Core/Renderer/Twig/Filter/TextToHeading.php diff --git a/BumbleDocGen/Core/Renderer/Twig/Function/CustomFunctionInterface.php b/src/Core/Renderer/Twig/Function/CustomFunctionInterface.php similarity index 100% rename from BumbleDocGen/Core/Renderer/Twig/Function/CustomFunctionInterface.php rename to src/Core/Renderer/Twig/Function/CustomFunctionInterface.php diff --git a/BumbleDocGen/Core/Renderer/Twig/Function/CustomFunctionsCollection.php b/src/Core/Renderer/Twig/Function/CustomFunctionsCollection.php similarity index 100% rename from BumbleDocGen/Core/Renderer/Twig/Function/CustomFunctionsCollection.php rename to src/Core/Renderer/Twig/Function/CustomFunctionsCollection.php diff --git a/BumbleDocGen/Core/Renderer/Twig/Function/DrawDocumentationMenu.php b/src/Core/Renderer/Twig/Function/DrawDocumentationMenu.php similarity index 100% rename from BumbleDocGen/Core/Renderer/Twig/Function/DrawDocumentationMenu.php rename to src/Core/Renderer/Twig/Function/DrawDocumentationMenu.php diff --git a/BumbleDocGen/Core/Renderer/Twig/Function/DrawDocumentedEntityLink.php b/src/Core/Renderer/Twig/Function/DrawDocumentedEntityLink.php similarity index 100% rename from BumbleDocGen/Core/Renderer/Twig/Function/DrawDocumentedEntityLink.php rename to src/Core/Renderer/Twig/Function/DrawDocumentedEntityLink.php diff --git a/BumbleDocGen/Core/Renderer/Twig/Function/FileGetContents.php b/src/Core/Renderer/Twig/Function/FileGetContents.php similarity index 100% rename from BumbleDocGen/Core/Renderer/Twig/Function/FileGetContents.php rename to src/Core/Renderer/Twig/Function/FileGetContents.php diff --git a/BumbleDocGen/Core/Renderer/Twig/Function/GeneratePageBreadcrumbs.php b/src/Core/Renderer/Twig/Function/GeneratePageBreadcrumbs.php similarity index 100% rename from BumbleDocGen/Core/Renderer/Twig/Function/GeneratePageBreadcrumbs.php rename to src/Core/Renderer/Twig/Function/GeneratePageBreadcrumbs.php diff --git a/BumbleDocGen/Core/Renderer/Twig/Function/GetDocumentationPageUrl.php b/src/Core/Renderer/Twig/Function/GetDocumentationPageUrl.php similarity index 100% rename from BumbleDocGen/Core/Renderer/Twig/Function/GetDocumentationPageUrl.php rename to src/Core/Renderer/Twig/Function/GetDocumentationPageUrl.php diff --git a/BumbleDocGen/Core/Renderer/Twig/Function/GetDocumentedEntityUrl.php b/src/Core/Renderer/Twig/Function/GetDocumentedEntityUrl.php similarity index 100% rename from BumbleDocGen/Core/Renderer/Twig/Function/GetDocumentedEntityUrl.php rename to src/Core/Renderer/Twig/Function/GetDocumentedEntityUrl.php diff --git a/BumbleDocGen/Core/Renderer/Twig/Function/LoadPluginsContent.php b/src/Core/Renderer/Twig/Function/LoadPluginsContent.php similarity index 100% rename from BumbleDocGen/Core/Renderer/Twig/Function/LoadPluginsContent.php rename to src/Core/Renderer/Twig/Function/LoadPluginsContent.php diff --git a/BumbleDocGen/Core/Renderer/Twig/Function/PrintEntityCollectionAsList.php b/src/Core/Renderer/Twig/Function/PrintEntityCollectionAsList.php similarity index 100% rename from BumbleDocGen/Core/Renderer/Twig/Function/PrintEntityCollectionAsList.php rename to src/Core/Renderer/Twig/Function/PrintEntityCollectionAsList.php diff --git a/BumbleDocGen/Core/Renderer/Twig/MainExtension.php b/src/Core/Renderer/Twig/MainExtension.php similarity index 100% rename from BumbleDocGen/Core/Renderer/Twig/MainExtension.php rename to src/Core/Renderer/Twig/MainExtension.php diff --git a/BumbleDocGen/Core/Renderer/Twig/MainTwigEnvironment.php b/src/Core/Renderer/Twig/MainTwigEnvironment.php similarity index 100% rename from BumbleDocGen/Core/Renderer/Twig/MainTwigEnvironment.php rename to src/Core/Renderer/Twig/MainTwigEnvironment.php diff --git a/BumbleDocGen/Core/utils.php b/src/Core/utils.php similarity index 100% rename from BumbleDocGen/Core/utils.php rename to src/Core/utils.php diff --git a/BumbleDocGen/DocGenerator.php b/src/DocGenerator.php similarity index 100% rename from BumbleDocGen/DocGenerator.php rename to src/DocGenerator.php diff --git a/BumbleDocGen/DocGeneratorFactory.php b/src/DocGeneratorFactory.php similarity index 95% rename from BumbleDocGen/DocGeneratorFactory.php rename to src/DocGeneratorFactory.php index b89357c8..5118cb4c 100644 --- a/BumbleDocGen/DocGeneratorFactory.php +++ b/src/DocGeneratorFactory.php @@ -34,7 +34,7 @@ public function setCustomConfigurationParameters(array $customConfigurationParam * @throws NotFoundException * @throws \Exception */ - public function create(string ...$configurationFiles): DocGenerator + public function create(?string ...$configurationFiles): DocGenerator { $diContainer = $this->containerBuilder->build(); $logger = $diContainer->get(LoggerInterface::class); diff --git a/BumbleDocGen/LanguageHandler/LanguageHandlerInterface.php b/src/LanguageHandler/LanguageHandlerInterface.php similarity index 100% rename from BumbleDocGen/LanguageHandler/LanguageHandlerInterface.php rename to src/LanguageHandler/LanguageHandlerInterface.php diff --git a/BumbleDocGen/LanguageHandler/LanguageHandlersCollection.php b/src/LanguageHandler/LanguageHandlersCollection.php similarity index 100% rename from BumbleDocGen/LanguageHandler/LanguageHandlersCollection.php rename to src/LanguageHandler/LanguageHandlersCollection.php diff --git a/BumbleDocGen/LanguageHandler/Php/Parser/Entity/BaseEntity.php b/src/LanguageHandler/Php/Parser/Entity/BaseEntity.php similarity index 100% rename from BumbleDocGen/LanguageHandler/Php/Parser/Entity/BaseEntity.php rename to src/LanguageHandler/Php/Parser/Entity/BaseEntity.php diff --git a/BumbleDocGen/LanguageHandler/Php/Parser/Entity/Cache/CacheablePhpEntityFactory.php b/src/LanguageHandler/Php/Parser/Entity/Cache/CacheablePhpEntityFactory.php similarity index 100% rename from BumbleDocGen/LanguageHandler/Php/Parser/Entity/Cache/CacheablePhpEntityFactory.php rename to src/LanguageHandler/Php/Parser/Entity/Cache/CacheablePhpEntityFactory.php diff --git a/BumbleDocGen/LanguageHandler/Php/Parser/Entity/ClassEntity.php b/src/LanguageHandler/Php/Parser/Entity/ClassEntity.php similarity index 100% rename from BumbleDocGen/LanguageHandler/Php/Parser/Entity/ClassEntity.php rename to src/LanguageHandler/Php/Parser/Entity/ClassEntity.php diff --git a/BumbleDocGen/LanguageHandler/Php/Parser/Entity/ClassEntityCollection.php b/src/LanguageHandler/Php/Parser/Entity/ClassEntityCollection.php similarity index 96% rename from BumbleDocGen/LanguageHandler/Php/Parser/Entity/ClassEntityCollection.php rename to src/LanguageHandler/Php/Parser/Entity/ClassEntityCollection.php index 7f114eeb..46e6da0a 100644 --- a/BumbleDocGen/LanguageHandler/Php/Parser/Entity/ClassEntityCollection.php +++ b/src/LanguageHandler/Php/Parser/Entity/ClassEntityCollection.php @@ -294,13 +294,13 @@ public function getOnlyInterfaces(): ClassEntityCollection * * @example * $classEntityCollection->findEntity('App'); // class name - * $classEntityCollection->findEntity('SelfDoc\Console\App'); // class with namespace - * $classEntityCollection->findEntity('\SelfDoc\Console\App'); // class with namespace - * $classEntityCollection->findEntity('\SelfDoc\Console\App::test()'); // class with namespace and optional part + * $classEntityCollection->findEntity('BumbleDocGen\Console\App'); // class with namespace + * $classEntityCollection->findEntity('\BumbleDocGen\Console\App'); // class with namespace + * $classEntityCollection->findEntity('\BumbleDocGen\Console\App::test()'); // class with namespace and optional part * $classEntityCollection->findEntity('App.php'); // filename - * $classEntityCollection->findEntity('/SelfDoc/Console/App.php'); // relative path - * $classEntityCollection->findEntity('/Users/someuser/Desktop/projects/bumble-doc-gen/SelfDoc/Console/App.php'); // absolute path - * $classEntityCollection->findEntity('https://github.com/bumble-tech/bumble-doc-gen/blob/master/SelfDoc/Console/App.php'); // source link + * $classEntityCollection->findEntity('/BumbleDocGen/Console/App.php'); // relative path + * $classEntityCollection->findEntity('/Users/someuser/Desktop/projects/bumble-doc-gen/BumbleDocGen/Console/App.php'); // absolute path + * $classEntityCollection->findEntity('https://github.com/bumble-tech/bumble-doc-gen/blob/master/BumbleDocGen/Console/App.php'); // source link */ public function internalFindEntity(string $search, bool $useUnsafeKeys = true): ?ClassEntity { diff --git a/BumbleDocGen/LanguageHandler/Php/Parser/Entity/ConstantEntity.php b/src/LanguageHandler/Php/Parser/Entity/ConstantEntity.php similarity index 100% rename from BumbleDocGen/LanguageHandler/Php/Parser/Entity/ConstantEntity.php rename to src/LanguageHandler/Php/Parser/Entity/ConstantEntity.php diff --git a/BumbleDocGen/LanguageHandler/Php/Parser/Entity/ConstantEntityCollection.php b/src/LanguageHandler/Php/Parser/Entity/ConstantEntityCollection.php similarity index 100% rename from BumbleDocGen/LanguageHandler/Php/Parser/Entity/ConstantEntityCollection.php rename to src/LanguageHandler/Php/Parser/Entity/ConstantEntityCollection.php diff --git a/BumbleDocGen/LanguageHandler/Php/Parser/Entity/DynamicMethodEntity.php b/src/LanguageHandler/Php/Parser/Entity/DynamicMethodEntity.php similarity index 100% rename from BumbleDocGen/LanguageHandler/Php/Parser/Entity/DynamicMethodEntity.php rename to src/LanguageHandler/Php/Parser/Entity/DynamicMethodEntity.php diff --git a/BumbleDocGen/LanguageHandler/Php/Parser/Entity/Exception/ReflectionException.php b/src/LanguageHandler/Php/Parser/Entity/Exception/ReflectionException.php similarity index 100% rename from BumbleDocGen/LanguageHandler/Php/Parser/Entity/Exception/ReflectionException.php rename to src/LanguageHandler/Php/Parser/Entity/Exception/ReflectionException.php diff --git a/BumbleDocGen/LanguageHandler/Php/Parser/Entity/MethodEntity.php b/src/LanguageHandler/Php/Parser/Entity/MethodEntity.php similarity index 98% rename from BumbleDocGen/LanguageHandler/Php/Parser/Entity/MethodEntity.php rename to src/LanguageHandler/Php/Parser/Entity/MethodEntity.php index b250d0ed..aaca99ab 100644 --- a/BumbleDocGen/LanguageHandler/Php/Parser/Entity/MethodEntity.php +++ b/src/LanguageHandler/Php/Parser/Entity/MethodEntity.php @@ -20,6 +20,7 @@ use Psr\Log\LoggerInterface; use Roave\BetterReflection\Reflection\ReflectionClass; use Roave\BetterReflection\Reflection\ReflectionMethod; +use Symfony\Component\Console\Style\OutputStyle; /** * Class method entity @@ -400,6 +401,7 @@ private function isArrayAnnotationType(string $annotationType): bool $parameters[] = [ 'type' => $this->prepareTypeString($type), 'expectedType' => $expectedType, + 'isVariadic' => $param->isVariadic(), 'name' => $name, 'defaultValue' => $this->prepareTypeString($defaultValue), 'description' => $description, @@ -418,7 +420,8 @@ public function getParametersString(): string { $parameters = []; foreach ($this->getParameters() as $parameterData) { - $parameters[] = "{$parameterData['type']} \${$parameterData['name']}" . + $variadicPart = ($parameterData['isVariadic'] ?? false) ? '...' : ''; + $parameters[] = "{$parameterData['type']} {$variadicPart}\${$parameterData['name']}" . ($parameterData['defaultValue'] ? " = {$parameterData['defaultValue']}" : ''); } return implode(', ', $parameters); diff --git a/BumbleDocGen/LanguageHandler/Php/Parser/Entity/MethodEntityCollection.php b/src/LanguageHandler/Php/Parser/Entity/MethodEntityCollection.php similarity index 100% rename from BumbleDocGen/LanguageHandler/Php/Parser/Entity/MethodEntityCollection.php rename to src/LanguageHandler/Php/Parser/Entity/MethodEntityCollection.php diff --git a/BumbleDocGen/LanguageHandler/Php/Parser/Entity/MethodEntityInterface.php b/src/LanguageHandler/Php/Parser/Entity/MethodEntityInterface.php similarity index 100% rename from BumbleDocGen/LanguageHandler/Php/Parser/Entity/MethodEntityInterface.php rename to src/LanguageHandler/Php/Parser/Entity/MethodEntityInterface.php diff --git a/BumbleDocGen/LanguageHandler/Php/Parser/Entity/PropertyEntity.php b/src/LanguageHandler/Php/Parser/Entity/PropertyEntity.php similarity index 100% rename from BumbleDocGen/LanguageHandler/Php/Parser/Entity/PropertyEntity.php rename to src/LanguageHandler/Php/Parser/Entity/PropertyEntity.php diff --git a/BumbleDocGen/LanguageHandler/Php/Parser/Entity/PropertyEntityCollection.php b/src/LanguageHandler/Php/Parser/Entity/PropertyEntityCollection.php similarity index 100% rename from BumbleDocGen/LanguageHandler/Php/Parser/Entity/PropertyEntityCollection.php rename to src/LanguageHandler/Php/Parser/Entity/PropertyEntityCollection.php diff --git a/BumbleDocGen/LanguageHandler/Php/Parser/Entity/Reflection/ReflectorWrapper.php b/src/LanguageHandler/Php/Parser/Entity/Reflection/ReflectorWrapper.php similarity index 100% rename from BumbleDocGen/LanguageHandler/Php/Parser/Entity/Reflection/ReflectorWrapper.php rename to src/LanguageHandler/Php/Parser/Entity/Reflection/ReflectorWrapper.php diff --git a/BumbleDocGen/LanguageHandler/Php/Parser/FilterCondition/ClassConstantFilterCondition/IsPrivateCondition.php b/src/LanguageHandler/Php/Parser/FilterCondition/ClassConstantFilterCondition/IsPrivateCondition.php similarity index 100% rename from BumbleDocGen/LanguageHandler/Php/Parser/FilterCondition/ClassConstantFilterCondition/IsPrivateCondition.php rename to src/LanguageHandler/Php/Parser/FilterCondition/ClassConstantFilterCondition/IsPrivateCondition.php diff --git a/BumbleDocGen/LanguageHandler/Php/Parser/FilterCondition/ClassConstantFilterCondition/IsProtectedCondition.php b/src/LanguageHandler/Php/Parser/FilterCondition/ClassConstantFilterCondition/IsProtectedCondition.php similarity index 100% rename from BumbleDocGen/LanguageHandler/Php/Parser/FilterCondition/ClassConstantFilterCondition/IsProtectedCondition.php rename to src/LanguageHandler/Php/Parser/FilterCondition/ClassConstantFilterCondition/IsProtectedCondition.php diff --git a/BumbleDocGen/LanguageHandler/Php/Parser/FilterCondition/ClassConstantFilterCondition/IsPublicCondition.php b/src/LanguageHandler/Php/Parser/FilterCondition/ClassConstantFilterCondition/IsPublicCondition.php similarity index 100% rename from BumbleDocGen/LanguageHandler/Php/Parser/FilterCondition/ClassConstantFilterCondition/IsPublicCondition.php rename to src/LanguageHandler/Php/Parser/FilterCondition/ClassConstantFilterCondition/IsPublicCondition.php diff --git a/BumbleDocGen/LanguageHandler/Php/Parser/FilterCondition/ClassConstantFilterCondition/VisibilityCondition.php b/src/LanguageHandler/Php/Parser/FilterCondition/ClassConstantFilterCondition/VisibilityCondition.php similarity index 100% rename from BumbleDocGen/LanguageHandler/Php/Parser/FilterCondition/ClassConstantFilterCondition/VisibilityCondition.php rename to src/LanguageHandler/Php/Parser/FilterCondition/ClassConstantFilterCondition/VisibilityCondition.php diff --git a/BumbleDocGen/LanguageHandler/Php/Parser/FilterCondition/ClassFilterCondition/VisibilityConditionModifier.php b/src/LanguageHandler/Php/Parser/FilterCondition/ClassFilterCondition/VisibilityConditionModifier.php similarity index 100% rename from BumbleDocGen/LanguageHandler/Php/Parser/FilterCondition/ClassFilterCondition/VisibilityConditionModifier.php rename to src/LanguageHandler/Php/Parser/FilterCondition/ClassFilterCondition/VisibilityConditionModifier.php diff --git a/BumbleDocGen/LanguageHandler/Php/Parser/FilterCondition/MethodFilterCondition/IsPrivateCondition.php b/src/LanguageHandler/Php/Parser/FilterCondition/MethodFilterCondition/IsPrivateCondition.php similarity index 100% rename from BumbleDocGen/LanguageHandler/Php/Parser/FilterCondition/MethodFilterCondition/IsPrivateCondition.php rename to src/LanguageHandler/Php/Parser/FilterCondition/MethodFilterCondition/IsPrivateCondition.php diff --git a/BumbleDocGen/LanguageHandler/Php/Parser/FilterCondition/MethodFilterCondition/IsProtectedCondition.php b/src/LanguageHandler/Php/Parser/FilterCondition/MethodFilterCondition/IsProtectedCondition.php similarity index 100% rename from BumbleDocGen/LanguageHandler/Php/Parser/FilterCondition/MethodFilterCondition/IsProtectedCondition.php rename to src/LanguageHandler/Php/Parser/FilterCondition/MethodFilterCondition/IsProtectedCondition.php diff --git a/BumbleDocGen/LanguageHandler/Php/Parser/FilterCondition/MethodFilterCondition/IsPublicCondition.php b/src/LanguageHandler/Php/Parser/FilterCondition/MethodFilterCondition/IsPublicCondition.php similarity index 100% rename from BumbleDocGen/LanguageHandler/Php/Parser/FilterCondition/MethodFilterCondition/IsPublicCondition.php rename to src/LanguageHandler/Php/Parser/FilterCondition/MethodFilterCondition/IsPublicCondition.php diff --git a/BumbleDocGen/LanguageHandler/Php/Parser/FilterCondition/MethodFilterCondition/OnlyFromCurrentClassCondition.php b/src/LanguageHandler/Php/Parser/FilterCondition/MethodFilterCondition/OnlyFromCurrentClassCondition.php similarity index 100% rename from BumbleDocGen/LanguageHandler/Php/Parser/FilterCondition/MethodFilterCondition/OnlyFromCurrentClassCondition.php rename to src/LanguageHandler/Php/Parser/FilterCondition/MethodFilterCondition/OnlyFromCurrentClassCondition.php diff --git a/BumbleDocGen/LanguageHandler/Php/Parser/FilterCondition/MethodFilterCondition/VisibilityCondition.php b/src/LanguageHandler/Php/Parser/FilterCondition/MethodFilterCondition/VisibilityCondition.php similarity index 100% rename from BumbleDocGen/LanguageHandler/Php/Parser/FilterCondition/MethodFilterCondition/VisibilityCondition.php rename to src/LanguageHandler/Php/Parser/FilterCondition/MethodFilterCondition/VisibilityCondition.php diff --git a/BumbleDocGen/LanguageHandler/Php/Parser/FilterCondition/PropertyFilterCondition/IsPrivateCondition.php b/src/LanguageHandler/Php/Parser/FilterCondition/PropertyFilterCondition/IsPrivateCondition.php similarity index 100% rename from BumbleDocGen/LanguageHandler/Php/Parser/FilterCondition/PropertyFilterCondition/IsPrivateCondition.php rename to src/LanguageHandler/Php/Parser/FilterCondition/PropertyFilterCondition/IsPrivateCondition.php diff --git a/BumbleDocGen/LanguageHandler/Php/Parser/FilterCondition/PropertyFilterCondition/IsProtectedCondition.php b/src/LanguageHandler/Php/Parser/FilterCondition/PropertyFilterCondition/IsProtectedCondition.php similarity index 100% rename from BumbleDocGen/LanguageHandler/Php/Parser/FilterCondition/PropertyFilterCondition/IsProtectedCondition.php rename to src/LanguageHandler/Php/Parser/FilterCondition/PropertyFilterCondition/IsProtectedCondition.php diff --git a/BumbleDocGen/LanguageHandler/Php/Parser/FilterCondition/PropertyFilterCondition/IsPublicCondition.php b/src/LanguageHandler/Php/Parser/FilterCondition/PropertyFilterCondition/IsPublicCondition.php similarity index 100% rename from BumbleDocGen/LanguageHandler/Php/Parser/FilterCondition/PropertyFilterCondition/IsPublicCondition.php rename to src/LanguageHandler/Php/Parser/FilterCondition/PropertyFilterCondition/IsPublicCondition.php diff --git a/BumbleDocGen/LanguageHandler/Php/Parser/FilterCondition/PropertyFilterCondition/OnlyFromCurrentClassCondition.php b/src/LanguageHandler/Php/Parser/FilterCondition/PropertyFilterCondition/OnlyFromCurrentClassCondition.php similarity index 100% rename from BumbleDocGen/LanguageHandler/Php/Parser/FilterCondition/PropertyFilterCondition/OnlyFromCurrentClassCondition.php rename to src/LanguageHandler/Php/Parser/FilterCondition/PropertyFilterCondition/OnlyFromCurrentClassCondition.php diff --git a/BumbleDocGen/LanguageHandler/Php/Parser/FilterCondition/PropertyFilterCondition/VisibilityCondition.php b/src/LanguageHandler/Php/Parser/FilterCondition/PropertyFilterCondition/VisibilityCondition.php similarity index 100% rename from BumbleDocGen/LanguageHandler/Php/Parser/FilterCondition/PropertyFilterCondition/VisibilityCondition.php rename to src/LanguageHandler/Php/Parser/FilterCondition/PropertyFilterCondition/VisibilityCondition.php diff --git a/BumbleDocGen/LanguageHandler/Php/Parser/ParserHelper.php b/src/LanguageHandler/Php/Parser/ParserHelper.php similarity index 100% rename from BumbleDocGen/LanguageHandler/Php/Parser/ParserHelper.php rename to src/LanguageHandler/Php/Parser/ParserHelper.php diff --git a/BumbleDocGen/LanguageHandler/Php/Parser/SourceLocator/AsyncSourceLocator.php b/src/LanguageHandler/Php/Parser/SourceLocator/AsyncSourceLocator.php similarity index 100% rename from BumbleDocGen/LanguageHandler/Php/Parser/SourceLocator/AsyncSourceLocator.php rename to src/LanguageHandler/Php/Parser/SourceLocator/AsyncSourceLocator.php diff --git a/BumbleDocGen/LanguageHandler/Php/Parser/SourceLocator/CustomSourceLocatorInterface.php b/src/LanguageHandler/Php/Parser/SourceLocator/CustomSourceLocatorInterface.php similarity index 100% rename from BumbleDocGen/LanguageHandler/Php/Parser/SourceLocator/CustomSourceLocatorInterface.php rename to src/LanguageHandler/Php/Parser/SourceLocator/CustomSourceLocatorInterface.php diff --git a/BumbleDocGen/LanguageHandler/Php/Parser/SourceLocator/Internal/CachedSourceLocator.php b/src/LanguageHandler/Php/Parser/SourceLocator/Internal/CachedSourceLocator.php similarity index 100% rename from BumbleDocGen/LanguageHandler/Php/Parser/SourceLocator/Internal/CachedSourceLocator.php rename to src/LanguageHandler/Php/Parser/SourceLocator/Internal/CachedSourceLocator.php diff --git a/BumbleDocGen/LanguageHandler/Php/Parser/SourceLocator/Internal/SystemAsyncSourceLocator.php b/src/LanguageHandler/Php/Parser/SourceLocator/Internal/SystemAsyncSourceLocator.php similarity index 100% rename from BumbleDocGen/LanguageHandler/Php/Parser/SourceLocator/Internal/SystemAsyncSourceLocator.php rename to src/LanguageHandler/Php/Parser/SourceLocator/Internal/SystemAsyncSourceLocator.php diff --git a/BumbleDocGen/LanguageHandler/Php/PhpHandler.php b/src/LanguageHandler/Php/PhpHandler.php similarity index 100% rename from BumbleDocGen/LanguageHandler/Php/PhpHandler.php rename to src/LanguageHandler/Php/PhpHandler.php diff --git a/BumbleDocGen/LanguageHandler/Php/PhpHandlerSettings.php b/src/LanguageHandler/Php/PhpHandlerSettings.php similarity index 100% rename from BumbleDocGen/LanguageHandler/Php/PhpHandlerSettings.php rename to src/LanguageHandler/Php/PhpHandlerSettings.php diff --git a/BumbleDocGen/LanguageHandler/Php/Plugin/CorePlugin/BasePhpStubber/BasePhpStubberPlugin.php b/src/LanguageHandler/Php/Plugin/CorePlugin/BasePhpStubber/BasePhpStubberPlugin.php similarity index 100% rename from BumbleDocGen/LanguageHandler/Php/Plugin/CorePlugin/BasePhpStubber/BasePhpStubberPlugin.php rename to src/LanguageHandler/Php/Plugin/CorePlugin/BasePhpStubber/BasePhpStubberPlugin.php diff --git a/BumbleDocGen/LanguageHandler/Php/Plugin/CorePlugin/BasePhpStubber/ComposerStubberPlugin.php b/src/LanguageHandler/Php/Plugin/CorePlugin/BasePhpStubber/ComposerStubberPlugin.php similarity index 100% rename from BumbleDocGen/LanguageHandler/Php/Plugin/CorePlugin/BasePhpStubber/ComposerStubberPlugin.php rename to src/LanguageHandler/Php/Plugin/CorePlugin/BasePhpStubber/ComposerStubberPlugin.php diff --git a/BumbleDocGen/LanguageHandler/Php/Plugin/CorePlugin/BasePhpStubber/PhpDocumentorStubberPlugin.php b/src/LanguageHandler/Php/Plugin/CorePlugin/BasePhpStubber/PhpDocumentorStubberPlugin.php similarity index 100% rename from BumbleDocGen/LanguageHandler/Php/Plugin/CorePlugin/BasePhpStubber/PhpDocumentorStubberPlugin.php rename to src/LanguageHandler/Php/Plugin/CorePlugin/BasePhpStubber/PhpDocumentorStubberPlugin.php diff --git a/BumbleDocGen/LanguageHandler/Php/Plugin/CorePlugin/BasePhpStubber/PhpUnitStubberPlugin.php b/src/LanguageHandler/Php/Plugin/CorePlugin/BasePhpStubber/PhpUnitStubberPlugin.php similarity index 100% rename from BumbleDocGen/LanguageHandler/Php/Plugin/CorePlugin/BasePhpStubber/PhpUnitStubberPlugin.php rename to src/LanguageHandler/Php/Plugin/CorePlugin/BasePhpStubber/PhpUnitStubberPlugin.php diff --git a/BumbleDocGen/LanguageHandler/Php/Plugin/CorePlugin/BasePhpStubber/PsrClassesStubberPlugin.php b/src/LanguageHandler/Php/Plugin/CorePlugin/BasePhpStubber/PsrClassesStubberPlugin.php similarity index 100% rename from BumbleDocGen/LanguageHandler/Php/Plugin/CorePlugin/BasePhpStubber/PsrClassesStubberPlugin.php rename to src/LanguageHandler/Php/Plugin/CorePlugin/BasePhpStubber/PsrClassesStubberPlugin.php diff --git a/BumbleDocGen/LanguageHandler/Php/Plugin/CorePlugin/BasePhpStubber/SymfonyComponentStubberPlugin.php b/src/LanguageHandler/Php/Plugin/CorePlugin/BasePhpStubber/SymfonyComponentStubberPlugin.php similarity index 100% rename from BumbleDocGen/LanguageHandler/Php/Plugin/CorePlugin/BasePhpStubber/SymfonyComponentStubberPlugin.php rename to src/LanguageHandler/Php/Plugin/CorePlugin/BasePhpStubber/SymfonyComponentStubberPlugin.php diff --git a/BumbleDocGen/LanguageHandler/Php/Plugin/CorePlugin/BasePhpStubber/TwigStubberPlugin.php b/src/LanguageHandler/Php/Plugin/CorePlugin/BasePhpStubber/TwigStubberPlugin.php similarity index 100% rename from BumbleDocGen/LanguageHandler/Php/Plugin/CorePlugin/BasePhpStubber/TwigStubberPlugin.php rename to src/LanguageHandler/Php/Plugin/CorePlugin/BasePhpStubber/TwigStubberPlugin.php diff --git a/BumbleDocGen/LanguageHandler/Php/Plugin/Event/Entity/OnCheckIsClassEntityCanBeLoad.php b/src/LanguageHandler/Php/Plugin/Event/Entity/OnCheckIsClassEntityCanBeLoad.php similarity index 100% rename from BumbleDocGen/LanguageHandler/Php/Plugin/Event/Entity/OnCheckIsClassEntityCanBeLoad.php rename to src/LanguageHandler/Php/Plugin/Event/Entity/OnCheckIsClassEntityCanBeLoad.php diff --git a/BumbleDocGen/LanguageHandler/Php/Plugin/Event/Parser/AfterLoadingClassEntityCollection.php b/src/LanguageHandler/Php/Plugin/Event/Parser/AfterLoadingClassEntityCollection.php similarity index 100% rename from BumbleDocGen/LanguageHandler/Php/Plugin/Event/Parser/AfterLoadingClassEntityCollection.php rename to src/LanguageHandler/Php/Plugin/Event/Parser/AfterLoadingClassEntityCollection.php diff --git a/BumbleDocGen/LanguageHandler/Php/Plugin/Event/Parser/OnAddClassEntityToCollection.php b/src/LanguageHandler/Php/Plugin/Event/Parser/OnAddClassEntityToCollection.php similarity index 100% rename from BumbleDocGen/LanguageHandler/Php/Plugin/Event/Parser/OnAddClassEntityToCollection.php rename to src/LanguageHandler/Php/Plugin/Event/Parser/OnAddClassEntityToCollection.php diff --git a/BumbleDocGen/LanguageHandler/Php/Renderer/EntityDocRenderer/EntityDocRendererHelper.php b/src/LanguageHandler/Php/Renderer/EntityDocRenderer/EntityDocRendererHelper.php similarity index 100% rename from BumbleDocGen/LanguageHandler/Php/Renderer/EntityDocRenderer/EntityDocRendererHelper.php rename to src/LanguageHandler/Php/Renderer/EntityDocRenderer/EntityDocRendererHelper.php diff --git a/BumbleDocGen/LanguageHandler/Php/Renderer/EntityDocRenderer/PhpClassToMd/PhpClassRendererTwigEnvironment.php b/src/LanguageHandler/Php/Renderer/EntityDocRenderer/PhpClassToMd/PhpClassRendererTwigEnvironment.php similarity index 100% rename from BumbleDocGen/LanguageHandler/Php/Renderer/EntityDocRenderer/PhpClassToMd/PhpClassRendererTwigEnvironment.php rename to src/LanguageHandler/Php/Renderer/EntityDocRenderer/PhpClassToMd/PhpClassRendererTwigEnvironment.php diff --git a/BumbleDocGen/LanguageHandler/Php/Renderer/EntityDocRenderer/PhpClassToMd/PhpClassToMdDocRenderer.php b/src/LanguageHandler/Php/Renderer/EntityDocRenderer/PhpClassToMd/PhpClassToMdDocRenderer.php similarity index 100% rename from BumbleDocGen/LanguageHandler/Php/Renderer/EntityDocRenderer/PhpClassToMd/PhpClassToMdDocRenderer.php rename to src/LanguageHandler/Php/Renderer/EntityDocRenderer/PhpClassToMd/PhpClassToMdDocRenderer.php diff --git a/BumbleDocGen/LanguageHandler/Php/Renderer/EntityDocRenderer/PhpClassToMd/templates/_classHeader.md.twig b/src/LanguageHandler/Php/Renderer/EntityDocRenderer/PhpClassToMd/templates/_classHeader.md.twig similarity index 100% rename from BumbleDocGen/LanguageHandler/Php/Renderer/EntityDocRenderer/PhpClassToMd/templates/_classHeader.md.twig rename to src/LanguageHandler/Php/Renderer/EntityDocRenderer/PhpClassToMd/templates/_classHeader.md.twig diff --git a/BumbleDocGen/LanguageHandler/Php/Renderer/EntityDocRenderer/PhpClassToMd/templates/_classMainInfo.md.twig b/src/LanguageHandler/Php/Renderer/EntityDocRenderer/PhpClassToMd/templates/_classMainInfo.md.twig similarity index 100% rename from BumbleDocGen/LanguageHandler/Php/Renderer/EntityDocRenderer/PhpClassToMd/templates/_classMainInfo.md.twig rename to src/LanguageHandler/Php/Renderer/EntityDocRenderer/PhpClassToMd/templates/_classMainInfo.md.twig diff --git a/BumbleDocGen/LanguageHandler/Php/Renderer/EntityDocRenderer/PhpClassToMd/templates/_constants.md.twig b/src/LanguageHandler/Php/Renderer/EntityDocRenderer/PhpClassToMd/templates/_constants.md.twig similarity index 100% rename from BumbleDocGen/LanguageHandler/Php/Renderer/EntityDocRenderer/PhpClassToMd/templates/_constants.md.twig rename to src/LanguageHandler/Php/Renderer/EntityDocRenderer/PhpClassToMd/templates/_constants.md.twig diff --git a/BumbleDocGen/LanguageHandler/Php/Renderer/EntityDocRenderer/PhpClassToMd/templates/_enumCases.md.twig b/src/LanguageHandler/Php/Renderer/EntityDocRenderer/PhpClassToMd/templates/_enumCases.md.twig similarity index 100% rename from BumbleDocGen/LanguageHandler/Php/Renderer/EntityDocRenderer/PhpClassToMd/templates/_enumCases.md.twig rename to src/LanguageHandler/Php/Renderer/EntityDocRenderer/PhpClassToMd/templates/_enumCases.md.twig diff --git a/BumbleDocGen/LanguageHandler/Php/Renderer/EntityDocRenderer/PhpClassToMd/templates/_method_details.md.twig b/src/LanguageHandler/Php/Renderer/EntityDocRenderer/PhpClassToMd/templates/_method_details.md.twig similarity index 90% rename from BumbleDocGen/LanguageHandler/Php/Renderer/EntityDocRenderer/PhpClassToMd/templates/_method_details.md.twig rename to src/LanguageHandler/Php/Renderer/EntityDocRenderer/PhpClassToMd/templates/_method_details.md.twig index 3af0505f..6c445bfc 100644 --- a/BumbleDocGen/LanguageHandler/Php/Renderer/EntityDocRenderer/PhpClassToMd/templates/_method_details.md.twig +++ b/src/LanguageHandler/Php/Renderer/EntityDocRenderer/PhpClassToMd/templates/_method_details.md.twig @@ -40,7 +40,7 @@ {% for parameter in methodEntity.getParameters() %} - ${{ parameter.name }} + ${{ parameter.name }}{% if parameter.isVariadic %} (variadic){% endif %} {{ parameter.expectedType | strTypeToUrl(methodEntity.getRootEntityCollection()) }} {% if parameter.description %}{{ parameter.description | addIndentFromLeft(1, true) }}{% else %}-{% endif %} @@ -65,7 +65,7 @@ {% for throw in methodEntity.getThrows() %} - {{ throw.name }}{% if throw.description %} - {{ throw.description | removeLineBrakes }} {% endif %} + {{ throw.name }}{% if throw.description %} - {{ throw.description | removeLineBrakes }} {% endif %} {% endfor %} diff --git a/BumbleDocGen/LanguageHandler/Php/Renderer/EntityDocRenderer/PhpClassToMd/templates/_methods.md.twig b/src/LanguageHandler/Php/Renderer/EntityDocRenderer/PhpClassToMd/templates/_methods.md.twig similarity index 100% rename from BumbleDocGen/LanguageHandler/Php/Renderer/EntityDocRenderer/PhpClassToMd/templates/_methods.md.twig rename to src/LanguageHandler/Php/Renderer/EntityDocRenderer/PhpClassToMd/templates/_methods.md.twig diff --git a/BumbleDocGen/LanguageHandler/Php/Renderer/EntityDocRenderer/PhpClassToMd/templates/_properties.md.twig b/src/LanguageHandler/Php/Renderer/EntityDocRenderer/PhpClassToMd/templates/_properties.md.twig similarity index 100% rename from BumbleDocGen/LanguageHandler/Php/Renderer/EntityDocRenderer/PhpClassToMd/templates/_properties.md.twig rename to src/LanguageHandler/Php/Renderer/EntityDocRenderer/PhpClassToMd/templates/_properties.md.twig diff --git a/BumbleDocGen/LanguageHandler/Php/Renderer/EntityDocRenderer/PhpClassToMd/templates/_property_details.md.twig b/src/LanguageHandler/Php/Renderer/EntityDocRenderer/PhpClassToMd/templates/_property_details.md.twig similarity index 100% rename from BumbleDocGen/LanguageHandler/Php/Renderer/EntityDocRenderer/PhpClassToMd/templates/_property_details.md.twig rename to src/LanguageHandler/Php/Renderer/EntityDocRenderer/PhpClassToMd/templates/_property_details.md.twig diff --git a/BumbleDocGen/LanguageHandler/Php/Renderer/EntityDocRenderer/PhpClassToMd/templates/_traits.md.twig b/src/LanguageHandler/Php/Renderer/EntityDocRenderer/PhpClassToMd/templates/_traits.md.twig similarity index 100% rename from BumbleDocGen/LanguageHandler/Php/Renderer/EntityDocRenderer/PhpClassToMd/templates/_traits.md.twig rename to src/LanguageHandler/Php/Renderer/EntityDocRenderer/PhpClassToMd/templates/_traits.md.twig diff --git a/BumbleDocGen/LanguageHandler/Php/Renderer/EntityDocRenderer/PhpClassToMd/templates/class.md.twig b/src/LanguageHandler/Php/Renderer/EntityDocRenderer/PhpClassToMd/templates/class.md.twig similarity index 100% rename from BumbleDocGen/LanguageHandler/Php/Renderer/EntityDocRenderer/PhpClassToMd/templates/class.md.twig rename to src/LanguageHandler/Php/Renderer/EntityDocRenderer/PhpClassToMd/templates/class.md.twig diff --git a/BumbleDocGen/LanguageHandler/Php/Renderer/Twig/Function/DrawClassMap.php b/src/LanguageHandler/Php/Renderer/Twig/Function/DrawClassMap.php similarity index 99% rename from BumbleDocGen/LanguageHandler/Php/Renderer/Twig/Function/DrawClassMap.php rename to src/LanguageHandler/Php/Renderer/Twig/Function/DrawClassMap.php index 9e4d22cf..64f886d5 100644 --- a/BumbleDocGen/LanguageHandler/Php/Renderer/Twig/Function/DrawClassMap.php +++ b/src/LanguageHandler/Php/Renderer/Twig/Function/DrawClassMap.php @@ -19,7 +19,7 @@ * * @note This function initiates the creation of documents for the displayed entities * - * @example {{ drawClassMap(classEntityCollection.filterByPaths(['/BumbleDocGen/Renderer'])) }} + * @example {{ drawClassMap(classEntityCollection.filterByPaths(['/src/Renderer'])) }} * @example {{ drawClassMap(classEntityCollection) }} */ final class DrawClassMap implements CustomFunctionInterface diff --git a/BumbleDocGen/LanguageHandler/Php/Renderer/Twig/Function/GetClassMethodsBodyCode.php b/src/LanguageHandler/Php/Renderer/Twig/Function/GetClassMethodsBodyCode.php similarity index 100% rename from BumbleDocGen/LanguageHandler/Php/Renderer/Twig/Function/GetClassMethodsBodyCode.php rename to src/LanguageHandler/Php/Renderer/Twig/Function/GetClassMethodsBodyCode.php diff --git a/BumbleDocGen/LanguageHandler/Php/phpHandlerDefaultSettings.yaml b/src/LanguageHandler/Php/phpHandlerDefaultSettings.yaml similarity index 85% rename from BumbleDocGen/LanguageHandler/Php/phpHandlerDefaultSettings.yaml rename to src/LanguageHandler/Php/phpHandlerDefaultSettings.yaml index fbbf9d12..0e40ba43 100644 --- a/BumbleDocGen/LanguageHandler/Php/phpHandlerDefaultSettings.yaml +++ b/src/LanguageHandler/Php/phpHandlerDefaultSettings.yaml @@ -12,11 +12,7 @@ language_handlers: - protected method_filter: - class: \BumbleDocGen\Core\Parser\FilterCondition\ConditionGroup - arguments: - - and - - class: \BumbleDocGen\LanguageHandler\Php\Parser\FilterCondition\MethodFilterCondition\IsPublicCondition - - class: \BumbleDocGen\LanguageHandler\Php\Parser\FilterCondition\MethodFilterCondition\OnlyFromCurrentClassCondition + class: \BumbleDocGen\LanguageHandler\Php\Parser\FilterCondition\MethodFilterCondition\IsPublicCondition property_filter: class: \BumbleDocGen\Core\Parser\FilterCondition\ConditionGroup diff --git a/BumbleDocGen/TemplateGenerator/ChatGpt/MissingDocBlocksGenerator.php b/src/TemplateGenerator/ChatGpt/MissingDocBlocksGenerator.php similarity index 100% rename from BumbleDocGen/TemplateGenerator/ChatGpt/MissingDocBlocksGenerator.php rename to src/TemplateGenerator/ChatGpt/MissingDocBlocksGenerator.php diff --git a/BumbleDocGen/TemplateGenerator/ChatGpt/ReadmeTemplateFiller.php b/src/TemplateGenerator/ChatGpt/ReadmeTemplateFiller.php similarity index 100% rename from BumbleDocGen/TemplateGenerator/ChatGpt/ReadmeTemplateFiller.php rename to src/TemplateGenerator/ChatGpt/ReadmeTemplateFiller.php diff --git a/BumbleDocGen/TemplateGenerator/ChatGpt/TemplatesStructureGenerator.php b/src/TemplateGenerator/ChatGpt/TemplatesStructureGenerator.php similarity index 100% rename from BumbleDocGen/TemplateGenerator/ChatGpt/TemplatesStructureGenerator.php rename to src/TemplateGenerator/ChatGpt/TemplatesStructureGenerator.php diff --git a/BumbleDocGen/TemplateGenerator/ChatGpt/prompts/missingDocBlockGeneration b/src/TemplateGenerator/ChatGpt/prompts/missingDocBlockGeneration similarity index 100% rename from BumbleDocGen/TemplateGenerator/ChatGpt/prompts/missingDocBlockGeneration rename to src/TemplateGenerator/ChatGpt/prompts/missingDocBlockGeneration diff --git a/BumbleDocGen/TemplateGenerator/ChatGpt/prompts/readmeTemplateFiller b/src/TemplateGenerator/ChatGpt/prompts/readmeTemplateFiller similarity index 100% rename from BumbleDocGen/TemplateGenerator/ChatGpt/prompts/readmeTemplateFiller rename to src/TemplateGenerator/ChatGpt/prompts/readmeTemplateFiller diff --git a/BumbleDocGen/TemplateGenerator/ChatGpt/prompts/structureGeneration b/src/TemplateGenerator/ChatGpt/prompts/structureGeneration similarity index 100% rename from BumbleDocGen/TemplateGenerator/ChatGpt/prompts/structureGeneration rename to src/TemplateGenerator/ChatGpt/prompts/structureGeneration diff --git a/BumbleDocGen/di-config.php b/src/di-config.php similarity index 100% rename from BumbleDocGen/di-config.php rename to src/di-config.php
└──src/ +│ ├──Console/ +│ │ ├──Command/ +│ │ │ └── GenerateCommand.php — Base class for all commands. +│ │ └── App.php — An Application is the container for a collection of commands. │ ├──Core/ │ │ ├──Cache/ │ │ │ ├──LocalCache/ @@ -229,4 +233,4 @@ Directory layout ( only documented files shown ): -Last page committer: fshcherbanich <filipp.shcherbanich@team.bumble.com>Last modified date: Sat Jul 29 13:26:44 2023 +0300Page content update date: Thu Aug 31 2023Made with Bumble Documentation Generator \ No newline at end of file +Last page committer: fshcherbanich <filipp.shcherbanich@team.bumble.com>Last modified date: Sat Sep 2 21:01:47 2023 +0300Page content update date: Sun Sep 10 2023Made with Bumble Documentation Generator \ No newline at end of file diff --git a/docs/tech/readme.md b/docs/tech/readme.md index 18a38e2b..9de1491c 100644 --- a/docs/tech/readme.md +++ b/docs/tech/readme.md @@ -1,4 +1,4 @@ - BumbleDocGen / Technical description of the project + BumbleDocGen / Technical description of the project Technical description of the project @@ -37,4 +37,4 @@ After that, the process of parsing the project code according to the configurati -Last page committer: fshcherbanich <filipp.shcherbanich@team.bumble.com>Last modified date: Sun Jul 30 16:27:42 2023 +0300Page content update date: Thu Aug 31 2023Made with Bumble Documentation Generator \ No newline at end of file +Last page committer: fshcherbanich <filipp.shcherbanich@team.bumble.com>Last modified date: Sat Sep 2 21:01:47 2023 +0300Page content update date: Sun Sep 10 2023Made with Bumble Documentation Generator \ No newline at end of file diff --git a/SelfDoc/Configuration/Plugin/RoaveStubber/BetterReflectionStubberPlugin.php b/selfdoc/Plugin/RoaveStubber/BetterReflectionStubberPlugin.php similarity index 96% rename from SelfDoc/Configuration/Plugin/RoaveStubber/BetterReflectionStubberPlugin.php rename to selfdoc/Plugin/RoaveStubber/BetterReflectionStubberPlugin.php index 22cdabbc..858f4b7e 100644 --- a/SelfDoc/Configuration/Plugin/RoaveStubber/BetterReflectionStubberPlugin.php +++ b/selfdoc/Plugin/RoaveStubber/BetterReflectionStubberPlugin.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace SelfDoc\Configuration\Plugin\RoaveStubber; +namespace SelfDocConfig\Plugin\RoaveStubber; use BumbleDocGen\Core\Plugin\Event\Renderer\OnGettingResourceLink; use BumbleDocGen\Core\Plugin\PluginInterface; diff --git a/SelfDoc/Configuration/Plugin/TwigFilterClassParser/FilterClassPluginTwigEnvironment.php b/selfdoc/Plugin/TwigFilterClassParser/FilterClassPluginTwigEnvironment.php similarity index 91% rename from SelfDoc/Configuration/Plugin/TwigFilterClassParser/FilterClassPluginTwigEnvironment.php rename to selfdoc/Plugin/TwigFilterClassParser/FilterClassPluginTwigEnvironment.php index 5d9d5b47..e3e61a02 100644 --- a/SelfDoc/Configuration/Plugin/TwigFilterClassParser/FilterClassPluginTwigEnvironment.php +++ b/selfdoc/Plugin/TwigFilterClassParser/FilterClassPluginTwigEnvironment.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace SelfDoc\Configuration\Plugin\TwigFilterClassParser; +namespace SelfDocConfig\Plugin\TwigFilterClassParser; use Twig\Environment; use Twig\Error\LoaderError; diff --git a/SelfDoc/Configuration/Plugin/TwigFilterClassParser/TwigFilterClassParserPlugin.php b/selfdoc/Plugin/TwigFilterClassParser/TwigFilterClassParserPlugin.php similarity index 94% rename from SelfDoc/Configuration/Plugin/TwigFilterClassParser/TwigFilterClassParserPlugin.php rename to selfdoc/Plugin/TwigFilterClassParser/TwigFilterClassParserPlugin.php index cdf29cf0..edb43e63 100644 --- a/SelfDoc/Configuration/Plugin/TwigFilterClassParser/TwigFilterClassParserPlugin.php +++ b/selfdoc/Plugin/TwigFilterClassParser/TwigFilterClassParserPlugin.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace SelfDoc\Configuration\Plugin\TwigFilterClassParser; +namespace SelfDocConfig\Plugin\TwigFilterClassParser; use BumbleDocGen\Core\Configuration\Configuration; use BumbleDocGen\Core\Configuration\Exception\InvalidConfigurationParameterException; @@ -21,17 +21,16 @@ final class TwigFilterClassParserPlugin implements PluginInterface { private const TWIG_FILTER_DIR_NAMES = [ - '/BumbleDocGen/Core/Renderer/Twig/Filter', - '/BumbleDocGen/LanguageHandler/Php/Renderer/Twig/Filter' + '/src/Core/Renderer/Twig/Filter', + '/src/LanguageHandler/Php/Renderer/Twig/Filter' ]; public const PLUGIN_KEY = 'twigFilterClassParserPlugin'; public function __construct( private FilterClassPluginTwigEnvironment $twigEnvironment, - private RendererContext $context, - private Configuration $configuration, - ) - { + private RendererContext $context, + private Configuration $configuration, + ) { } public static function getSubscribedEvents(): array diff --git a/SelfDoc/Configuration/Plugin/TwigFilterClassParser/templates/twigFilterInfoBlock.twig b/selfdoc/Plugin/TwigFilterClassParser/templates/twigFilterInfoBlock.twig similarity index 100% rename from SelfDoc/Configuration/Plugin/TwigFilterClassParser/templates/twigFilterInfoBlock.twig rename to selfdoc/Plugin/TwigFilterClassParser/templates/twigFilterInfoBlock.twig diff --git a/SelfDoc/Configuration/Plugin/TwigFunctionClassParser/FunctionClassPluginTwigEnvironment.php b/selfdoc/Plugin/TwigFunctionClassParser/FunctionClassPluginTwigEnvironment.php similarity index 91% rename from SelfDoc/Configuration/Plugin/TwigFunctionClassParser/FunctionClassPluginTwigEnvironment.php rename to selfdoc/Plugin/TwigFunctionClassParser/FunctionClassPluginTwigEnvironment.php index bda56698..5acccc57 100644 --- a/SelfDoc/Configuration/Plugin/TwigFunctionClassParser/FunctionClassPluginTwigEnvironment.php +++ b/selfdoc/Plugin/TwigFunctionClassParser/FunctionClassPluginTwigEnvironment.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace SelfDoc\Configuration\Plugin\TwigFunctionClassParser; +namespace SelfDocConfig\Plugin\TwigFunctionClassParser; use Twig\Environment; use Twig\Error\LoaderError; diff --git a/SelfDoc/Configuration/Plugin/TwigFunctionClassParser/TwigFunctionClassParserPlugin.php b/selfdoc/Plugin/TwigFunctionClassParser/TwigFunctionClassParserPlugin.php similarity index 93% rename from SelfDoc/Configuration/Plugin/TwigFunctionClassParser/TwigFunctionClassParserPlugin.php rename to selfdoc/Plugin/TwigFunctionClassParser/TwigFunctionClassParserPlugin.php index 2248c1c7..0ae14e07 100644 --- a/SelfDoc/Configuration/Plugin/TwigFunctionClassParser/TwigFunctionClassParserPlugin.php +++ b/selfdoc/Plugin/TwigFunctionClassParser/TwigFunctionClassParserPlugin.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace SelfDoc\Configuration\Plugin\TwigFunctionClassParser; +namespace SelfDocConfig\Plugin\TwigFunctionClassParser; use BumbleDocGen\Core\Configuration\Configuration; use BumbleDocGen\Core\Configuration\Exception\InvalidConfigurationParameterException; @@ -21,17 +21,16 @@ final class TwigFunctionClassParserPlugin implements PluginInterface { private const TWIG_FUNCTION_DIR_NAMES = [ - '/BumbleDocGen/Core/Renderer/Twig/Function', - '/BumbleDocGen/LanguageHandler/Php/Renderer/Twig/Function' + '/src/Core/Renderer/Twig/Function', + '/src/LanguageHandler/Php/Renderer/Twig/Function' ]; public const PLUGIN_KEY = 'twigFunctionClassParserPlugin'; public function __construct( private FunctionClassPluginTwigEnvironment $twigEnvironment, - private RendererContext $context, - private Configuration $configuration, - ) - { + private RendererContext $context, + private Configuration $configuration, + ) { } public static function getSubscribedEvents(): array @@ -137,7 +136,7 @@ private function getFunctionData(ClassEntityCollection $classEntityCollection, s return null; } $entity = $classEntityCollection->getEntityByClassName($className); - if (str_starts_with($entity->getFileName(), '/SelfDoc')) { + if (str_starts_with($entity->getFileName(), '/selfdoc')) { return null; } diff --git a/SelfDoc/Configuration/Plugin/TwigFunctionClassParser/templates/twigFunctionInfoBlock.twig b/selfdoc/Plugin/TwigFunctionClassParser/templates/twigFunctionInfoBlock.twig similarity index 100% rename from SelfDoc/Configuration/Plugin/TwigFunctionClassParser/templates/twigFunctionInfoBlock.twig rename to selfdoc/Plugin/TwigFunctionClassParser/templates/twigFunctionInfoBlock.twig diff --git a/SelfDoc/Configuration/Twig/CustomFilter/EvalString.php b/selfdoc/Twig/CustomFilter/EvalString.php similarity index 90% rename from SelfDoc/Configuration/Twig/CustomFilter/EvalString.php rename to selfdoc/Twig/CustomFilter/EvalString.php index c11643bc..df32b43a 100644 --- a/SelfDoc/Configuration/Twig/CustomFilter/EvalString.php +++ b/selfdoc/Twig/CustomFilter/EvalString.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace SelfDoc\Configuration\Twig\CustomFilter; +namespace SelfDocConfig\Twig\CustomFilter; use BumbleDocGen\Core\Renderer\Twig\Filter\CustomFilterInterface; diff --git a/SelfDoc/Configuration/Twig/CustomFunction/FindEntitiesClassesByCollectionClassName.php b/selfdoc/Twig/CustomFunction/FindEntitiesClassesByCollectionClassName.php similarity index 97% rename from SelfDoc/Configuration/Twig/CustomFunction/FindEntitiesClassesByCollectionClassName.php rename to selfdoc/Twig/CustomFunction/FindEntitiesClassesByCollectionClassName.php index 68f262ac..4d99893d 100644 --- a/SelfDoc/Configuration/Twig/CustomFunction/FindEntitiesClassesByCollectionClassName.php +++ b/selfdoc/Twig/CustomFunction/FindEntitiesClassesByCollectionClassName.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace SelfDoc\Configuration\Twig\CustomFunction; +namespace SelfDocConfig\Twig\CustomFunction; use BumbleDocGen\Core\Configuration\Exception\InvalidConfigurationParameterException; use BumbleDocGen\Core\Parser\Entity\RootEntityCollectionsGroup; diff --git a/SelfDoc/Configuration/Twig/CustomFunction/GetConfigParametersDescription.php b/selfdoc/Twig/CustomFunction/GetConfigParametersDescription.php similarity index 97% rename from SelfDoc/Configuration/Twig/CustomFunction/GetConfigParametersDescription.php rename to selfdoc/Twig/CustomFunction/GetConfigParametersDescription.php index b46e1931..58df212a 100644 --- a/SelfDoc/Configuration/Twig/CustomFunction/GetConfigParametersDescription.php +++ b/selfdoc/Twig/CustomFunction/GetConfigParametersDescription.php @@ -2,12 +2,13 @@ declare(strict_types=1); -namespace SelfDoc\Configuration\Twig\CustomFunction; +namespace SelfDocConfig\Twig\CustomFunction; use BumbleDocGen\Core\Configuration\ConfigurationParameterBag; use BumbleDocGen\Core\Parser\Entity\RootEntityCollection; use BumbleDocGen\Core\Renderer\Twig\Function\CustomFunctionInterface; use Noodlehaus\Config; + use function BumbleDocGen\Core\is_associative_array; final class GetConfigParametersDescription implements CustomFunctionInterface diff --git a/SelfDoc/Configuration/Twig/CustomFunction/PrintClassCollectionAsGroupedTable.php b/selfdoc/Twig/CustomFunction/PrintClassCollectionAsGroupedTable.php similarity index 98% rename from SelfDoc/Configuration/Twig/CustomFunction/PrintClassCollectionAsGroupedTable.php rename to selfdoc/Twig/CustomFunction/PrintClassCollectionAsGroupedTable.php index 79045b0c..1023f39e 100644 --- a/SelfDoc/Configuration/Twig/CustomFunction/PrintClassCollectionAsGroupedTable.php +++ b/selfdoc/Twig/CustomFunction/PrintClassCollectionAsGroupedTable.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace SelfDoc\Configuration\Twig\CustomFunction; +namespace SelfDocConfig\Twig\CustomFunction; use BumbleDocGen\Core\Configuration\Exception\InvalidConfigurationParameterException; use BumbleDocGen\Core\Renderer\Twig\Function\CustomFunctionInterface; diff --git a/SelfDoc/Configuration/templates/readme.md.twig b/selfdoc/templates/README.md.twig similarity index 88% rename from SelfDoc/Configuration/templates/readme.md.twig rename to selfdoc/templates/README.md.twig index 6f093ab6..16616b4b 100644 --- a/SelfDoc/Configuration/templates/readme.md.twig +++ b/selfdoc/templates/README.md.twig @@ -47,6 +47,8 @@ BumbleDocGen's interface consists of mainly two classes: DocGenerator and {{ "Examples of usage" | textToHeading('H3') }} +1) Working with a library in a PHP file + ```php require_once 'vendor/autoload.php'; @@ -62,10 +64,23 @@ $docgen = $factory->create('/path/to/configuration/files'); $docgen->generate(); ``` +2) Working with the library through a console application + +```bash +# List of available commands +./vendor/bin/bumbleDocGen list + +# Documentation generation example +./vendor/bin/bumbleDocGen generate -c + +# Getting detailed information about a command +./vendor/bin/bumbleDocGen generate -h +``` + ------------------ **This documentation was generated using the Bumble Documentation Generator, and is an example of how it works.** To update this documentation, run the following command: -{{ 'php SelfDoc/docGen.php generate' | textToCodeBlock('console') }} +{{ './bin/bumbleDocGen generate' | textToCodeBlock('console') }} diff --git a/SelfDoc/Configuration/templates/_config.yml b/selfdoc/templates/_config.yml similarity index 100% rename from SelfDoc/Configuration/templates/_config.yml rename to selfdoc/templates/_config.yml diff --git a/SelfDoc/Configuration/templates/_layouts/default.html b/selfdoc/templates/_layouts/default.html similarity index 100% rename from SelfDoc/Configuration/templates/_layouts/default.html rename to selfdoc/templates/_layouts/default.html diff --git a/SelfDoc/Configuration/templates/assets/doc_example.png b/selfdoc/templates/assets/doc_example.png similarity index 100% rename from SelfDoc/Configuration/templates/assets/doc_example.png rename to selfdoc/templates/assets/doc_example.png diff --git a/SelfDoc/Configuration/templates/assets/doc_structure.png b/selfdoc/templates/assets/doc_structure.png similarity index 100% rename from SelfDoc/Configuration/templates/assets/doc_structure.png rename to selfdoc/templates/assets/doc_structure.png diff --git a/SelfDoc/Configuration/templates/assets/doc_structure2.png b/selfdoc/templates/assets/doc_structure2.png similarity index 100% rename from SelfDoc/Configuration/templates/assets/doc_structure2.png rename to selfdoc/templates/assets/doc_structure2.png diff --git a/SelfDoc/Configuration/templates/tech/1.configuration/readme.md.twig b/selfdoc/templates/tech/1.configuration/readme.md.twig similarity index 93% rename from SelfDoc/Configuration/templates/tech/1.configuration/readme.md.twig rename to selfdoc/templates/tech/1.configuration/readme.md.twig index 209686a0..dd18ddcf 100644 --- a/SelfDoc/Configuration/templates/tech/1.configuration/readme.md.twig +++ b/selfdoc/templates/tech/1.configuration/readme.md.twig @@ -12,7 +12,7 @@ During the generation process, the data from these files is loaded into the C Let's look at an example of a real configuration in more detail: -{{ fileGetContents('%templates_dir%/../config.yaml') | textToCodeBlock('yaml') }} +{{ fileGetContents('%WORKING_DIR%/bumble_doc_gen.yaml') | textToCodeBlock('yaml') }} In this example, we see the real configuration of the self-documentation of this project. @@ -35,7 +35,7 @@ The inheritance algorithm is as follows: scalar types can be overwritten by each {{ "Configuration parameters" | textToHeading('H2') }} -{% set parameters = getConfigParametersDescription(phpClassEntityCollection, '%WORKING_DIR%/BumbleDocGen/Core/Configuration/defaultConfiguration.yaml') %} +{% set parameters = getConfigParametersDescription(phpClassEntityCollection, '%WORKING_DIR%/src/Core/Configuration/defaultConfiguration.yaml') %} diff --git a/SelfDoc/Configuration/templates/tech/2.parser/entity.md.twig b/selfdoc/templates/tech/2.parser/entity.md.twig similarity index 100% rename from SelfDoc/Configuration/templates/tech/2.parser/entity.md.twig rename to selfdoc/templates/tech/2.parser/entity.md.twig diff --git a/SelfDoc/Configuration/templates/tech/2.parser/entityFilterCondition.md.twig b/selfdoc/templates/tech/2.parser/entityFilterCondition.md.twig similarity index 96% rename from SelfDoc/Configuration/templates/tech/2.parser/entityFilterCondition.md.twig rename to selfdoc/templates/tech/2.parser/entityFilterCondition.md.twig index 3fba4b4c..414282da 100644 --- a/SelfDoc/Configuration/templates/tech/2.parser/entityFilterCondition.md.twig +++ b/selfdoc/templates/tech/2.parser/entityFilterCondition.md.twig @@ -72,11 +72,11 @@ language_handlers: Common filtering conditions that are available for any entity: {{ printEntityCollectionAsList( - filterConditions.filterByPaths(['/BumbleDocGen/Core']) + filterConditions.filterByPaths(['/src/Core']) ) }} Filter condition for working with entities PHP language handler: {{ printClassCollectionAsGroupedTable( - filterConditions.filterByPaths(['/BumbleDocGen/LanguageHandler/Php/Parser/FilterCondition']) + filterConditions.filterByPaths(['/src/LanguageHandler/Php/Parser/FilterCondition']) ) }} diff --git a/SelfDoc/Configuration/templates/tech/2.parser/readme.md.twig b/selfdoc/templates/tech/2.parser/readme.md.twig similarity index 100% rename from SelfDoc/Configuration/templates/tech/2.parser/readme.md.twig rename to selfdoc/templates/tech/2.parser/readme.md.twig diff --git a/SelfDoc/Configuration/templates/tech/2.parser/sourceLocator.md.twig b/selfdoc/templates/tech/2.parser/sourceLocator.md.twig similarity index 83% rename from SelfDoc/Configuration/templates/tech/2.parser/sourceLocator.md.twig rename to selfdoc/templates/tech/2.parser/sourceLocator.md.twig index 0e243dbf..328d857d 100644 --- a/SelfDoc/Configuration/templates/tech/2.parser/sourceLocator.md.twig +++ b/selfdoc/templates/tech/2.parser/sourceLocator.md.twig @@ -12,8 +12,8 @@ Source locators are set in the configuration: - class: \\BumbleDocGen\\Core\\Parser\\SourceLocator\\RecursiveDirectoriesSourceLocator arguments: directories: - - "%project_root%/BumbleDocGen" - - "%project_root%/SelfDoc"' | textToCodeBlock('yaml') }} + - "%project_root%/src" + - "%project_root%/selfdoc"' | textToCodeBlock('yaml') }} You can create your own source locators or use any existing ones. All source locators must implement the SourceLocatorInterface interface. @@ -24,7 +24,7 @@ You can create your own source locators or use any existing ones. All source loc {{ printEntityCollectionAsList( phpClassEntityCollection .filterByInterfaces(['BumbleDocGen\\Core\\Parser\\SourceLocator\\SourceLocatorInterface']) - .filterByPaths(['/BumbleDocGen/Core/Parser']) + .filterByPaths(['/src/Core/Parser']) .getOnlyInstantiable() ) }} @@ -33,6 +33,6 @@ You can create your own source locators or use any existing ones. All source loc {{ printEntityCollectionAsList( phpClassEntityCollection .filterByInterfaces(['BumbleDocGen\\Core\\Parser\\SourceLocator\\SourceLocatorInterface']) - .filterByPaths(['/BumbleDocGen/LanguageHandler/Php/Parser']) + .filterByPaths(['/src/LanguageHandler/Php/Parser']) .getOnlyInstantiable() ) }} \ No newline at end of file diff --git a/SelfDoc/Configuration/templates/tech/3.renderer/breadcrumbs.md.twig b/selfdoc/templates/tech/3.renderer/breadcrumbs.md.twig similarity index 100% rename from SelfDoc/Configuration/templates/tech/3.renderer/breadcrumbs.md.twig rename to selfdoc/templates/tech/3.renderer/breadcrumbs.md.twig diff --git a/SelfDoc/Configuration/templates/tech/3.renderer/readme.md.twig b/selfdoc/templates/tech/3.renderer/readme.md.twig similarity index 100% rename from SelfDoc/Configuration/templates/tech/3.renderer/readme.md.twig rename to selfdoc/templates/tech/3.renderer/readme.md.twig diff --git a/SelfDoc/Configuration/templates/tech/3.renderer/templates.md.twig b/selfdoc/templates/tech/3.renderer/templates.md.twig similarity index 100% rename from SelfDoc/Configuration/templates/tech/3.renderer/templates.md.twig rename to selfdoc/templates/tech/3.renderer/templates.md.twig diff --git a/SelfDoc/Configuration/templates/tech/3.renderer/templatesDynamicBlocks.md.twig b/selfdoc/templates/tech/3.renderer/templatesDynamicBlocks.md.twig similarity index 100% rename from SelfDoc/Configuration/templates/tech/3.renderer/templatesDynamicBlocks.md.twig rename to selfdoc/templates/tech/3.renderer/templatesDynamicBlocks.md.twig diff --git a/SelfDoc/Configuration/templates/tech/3.renderer/templatesLinking.md.twig b/selfdoc/templates/tech/3.renderer/templatesLinking.md.twig similarity index 100% rename from SelfDoc/Configuration/templates/tech/3.renderer/templatesLinking.md.twig rename to selfdoc/templates/tech/3.renderer/templatesLinking.md.twig diff --git a/SelfDoc/Configuration/templates/tech/3.renderer/templatesVariables.md.twig b/selfdoc/templates/tech/3.renderer/templatesVariables.md.twig similarity index 100% rename from SelfDoc/Configuration/templates/tech/3.renderer/templatesVariables.md.twig rename to selfdoc/templates/tech/3.renderer/templatesVariables.md.twig diff --git a/SelfDoc/Configuration/templates/tech/3.renderer/twigCustomFilters.md.twig b/selfdoc/templates/tech/3.renderer/twigCustomFilters.md.twig similarity index 96% rename from SelfDoc/Configuration/templates/tech/3.renderer/twigCustomFilters.md.twig rename to selfdoc/templates/tech/3.renderer/twigCustomFilters.md.twig index 21825a0c..188f4b94 100644 --- a/SelfDoc/Configuration/templates/tech/3.renderer/twigCustomFilters.md.twig +++ b/selfdoc/templates/tech/3.renderer/twigCustomFilters.md.twig @@ -56,8 +56,8 @@ Here is a list of filters available by default: {% for filter in phpClassEntityCollection.filterByPaths([ - '/BumbleDocGen/Core/Renderer/Twig/Filter', - '/BumbleDocGen/LanguageHandler/Php/Renderer/Twig/Filter' + '/src/Core/Renderer/Twig/Filter', + '/src/LanguageHandler/Php/Renderer/Twig/Filter' ]) .filterByInterfaces(['BumbleDocGen\\Core\\Renderer\\Twig\\Filter\\CustomFilterInterface']) .getOnlyInstantiable() diff --git a/SelfDoc/Configuration/templates/tech/3.renderer/twigCustomFunctions.md.twig b/selfdoc/templates/tech/3.renderer/twigCustomFunctions.md.twig similarity index 90% rename from SelfDoc/Configuration/templates/tech/3.renderer/twigCustomFunctions.md.twig rename to selfdoc/templates/tech/3.renderer/twigCustomFunctions.md.twig index cadbb42f..aaf23456 100644 --- a/SelfDoc/Configuration/templates/tech/3.renderer/twigCustomFunctions.md.twig +++ b/selfdoc/templates/tech/3.renderer/twigCustomFunctions.md.twig @@ -22,9 +22,9 @@ You can add your custom functions to the configuration like this: ```yaml twig_functions: - - class: \SelfDoc\Configuration\Twig\CustomFunction\FindEntitiesClassesByCollectionClassName - - class: \SelfDoc\Configuration\Twig\CustomFunction\PrintClassCollectionAsGroupedTable - - class: \SelfDoc\Configuration\Twig\CustomFunction\GetConfigParametersDescription + - class: \SelfDocConfig\Twig\CustomFunction\FindEntitiesClassesByCollectionClassName + - class: \SelfDocConfig\Twig\CustomFunction\PrintClassCollectionAsGroupedTable + - class: \SelfDocConfig\Twig\CustomFunction\GetConfigParametersDescription ``` It is important to remember that when a template is inherited, custom functions are not overridden and augmented. @@ -54,8 +54,8 @@ Here is a list of functions available by default: {% for function in phpClassEntityCollection.filterByPaths([ - '/BumbleDocGen/Core/Renderer/Twig/Function', - '/BumbleDocGen/LanguageHandler/Php/Renderer/Twig/Function' + '/src/Core/Renderer/Twig/Function', + '/src/LanguageHandler/Php/Renderer/Twig/Function' ]) .filterByInterfaces(['BumbleDocGen\\Core\\Renderer\\Twig\\Function\\CustomFunctionInterface']) .getOnlyInstantiable() diff --git a/SelfDoc/Configuration/templates/tech/4.pluginSystem/readme.md.twig b/selfdoc/templates/tech/4.pluginSystem/readme.md.twig similarity index 87% rename from SelfDoc/Configuration/templates/tech/4.pluginSystem/readme.md.twig rename to selfdoc/templates/tech/4.pluginSystem/readme.md.twig index d9c26052..40436636 100644 --- a/SelfDoc/Configuration/templates/tech/4.pluginSystem/readme.md.twig +++ b/selfdoc/templates/tech/4.pluginSystem/readme.md.twig @@ -13,9 +13,9 @@ You can add your plugins to the configuration like this: ```yaml plugins: - - class: \SelfDoc\Configuration\Plugin\RoaveStubber\BetterReflectionStubberPlugin - - class: \SelfDoc\Configuration\Plugin\TwigFilterClassParser\TwigFilterClassParserPlugin - - class: \SelfDoc\Configuration\Plugin\TwigFunctionClassParser\TwigFunctionClassParserPlugin + - class: \SelfDocConfig\Plugin\RoaveStubber\BetterReflectionStubberPlugin + - class: \SelfDocConfig\Plugin\TwigFilterClassParser\TwigFilterClassParserPlugin + - class: \SelfDocConfig\Plugin\TwigFunctionClassParser\TwigFunctionClassParserPlugin ``` {{ "Default plugins" | textToHeading('H2') }} @@ -32,8 +32,8 @@ Plugins for any programming languages work regardless of which language handler {% for pluginEntity in phpClassEntityCollection .filterByPaths([ - '/BumbleDocGen/Core', - '/BumbleDocGen/LanguageHandler', + '/src/Core', + '/src/LanguageHandler', ]) .filterByInterfaces(['BumbleDocGen\\Core\\Plugin\\PluginInterface']) .getOnlyInstantiable() @@ -58,8 +58,8 @@ Plugins for any programming languages work regardless of which language handler {{ printEntityCollectionAsList( phpClassEntityCollection .filterByPaths([ - '/BumbleDocGen/Core', - '/BumbleDocGen/LanguageHandler', + '/src/Core', + '/src/LanguageHandler', ]) .filterByParentClassNames(['Symfony\\Contracts\\EventDispatcher\\Event']) .getOnlyInstantiable() ) }} diff --git a/SelfDoc/Configuration/templates/tech/map.md.twig b/selfdoc/templates/tech/map.md.twig similarity index 70% rename from SelfDoc/Configuration/templates/tech/map.md.twig rename to selfdoc/templates/tech/map.md.twig index af1591f6..ff9ed9a4 100644 --- a/SelfDoc/Configuration/templates/tech/map.md.twig +++ b/selfdoc/templates/tech/map.md.twig @@ -4,4 +4,4 @@ Directory layout ( only documented files shown ): -{{ drawClassMap( phpClassEntityCollection.filterByPaths(['/BumbleDocGen']) ) }} \ No newline at end of file +{{ drawClassMap( phpClassEntityCollection.filterByPaths(['/src']) ) }} \ No newline at end of file diff --git a/SelfDoc/Configuration/templates/tech/readme.md.twig b/selfdoc/templates/tech/readme.md.twig similarity index 100% rename from SelfDoc/Configuration/templates/tech/readme.md.twig rename to selfdoc/templates/tech/readme.md.twig diff --git a/src/Console/App.php b/src/Console/App.php new file mode 100644 index 00000000..94761263 --- /dev/null +++ b/src/Console/App.php @@ -0,0 +1,17 @@ +add(new GenerateCommand()); + } +} diff --git a/src/Console/Command/GenerateCommand.php b/src/Console/Command/GenerateCommand.php new file mode 100644 index 00000000..13ef870c --- /dev/null +++ b/src/Console/Command/GenerateCommand.php @@ -0,0 +1,84 @@ + 'Path to the directory of the documented project', + 'templates_dir' => 'Path to directory with documentation templates', + 'output_dir' => 'Path to the directory where the finished documentation will be generated', + 'cache_dir' => 'Configuration parameter: Path to the directory where the documentation generator cache will be saved', + ]; + + protected function configure(): void + { + $this->setName('generate') + ->setDescription('Generate documentation') + ->addOption( + 'config', + 'c', + InputOption::VALUE_NEGATABLE, + 'Path to the configuration file, specified as absolute or relative to the working directory [default: "bumble_doc_gen.yaml"]>', + 'bumble_doc_gen.yaml' + ); + + foreach ($this->customConfigOptions as $optionName => $description) { + $this->addOption( + $optionName, + null, + InputOption::VALUE_OPTIONAL, + "Config parameter:> {$description}" + ); + } + } + + /** + * @throws NotFoundException + * @throws DependencyException + * @throws InvalidArgumentException + */ + protected function execute( + InputInterface $input, + OutputInterface $output + ): int { + $docGeneratorFactory = (new DocGeneratorFactory()); + $docGeneratorFactory->setCustomConfigurationParameters( + $this->getCustomConfigurationParameters($input) + ); + + $configFile = $input->getOption('config'); + if ($configFile && Path::isRelative($configFile)) { + $configFile = getcwd() . DIRECTORY_SEPARATOR . $configFile; + $docGeneratorFactory->create($configFile)->generate(); + } else { + $docGeneratorFactory->create()->generate(); + } + + return self::SUCCESS; + } + + private function getCustomConfigurationParameters(InputInterface $input): array + { + $customConfigurationParameters = []; + foreach ($this->customConfigOptions as $optionName => $description) { + $optionValue = $input->getOption($optionName); + if (!is_null($optionValue)) { + $customConfigurationParameters[$optionName] = $optionValue; + } + } + return $customConfigurationParameters; + } +} diff --git a/BumbleDocGen/Core/Cache/EntityCacheItemPool.php b/src/Core/Cache/EntityCacheItemPool.php similarity index 100% rename from BumbleDocGen/Core/Cache/EntityCacheItemPool.php rename to src/Core/Cache/EntityCacheItemPool.php diff --git a/BumbleDocGen/Core/Cache/LocalCache/Exception/ObjectNotFoundException.php b/src/Core/Cache/LocalCache/Exception/ObjectNotFoundException.php similarity index 100% rename from BumbleDocGen/Core/Cache/LocalCache/Exception/ObjectNotFoundException.php rename to src/Core/Cache/LocalCache/Exception/ObjectNotFoundException.php diff --git a/BumbleDocGen/Core/Cache/LocalCache/LocalObjectCache.php b/src/Core/Cache/LocalCache/LocalObjectCache.php similarity index 100% rename from BumbleDocGen/Core/Cache/LocalCache/LocalObjectCache.php rename to src/Core/Cache/LocalCache/LocalObjectCache.php diff --git a/BumbleDocGen/Core/Cache/SharedCompressedDocumentFileCache.php b/src/Core/Cache/SharedCompressedDocumentFileCache.php similarity index 100% rename from BumbleDocGen/Core/Cache/SharedCompressedDocumentFileCache.php rename to src/Core/Cache/SharedCompressedDocumentFileCache.php diff --git a/BumbleDocGen/Core/Cache/SourceLocatorCacheItemPool.php b/src/Core/Cache/SourceLocatorCacheItemPool.php similarity index 100% rename from BumbleDocGen/Core/Cache/SourceLocatorCacheItemPool.php rename to src/Core/Cache/SourceLocatorCacheItemPool.php diff --git a/BumbleDocGen/Core/Configuration/Configuration.php b/src/Core/Configuration/Configuration.php similarity index 98% rename from BumbleDocGen/Core/Configuration/Configuration.php rename to src/Core/Configuration/Configuration.php index 6c7ca308..4bff70a4 100644 --- a/BumbleDocGen/Core/Configuration/Configuration.php +++ b/src/Core/Configuration/Configuration.php @@ -112,6 +112,13 @@ public function getOutputDir(): string "`output_dir` cannot be created because parent directory `{$parentDir}` does not exist" ); } + + if (!is_writable($parentDir)) { + throw new InvalidConfigurationParameterException( + "`output_dir` cannot be created because parent directory `{$parentDir}` is not writable" + ); + } + if (!file_exists($outputDir)) { $this->logger->notice("Creating `{$outputDir}` directory"); mkdir($outputDir); diff --git a/BumbleDocGen/Core/Configuration/ConfigurationParameterBag.php b/src/Core/Configuration/ConfigurationParameterBag.php similarity index 99% rename from BumbleDocGen/Core/Configuration/ConfigurationParameterBag.php rename to src/Core/Configuration/ConfigurationParameterBag.php index 40ac81bf..a8c7f1f7 100644 --- a/BumbleDocGen/Core/Configuration/ConfigurationParameterBag.php +++ b/src/Core/Configuration/ConfigurationParameterBag.php @@ -72,7 +72,7 @@ public function set(string $name, mixed $value): void foreach ($keys as $key) { $value = [$key => $value]; } - $this->parameters = array_merge_recursive($value, $this->parameters); + $this->parameters = $this->mergeConfigParams($this->parameters, $value); } public function addValueIfNotExists(string $name, mixed $value): void diff --git a/BumbleDocGen/Core/Configuration/Exception/InvalidConfigurationParameterException.php b/src/Core/Configuration/Exception/InvalidConfigurationParameterException.php similarity index 100% rename from BumbleDocGen/Core/Configuration/Exception/InvalidConfigurationParameterException.php rename to src/Core/Configuration/Exception/InvalidConfigurationParameterException.php diff --git a/BumbleDocGen/Core/Configuration/ValueResolver/ArgvValueResolver.php b/src/Core/Configuration/ValueResolver/ArgvValueResolver.php similarity index 100% rename from BumbleDocGen/Core/Configuration/ValueResolver/ArgvValueResolver.php rename to src/Core/Configuration/ValueResolver/ArgvValueResolver.php diff --git a/BumbleDocGen/Core/Configuration/ValueResolver/InternalValueResolver.php b/src/Core/Configuration/ValueResolver/InternalValueResolver.php similarity index 100% rename from BumbleDocGen/Core/Configuration/ValueResolver/InternalValueResolver.php rename to src/Core/Configuration/ValueResolver/InternalValueResolver.php diff --git a/BumbleDocGen/Core/Configuration/ValueResolver/RefValueResolver.php b/src/Core/Configuration/ValueResolver/RefValueResolver.php similarity index 100% rename from BumbleDocGen/Core/Configuration/ValueResolver/RefValueResolver.php rename to src/Core/Configuration/ValueResolver/RefValueResolver.php diff --git a/BumbleDocGen/Core/Configuration/ValueResolver/ValueResolverInterface.php b/src/Core/Configuration/ValueResolver/ValueResolverInterface.php similarity index 100% rename from BumbleDocGen/Core/Configuration/ValueResolver/ValueResolverInterface.php rename to src/Core/Configuration/ValueResolver/ValueResolverInterface.php diff --git a/BumbleDocGen/Core/Configuration/ValueTransformer/ValueToClassTransformer.php b/src/Core/Configuration/ValueTransformer/ValueToClassTransformer.php similarity index 100% rename from BumbleDocGen/Core/Configuration/ValueTransformer/ValueToClassTransformer.php rename to src/Core/Configuration/ValueTransformer/ValueToClassTransformer.php diff --git a/BumbleDocGen/Core/Configuration/ValueTransformer/ValueTransformerInterface.php b/src/Core/Configuration/ValueTransformer/ValueTransformerInterface.php similarity index 100% rename from BumbleDocGen/Core/Configuration/ValueTransformer/ValueTransformerInterface.php rename to src/Core/Configuration/ValueTransformer/ValueTransformerInterface.php diff --git a/BumbleDocGen/Core/Configuration/defaultConfiguration.yaml b/src/Core/Configuration/defaultConfiguration.yaml similarity index 95% rename from BumbleDocGen/Core/Configuration/defaultConfiguration.yaml rename to src/Core/Configuration/defaultConfiguration.yaml index bd1c6332..e652c1e2 100644 --- a/BumbleDocGen/Core/Configuration/defaultConfiguration.yaml +++ b/src/Core/Configuration/defaultConfiguration.yaml @@ -2,7 +2,7 @@ parent_configuration: # (string|null) Path to parent configuration f project_root: # (string) Path to the directory of the documented project (or part of the project) templates_dir: # (string) Path to directory with documentation templates output_dir: "%project_root%/docs" # (string) Path to the directory where the finished documentation will be generated -cache_dir: '%WORKING_DIR%/__cache'# (string|null) Path to the directory where the documentation generator cache will be saved +cache_dir: '%WORKING_DIR%/.bumbleDocGenCache'# (string|null) Path to the directory where the documentation generator cache will be saved output_dir_base_url: "/docs" # (string) Basic part of url documentation. Used to form links in generated documents. git_client_path: "git" # (string) Path to git client check_file_in_git_before_creating_doc: true # (bool) Checking if a document exists in GIT before creating a document diff --git a/BumbleDocGen/Core/Console/ProgressBarFactory.php b/src/Core/Console/ProgressBarFactory.php similarity index 100% rename from BumbleDocGen/Core/Console/ProgressBarFactory.php rename to src/Core/Console/ProgressBarFactory.php diff --git a/BumbleDocGen/Core/Console/StylizedProgressBar.php b/src/Core/Console/StylizedProgressBar.php similarity index 100% rename from BumbleDocGen/Core/Console/StylizedProgressBar.php rename to src/Core/Console/StylizedProgressBar.php diff --git a/BumbleDocGen/Core/Parser/Entity/BaseEntityCollection.php b/src/Core/Parser/Entity/BaseEntityCollection.php similarity index 100% rename from BumbleDocGen/Core/Parser/Entity/BaseEntityCollection.php rename to src/Core/Parser/Entity/BaseEntityCollection.php diff --git a/BumbleDocGen/Core/Parser/Entity/Cache/CacheKey/CacheKeyGeneratorInterface.php b/src/Core/Parser/Entity/Cache/CacheKey/CacheKeyGeneratorInterface.php similarity index 100% rename from BumbleDocGen/Core/Parser/Entity/Cache/CacheKey/CacheKeyGeneratorInterface.php rename to src/Core/Parser/Entity/Cache/CacheKey/CacheKeyGeneratorInterface.php diff --git a/BumbleDocGen/Core/Parser/Entity/Cache/CacheKey/DefaultCacheKeyGenerator.php b/src/Core/Parser/Entity/Cache/CacheKey/DefaultCacheKeyGenerator.php similarity index 100% rename from BumbleDocGen/Core/Parser/Entity/Cache/CacheKey/DefaultCacheKeyGenerator.php rename to src/Core/Parser/Entity/Cache/CacheKey/DefaultCacheKeyGenerator.php diff --git a/BumbleDocGen/Core/Parser/Entity/Cache/CacheKey/RendererContextCacheKeyGenerator.php b/src/Core/Parser/Entity/Cache/CacheKey/RendererContextCacheKeyGenerator.php similarity index 100% rename from BumbleDocGen/Core/Parser/Entity/Cache/CacheKey/RendererContextCacheKeyGenerator.php rename to src/Core/Parser/Entity/Cache/CacheKey/RendererContextCacheKeyGenerator.php diff --git a/BumbleDocGen/Core/Parser/Entity/Cache/CacheableEntityInterface.php b/src/Core/Parser/Entity/Cache/CacheableEntityInterface.php similarity index 100% rename from BumbleDocGen/Core/Parser/Entity/Cache/CacheableEntityInterface.php rename to src/Core/Parser/Entity/Cache/CacheableEntityInterface.php diff --git a/BumbleDocGen/Core/Parser/Entity/Cache/CacheableEntityTrait.php b/src/Core/Parser/Entity/Cache/CacheableEntityTrait.php similarity index 100% rename from BumbleDocGen/Core/Parser/Entity/Cache/CacheableEntityTrait.php rename to src/Core/Parser/Entity/Cache/CacheableEntityTrait.php diff --git a/BumbleDocGen/Core/Parser/Entity/Cache/CacheableEntityWrapperFactory.php b/src/Core/Parser/Entity/Cache/CacheableEntityWrapperFactory.php similarity index 100% rename from BumbleDocGen/Core/Parser/Entity/Cache/CacheableEntityWrapperFactory.php rename to src/Core/Parser/Entity/Cache/CacheableEntityWrapperFactory.php diff --git a/BumbleDocGen/Core/Parser/Entity/Cache/CacheableEntityWrapperTrait.php b/src/Core/Parser/Entity/Cache/CacheableEntityWrapperTrait.php similarity index 100% rename from BumbleDocGen/Core/Parser/Entity/Cache/CacheableEntityWrapperTrait.php rename to src/Core/Parser/Entity/Cache/CacheableEntityWrapperTrait.php diff --git a/BumbleDocGen/Core/Parser/Entity/Cache/CacheableMethod.php b/src/Core/Parser/Entity/Cache/CacheableMethod.php similarity index 100% rename from BumbleDocGen/Core/Parser/Entity/Cache/CacheableMethod.php rename to src/Core/Parser/Entity/Cache/CacheableMethod.php diff --git a/BumbleDocGen/Core/Parser/Entity/Cache/EntityCacheStorageHelper.php b/src/Core/Parser/Entity/Cache/EntityCacheStorageHelper.php similarity index 100% rename from BumbleDocGen/Core/Parser/Entity/Cache/EntityCacheStorageHelper.php rename to src/Core/Parser/Entity/Cache/EntityCacheStorageHelper.php diff --git a/BumbleDocGen/Core/Parser/Entity/CollectionLogOperation/CloneOperation.php b/src/Core/Parser/Entity/CollectionLogOperation/CloneOperation.php similarity index 100% rename from BumbleDocGen/Core/Parser/Entity/CollectionLogOperation/CloneOperation.php rename to src/Core/Parser/Entity/CollectionLogOperation/CloneOperation.php diff --git a/BumbleDocGen/Core/Parser/Entity/CollectionLogOperation/IterateEntitiesOperation.php b/src/Core/Parser/Entity/CollectionLogOperation/IterateEntitiesOperation.php similarity index 100% rename from BumbleDocGen/Core/Parser/Entity/CollectionLogOperation/IterateEntitiesOperation.php rename to src/Core/Parser/Entity/CollectionLogOperation/IterateEntitiesOperation.php diff --git a/BumbleDocGen/Core/Parser/Entity/CollectionLogOperation/OperationInterface.php b/src/Core/Parser/Entity/CollectionLogOperation/OperationInterface.php similarity index 100% rename from BumbleDocGen/Core/Parser/Entity/CollectionLogOperation/OperationInterface.php rename to src/Core/Parser/Entity/CollectionLogOperation/OperationInterface.php diff --git a/BumbleDocGen/Core/Parser/Entity/CollectionLogOperation/OperationsCollection.php b/src/Core/Parser/Entity/CollectionLogOperation/OperationsCollection.php similarity index 100% rename from BumbleDocGen/Core/Parser/Entity/CollectionLogOperation/OperationsCollection.php rename to src/Core/Parser/Entity/CollectionLogOperation/OperationsCollection.php diff --git a/BumbleDocGen/Core/Parser/Entity/CollectionLogOperation/SingleEntitySearchOperation.php b/src/Core/Parser/Entity/CollectionLogOperation/SingleEntitySearchOperation.php similarity index 100% rename from BumbleDocGen/Core/Parser/Entity/CollectionLogOperation/SingleEntitySearchOperation.php rename to src/Core/Parser/Entity/CollectionLogOperation/SingleEntitySearchOperation.php diff --git a/BumbleDocGen/Core/Parser/Entity/EntityInterface.php b/src/Core/Parser/Entity/EntityInterface.php similarity index 100% rename from BumbleDocGen/Core/Parser/Entity/EntityInterface.php rename to src/Core/Parser/Entity/EntityInterface.php diff --git a/BumbleDocGen/Core/Parser/Entity/LoggableRootEntityCollection.php b/src/Core/Parser/Entity/LoggableRootEntityCollection.php similarity index 100% rename from BumbleDocGen/Core/Parser/Entity/LoggableRootEntityCollection.php rename to src/Core/Parser/Entity/LoggableRootEntityCollection.php diff --git a/BumbleDocGen/Core/Parser/Entity/RootEntityCollection.php b/src/Core/Parser/Entity/RootEntityCollection.php similarity index 100% rename from BumbleDocGen/Core/Parser/Entity/RootEntityCollection.php rename to src/Core/Parser/Entity/RootEntityCollection.php diff --git a/BumbleDocGen/Core/Parser/Entity/RootEntityCollectionsGroup.php b/src/Core/Parser/Entity/RootEntityCollectionsGroup.php similarity index 100% rename from BumbleDocGen/Core/Parser/Entity/RootEntityCollectionsGroup.php rename to src/Core/Parser/Entity/RootEntityCollectionsGroup.php diff --git a/BumbleDocGen/Core/Parser/Entity/RootEntityInterface.php b/src/Core/Parser/Entity/RootEntityInterface.php similarity index 100% rename from BumbleDocGen/Core/Parser/Entity/RootEntityInterface.php rename to src/Core/Parser/Entity/RootEntityInterface.php diff --git a/BumbleDocGen/Core/Parser/FilterCondition/CommonFilterCondition/FalseCondition.php b/src/Core/Parser/FilterCondition/CommonFilterCondition/FalseCondition.php similarity index 100% rename from BumbleDocGen/Core/Parser/FilterCondition/CommonFilterCondition/FalseCondition.php rename to src/Core/Parser/FilterCondition/CommonFilterCondition/FalseCondition.php diff --git a/BumbleDocGen/Core/Parser/FilterCondition/CommonFilterCondition/FileTextContainsCondition.php b/src/Core/Parser/FilterCondition/CommonFilterCondition/FileTextContainsCondition.php similarity index 100% rename from BumbleDocGen/Core/Parser/FilterCondition/CommonFilterCondition/FileTextContainsCondition.php rename to src/Core/Parser/FilterCondition/CommonFilterCondition/FileTextContainsCondition.php diff --git a/BumbleDocGen/Core/Parser/FilterCondition/CommonFilterCondition/LocatedInCondition.php b/src/Core/Parser/FilterCondition/CommonFilterCondition/LocatedInCondition.php similarity index 100% rename from BumbleDocGen/Core/Parser/FilterCondition/CommonFilterCondition/LocatedInCondition.php rename to src/Core/Parser/FilterCondition/CommonFilterCondition/LocatedInCondition.php diff --git a/BumbleDocGen/Core/Parser/FilterCondition/CommonFilterCondition/TrueCondition.php b/src/Core/Parser/FilterCondition/CommonFilterCondition/TrueCondition.php similarity index 100% rename from BumbleDocGen/Core/Parser/FilterCondition/CommonFilterCondition/TrueCondition.php rename to src/Core/Parser/FilterCondition/CommonFilterCondition/TrueCondition.php diff --git a/BumbleDocGen/Core/Parser/FilterCondition/ConditionGroup.php b/src/Core/Parser/FilterCondition/ConditionGroup.php similarity index 100% rename from BumbleDocGen/Core/Parser/FilterCondition/ConditionGroup.php rename to src/Core/Parser/FilterCondition/ConditionGroup.php diff --git a/BumbleDocGen/Core/Parser/FilterCondition/ConditionGroupTypeEnum.php b/src/Core/Parser/FilterCondition/ConditionGroupTypeEnum.php similarity index 100% rename from BumbleDocGen/Core/Parser/FilterCondition/ConditionGroupTypeEnum.php rename to src/Core/Parser/FilterCondition/ConditionGroupTypeEnum.php diff --git a/BumbleDocGen/Core/Parser/FilterCondition/ConditionInterface.php b/src/Core/Parser/FilterCondition/ConditionInterface.php similarity index 100% rename from BumbleDocGen/Core/Parser/FilterCondition/ConditionInterface.php rename to src/Core/Parser/FilterCondition/ConditionInterface.php diff --git a/BumbleDocGen/Core/Parser/ProjectParser.php b/src/Core/Parser/ProjectParser.php similarity index 100% rename from BumbleDocGen/Core/Parser/ProjectParser.php rename to src/Core/Parser/ProjectParser.php diff --git a/BumbleDocGen/Core/Parser/SourceLocator/BaseSourceLocator.php b/src/Core/Parser/SourceLocator/BaseSourceLocator.php similarity index 100% rename from BumbleDocGen/Core/Parser/SourceLocator/BaseSourceLocator.php rename to src/Core/Parser/SourceLocator/BaseSourceLocator.php diff --git a/BumbleDocGen/Core/Parser/SourceLocator/DirectoriesSourceLocator.php b/src/Core/Parser/SourceLocator/DirectoriesSourceLocator.php similarity index 100% rename from BumbleDocGen/Core/Parser/SourceLocator/DirectoriesSourceLocator.php rename to src/Core/Parser/SourceLocator/DirectoriesSourceLocator.php diff --git a/BumbleDocGen/Core/Parser/SourceLocator/FileIteratorSourceLocator.php b/src/Core/Parser/SourceLocator/FileIteratorSourceLocator.php similarity index 100% rename from BumbleDocGen/Core/Parser/SourceLocator/FileIteratorSourceLocator.php rename to src/Core/Parser/SourceLocator/FileIteratorSourceLocator.php diff --git a/BumbleDocGen/Core/Parser/SourceLocator/RecursiveDirectoriesSourceLocator.php b/src/Core/Parser/SourceLocator/RecursiveDirectoriesSourceLocator.php similarity index 100% rename from BumbleDocGen/Core/Parser/SourceLocator/RecursiveDirectoriesSourceLocator.php rename to src/Core/Parser/SourceLocator/RecursiveDirectoriesSourceLocator.php diff --git a/BumbleDocGen/Core/Parser/SourceLocator/SingleFileSourceLocator.php b/src/Core/Parser/SourceLocator/SingleFileSourceLocator.php similarity index 100% rename from BumbleDocGen/Core/Parser/SourceLocator/SingleFileSourceLocator.php rename to src/Core/Parser/SourceLocator/SingleFileSourceLocator.php diff --git a/BumbleDocGen/Core/Parser/SourceLocator/SourceLocatorInterface.php b/src/Core/Parser/SourceLocator/SourceLocatorInterface.php similarity index 100% rename from BumbleDocGen/Core/Parser/SourceLocator/SourceLocatorInterface.php rename to src/Core/Parser/SourceLocator/SourceLocatorInterface.php diff --git a/BumbleDocGen/Core/Parser/SourceLocator/SourceLocatorsCollection.php b/src/Core/Parser/SourceLocator/SourceLocatorsCollection.php similarity index 100% rename from BumbleDocGen/Core/Parser/SourceLocator/SourceLocatorsCollection.php rename to src/Core/Parser/SourceLocator/SourceLocatorsCollection.php diff --git a/BumbleDocGen/Core/Plugin/CorePlugin/LastPageCommitter/LastPageCommitter.php b/src/Core/Plugin/CorePlugin/LastPageCommitter/LastPageCommitter.php similarity index 96% rename from BumbleDocGen/Core/Plugin/CorePlugin/LastPageCommitter/LastPageCommitter.php rename to src/Core/Plugin/CorePlugin/LastPageCommitter/LastPageCommitter.php index 840c41bc..a39b2ba6 100644 --- a/BumbleDocGen/Core/Plugin/CorePlugin/LastPageCommitter/LastPageCommitter.php +++ b/src/Core/Plugin/CorePlugin/LastPageCommitter/LastPageCommitter.php @@ -46,7 +46,7 @@ final public function beforeCreatingDocFile(BeforeCreatingDocFile $event): void $author = str_replace('Author:', 'Last page committer:', htmlspecialchars($output[1])); $date = str_replace('Date:', 'Last modified date:', $output[2]); $contentRegenerationDate = 'Page content update date: ' . date('D M d Y'); - $content .= "\n\n\n\n{$author}{$date}{$contentRegenerationDate}Made with Bumble Documentation Generator"; + $content .= "\n\n\n\n{$author}{$date}{$contentRegenerationDate}Made with Bumble Documentation Generator"; } $event->setContent($content); } diff --git a/BumbleDocGen/Core/Plugin/CorePlugin/PageLinker/BasePageLinker.php b/src/Core/Plugin/CorePlugin/PageLinker/BasePageLinker.php similarity index 100% rename from BumbleDocGen/Core/Plugin/CorePlugin/PageLinker/BasePageLinker.php rename to src/Core/Plugin/CorePlugin/PageLinker/BasePageLinker.php diff --git a/BumbleDocGen/Core/Plugin/CorePlugin/PageLinker/PageHtmlLinkerPlugin.php b/src/Core/Plugin/CorePlugin/PageLinker/PageHtmlLinkerPlugin.php similarity index 100% rename from BumbleDocGen/Core/Plugin/CorePlugin/PageLinker/PageHtmlLinkerPlugin.php rename to src/Core/Plugin/CorePlugin/PageLinker/PageHtmlLinkerPlugin.php diff --git a/BumbleDocGen/Core/Plugin/CorePlugin/PageLinker/PageRstLinkerPlugin.php b/src/Core/Plugin/CorePlugin/PageLinker/PageRstLinkerPlugin.php similarity index 100% rename from BumbleDocGen/Core/Plugin/CorePlugin/PageLinker/PageRstLinkerPlugin.php rename to src/Core/Plugin/CorePlugin/PageLinker/PageRstLinkerPlugin.php diff --git a/BumbleDocGen/Core/Plugin/Event/Parser/OnLoadSourceLocatorsCollection.php b/src/Core/Plugin/Event/Parser/OnLoadSourceLocatorsCollection.php similarity index 100% rename from BumbleDocGen/Core/Plugin/Event/Parser/OnLoadSourceLocatorsCollection.php rename to src/Core/Plugin/Event/Parser/OnLoadSourceLocatorsCollection.php diff --git a/BumbleDocGen/Core/Plugin/Event/Renderer/BeforeCreatingDocFile.php b/src/Core/Plugin/Event/Renderer/BeforeCreatingDocFile.php similarity index 100% rename from BumbleDocGen/Core/Plugin/Event/Renderer/BeforeCreatingDocFile.php rename to src/Core/Plugin/Event/Renderer/BeforeCreatingDocFile.php diff --git a/BumbleDocGen/Core/Plugin/Event/Renderer/OnGettingResourceLink.php b/src/Core/Plugin/Event/Renderer/OnGettingResourceLink.php similarity index 100% rename from BumbleDocGen/Core/Plugin/Event/Renderer/OnGettingResourceLink.php rename to src/Core/Plugin/Event/Renderer/OnGettingResourceLink.php diff --git a/BumbleDocGen/Core/Plugin/Event/Renderer/OnLoadEntityDocPluginContent.php b/src/Core/Plugin/Event/Renderer/OnLoadEntityDocPluginContent.php similarity index 100% rename from BumbleDocGen/Core/Plugin/Event/Renderer/OnLoadEntityDocPluginContent.php rename to src/Core/Plugin/Event/Renderer/OnLoadEntityDocPluginContent.php diff --git a/BumbleDocGen/Core/Plugin/OnlySingleExecutionEvent.php b/src/Core/Plugin/OnlySingleExecutionEvent.php similarity index 100% rename from BumbleDocGen/Core/Plugin/OnlySingleExecutionEvent.php rename to src/Core/Plugin/OnlySingleExecutionEvent.php diff --git a/BumbleDocGen/Core/Plugin/PluginEventDispatcher.php b/src/Core/Plugin/PluginEventDispatcher.php similarity index 100% rename from BumbleDocGen/Core/Plugin/PluginEventDispatcher.php rename to src/Core/Plugin/PluginEventDispatcher.php diff --git a/BumbleDocGen/Core/Plugin/PluginInterface.php b/src/Core/Plugin/PluginInterface.php similarity index 100% rename from BumbleDocGen/Core/Plugin/PluginInterface.php rename to src/Core/Plugin/PluginInterface.php diff --git a/BumbleDocGen/Core/Plugin/PluginsCollection.php b/src/Core/Plugin/PluginsCollection.php similarity index 100% rename from BumbleDocGen/Core/Plugin/PluginsCollection.php rename to src/Core/Plugin/PluginsCollection.php diff --git a/BumbleDocGen/Core/Renderer/Breadcrumbs/BreadcrumbsHelper.php b/src/Core/Renderer/Breadcrumbs/BreadcrumbsHelper.php similarity index 99% rename from BumbleDocGen/Core/Renderer/Breadcrumbs/BreadcrumbsHelper.php rename to src/Core/Renderer/Breadcrumbs/BreadcrumbsHelper.php index 8a197d6d..aa43054b 100644 --- a/BumbleDocGen/Core/Renderer/Breadcrumbs/BreadcrumbsHelper.php +++ b/src/Core/Renderer/Breadcrumbs/BreadcrumbsHelper.php @@ -23,7 +23,7 @@ final class BreadcrumbsHelper /** * The name template of the file that will be the entry point when switching between pages */ - public const DEFAULT_PREV_PAGE_NAME_TEMPLATE = '/^((readme|index)\.(rst|md)\.twig)/'; + public const DEFAULT_PREV_PAGE_NAME_TEMPLATE = '/^((readme|index)\.(rst|md)\.twig)/i'; private array $keyUsageCount = []; diff --git a/BumbleDocGen/Core/Renderer/Breadcrumbs/BreadcrumbsTwigEnvironment.php b/src/Core/Renderer/Breadcrumbs/BreadcrumbsTwigEnvironment.php similarity index 100% rename from BumbleDocGen/Core/Renderer/Breadcrumbs/BreadcrumbsTwigEnvironment.php rename to src/Core/Renderer/Breadcrumbs/BreadcrumbsTwigEnvironment.php diff --git a/BumbleDocGen/Core/Renderer/Breadcrumbs/templates/breadcrumbs.html.twig b/src/Core/Renderer/Breadcrumbs/templates/breadcrumbs.html.twig similarity index 100% rename from BumbleDocGen/Core/Renderer/Breadcrumbs/templates/breadcrumbs.html.twig rename to src/Core/Renderer/Breadcrumbs/templates/breadcrumbs.html.twig diff --git a/BumbleDocGen/Core/Renderer/Context/Dependency/DirectoryDependency.php b/src/Core/Renderer/Context/Dependency/DirectoryDependency.php similarity index 100% rename from BumbleDocGen/Core/Renderer/Context/Dependency/DirectoryDependency.php rename to src/Core/Renderer/Context/Dependency/DirectoryDependency.php diff --git a/BumbleDocGen/Core/Renderer/Context/Dependency/FileDependency.php b/src/Core/Renderer/Context/Dependency/FileDependency.php similarity index 100% rename from BumbleDocGen/Core/Renderer/Context/Dependency/FileDependency.php rename to src/Core/Renderer/Context/Dependency/FileDependency.php diff --git a/BumbleDocGen/Core/Renderer/Context/Dependency/RendererDependencyFactory.php b/src/Core/Renderer/Context/Dependency/RendererDependencyFactory.php similarity index 100% rename from BumbleDocGen/Core/Renderer/Context/Dependency/RendererDependencyFactory.php rename to src/Core/Renderer/Context/Dependency/RendererDependencyFactory.php diff --git a/BumbleDocGen/Core/Renderer/Context/Dependency/RendererDependencyInterface.php b/src/Core/Renderer/Context/Dependency/RendererDependencyInterface.php similarity index 100% rename from BumbleDocGen/Core/Renderer/Context/Dependency/RendererDependencyInterface.php rename to src/Core/Renderer/Context/Dependency/RendererDependencyInterface.php diff --git a/BumbleDocGen/Core/Renderer/Context/DocumentTransformableEntityInterface.php b/src/Core/Renderer/Context/DocumentTransformableEntityInterface.php similarity index 100% rename from BumbleDocGen/Core/Renderer/Context/DocumentTransformableEntityInterface.php rename to src/Core/Renderer/Context/DocumentTransformableEntityInterface.php diff --git a/BumbleDocGen/Core/Renderer/Context/DocumentedEntityWrapper.php b/src/Core/Renderer/Context/DocumentedEntityWrapper.php similarity index 100% rename from BumbleDocGen/Core/Renderer/Context/DocumentedEntityWrapper.php rename to src/Core/Renderer/Context/DocumentedEntityWrapper.php diff --git a/BumbleDocGen/Core/Renderer/Context/DocumentedEntityWrappersCollection.php b/src/Core/Renderer/Context/DocumentedEntityWrappersCollection.php similarity index 100% rename from BumbleDocGen/Core/Renderer/Context/DocumentedEntityWrappersCollection.php rename to src/Core/Renderer/Context/DocumentedEntityWrappersCollection.php diff --git a/BumbleDocGen/Core/Renderer/Context/RendererContext.php b/src/Core/Renderer/Context/RendererContext.php similarity index 100% rename from BumbleDocGen/Core/Renderer/Context/RendererContext.php rename to src/Core/Renderer/Context/RendererContext.php diff --git a/BumbleDocGen/Core/Renderer/EntityDocRenderer/EntityDocRendererInterface.php b/src/Core/Renderer/EntityDocRenderer/EntityDocRendererInterface.php similarity index 100% rename from BumbleDocGen/Core/Renderer/EntityDocRenderer/EntityDocRendererInterface.php rename to src/Core/Renderer/EntityDocRenderer/EntityDocRendererInterface.php diff --git a/BumbleDocGen/Core/Renderer/EntityDocRenderer/EntityDocRenderersCollection.php b/src/Core/Renderer/EntityDocRenderer/EntityDocRenderersCollection.php similarity index 100% rename from BumbleDocGen/Core/Renderer/EntityDocRenderer/EntityDocRenderersCollection.php rename to src/Core/Renderer/EntityDocRenderer/EntityDocRenderersCollection.php diff --git a/BumbleDocGen/Core/Renderer/PageLinkProcessor/BasePageLinkProcessor.php b/src/Core/Renderer/PageLinkProcessor/BasePageLinkProcessor.php similarity index 100% rename from BumbleDocGen/Core/Renderer/PageLinkProcessor/BasePageLinkProcessor.php rename to src/Core/Renderer/PageLinkProcessor/BasePageLinkProcessor.php diff --git a/BumbleDocGen/Core/Renderer/PageLinkProcessor/GithubPagesLinkProcessor.php b/src/Core/Renderer/PageLinkProcessor/GithubPagesLinkProcessor.php similarity index 100% rename from BumbleDocGen/Core/Renderer/PageLinkProcessor/GithubPagesLinkProcessor.php rename to src/Core/Renderer/PageLinkProcessor/GithubPagesLinkProcessor.php diff --git a/BumbleDocGen/Core/Renderer/PageLinkProcessor/PageLinkProcessorInterface.php b/src/Core/Renderer/PageLinkProcessor/PageLinkProcessorInterface.php similarity index 100% rename from BumbleDocGen/Core/Renderer/PageLinkProcessor/PageLinkProcessorInterface.php rename to src/Core/Renderer/PageLinkProcessor/PageLinkProcessorInterface.php diff --git a/BumbleDocGen/Core/Renderer/Renderer.php b/src/Core/Renderer/Renderer.php similarity index 100% rename from BumbleDocGen/Core/Renderer/Renderer.php rename to src/Core/Renderer/Renderer.php diff --git a/BumbleDocGen/Core/Renderer/RendererHelper.php b/src/Core/Renderer/RendererHelper.php similarity index 100% rename from BumbleDocGen/Core/Renderer/RendererHelper.php rename to src/Core/Renderer/RendererHelper.php diff --git a/BumbleDocGen/Core/Renderer/RendererIteratorFactory.php b/src/Core/Renderer/RendererIteratorFactory.php similarity index 100% rename from BumbleDocGen/Core/Renderer/RendererIteratorFactory.php rename to src/Core/Renderer/RendererIteratorFactory.php diff --git a/BumbleDocGen/Core/Renderer/Twig/Filter/AddIndentFromLeft.php b/src/Core/Renderer/Twig/Filter/AddIndentFromLeft.php similarity index 100% rename from BumbleDocGen/Core/Renderer/Twig/Filter/AddIndentFromLeft.php rename to src/Core/Renderer/Twig/Filter/AddIndentFromLeft.php diff --git a/BumbleDocGen/Core/Renderer/Twig/Filter/CustomFilterInterface.php b/src/Core/Renderer/Twig/Filter/CustomFilterInterface.php similarity index 100% rename from BumbleDocGen/Core/Renderer/Twig/Filter/CustomFilterInterface.php rename to src/Core/Renderer/Twig/Filter/CustomFilterInterface.php diff --git a/BumbleDocGen/Core/Renderer/Twig/Filter/CustomFiltersCollection.php b/src/Core/Renderer/Twig/Filter/CustomFiltersCollection.php similarity index 100% rename from BumbleDocGen/Core/Renderer/Twig/Filter/CustomFiltersCollection.php rename to src/Core/Renderer/Twig/Filter/CustomFiltersCollection.php diff --git a/BumbleDocGen/Core/Renderer/Twig/Filter/FixStrSize.php b/src/Core/Renderer/Twig/Filter/FixStrSize.php similarity index 100% rename from BumbleDocGen/Core/Renderer/Twig/Filter/FixStrSize.php rename to src/Core/Renderer/Twig/Filter/FixStrSize.php diff --git a/BumbleDocGen/Core/Renderer/Twig/Filter/PregMatch.php b/src/Core/Renderer/Twig/Filter/PregMatch.php similarity index 100% rename from BumbleDocGen/Core/Renderer/Twig/Filter/PregMatch.php rename to src/Core/Renderer/Twig/Filter/PregMatch.php diff --git a/BumbleDocGen/Core/Renderer/Twig/Filter/PrepareSourceLink.php b/src/Core/Renderer/Twig/Filter/PrepareSourceLink.php similarity index 100% rename from BumbleDocGen/Core/Renderer/Twig/Filter/PrepareSourceLink.php rename to src/Core/Renderer/Twig/Filter/PrepareSourceLink.php diff --git a/BumbleDocGen/Core/Renderer/Twig/Filter/Quotemeta.php b/src/Core/Renderer/Twig/Filter/Quotemeta.php similarity index 100% rename from BumbleDocGen/Core/Renderer/Twig/Filter/Quotemeta.php rename to src/Core/Renderer/Twig/Filter/Quotemeta.php diff --git a/BumbleDocGen/Core/Renderer/Twig/Filter/RemoveLineBrakes.php b/src/Core/Renderer/Twig/Filter/RemoveLineBrakes.php similarity index 100% rename from BumbleDocGen/Core/Renderer/Twig/Filter/RemoveLineBrakes.php rename to src/Core/Renderer/Twig/Filter/RemoveLineBrakes.php diff --git a/BumbleDocGen/Core/Renderer/Twig/Filter/StrTypeToUrl.php b/src/Core/Renderer/Twig/Filter/StrTypeToUrl.php similarity index 93% rename from BumbleDocGen/Core/Renderer/Twig/Filter/StrTypeToUrl.php rename to src/Core/Renderer/Twig/Filter/StrTypeToUrl.php index aac42857..3764fe10 100644 --- a/BumbleDocGen/Core/Renderer/Twig/Filter/StrTypeToUrl.php +++ b/src/Core/Renderer/Twig/Filter/StrTypeToUrl.php @@ -81,7 +81,12 @@ public function __invoke( } else { $type = "\\{$entityOfLink->getName()}"; } - $preparedTypes[] = "{$type}"; + + if ($link && $link !== '#') { + $preparedTypes[] = "{$type}"; + } else { + $preparedTypes[] = $type; + } } } else { if ($entityOfLink::isEntityNameValid($type)) { diff --git a/BumbleDocGen/Core/Renderer/Twig/Filter/TextToCodeBlock.php b/src/Core/Renderer/Twig/Filter/TextToCodeBlock.php similarity index 100% rename from BumbleDocGen/Core/Renderer/Twig/Filter/TextToCodeBlock.php rename to src/Core/Renderer/Twig/Filter/TextToCodeBlock.php diff --git a/BumbleDocGen/Core/Renderer/Twig/Filter/TextToHeading.php b/src/Core/Renderer/Twig/Filter/TextToHeading.php similarity index 100% rename from BumbleDocGen/Core/Renderer/Twig/Filter/TextToHeading.php rename to src/Core/Renderer/Twig/Filter/TextToHeading.php diff --git a/BumbleDocGen/Core/Renderer/Twig/Function/CustomFunctionInterface.php b/src/Core/Renderer/Twig/Function/CustomFunctionInterface.php similarity index 100% rename from BumbleDocGen/Core/Renderer/Twig/Function/CustomFunctionInterface.php rename to src/Core/Renderer/Twig/Function/CustomFunctionInterface.php diff --git a/BumbleDocGen/Core/Renderer/Twig/Function/CustomFunctionsCollection.php b/src/Core/Renderer/Twig/Function/CustomFunctionsCollection.php similarity index 100% rename from BumbleDocGen/Core/Renderer/Twig/Function/CustomFunctionsCollection.php rename to src/Core/Renderer/Twig/Function/CustomFunctionsCollection.php diff --git a/BumbleDocGen/Core/Renderer/Twig/Function/DrawDocumentationMenu.php b/src/Core/Renderer/Twig/Function/DrawDocumentationMenu.php similarity index 100% rename from BumbleDocGen/Core/Renderer/Twig/Function/DrawDocumentationMenu.php rename to src/Core/Renderer/Twig/Function/DrawDocumentationMenu.php diff --git a/BumbleDocGen/Core/Renderer/Twig/Function/DrawDocumentedEntityLink.php b/src/Core/Renderer/Twig/Function/DrawDocumentedEntityLink.php similarity index 100% rename from BumbleDocGen/Core/Renderer/Twig/Function/DrawDocumentedEntityLink.php rename to src/Core/Renderer/Twig/Function/DrawDocumentedEntityLink.php diff --git a/BumbleDocGen/Core/Renderer/Twig/Function/FileGetContents.php b/src/Core/Renderer/Twig/Function/FileGetContents.php similarity index 100% rename from BumbleDocGen/Core/Renderer/Twig/Function/FileGetContents.php rename to src/Core/Renderer/Twig/Function/FileGetContents.php diff --git a/BumbleDocGen/Core/Renderer/Twig/Function/GeneratePageBreadcrumbs.php b/src/Core/Renderer/Twig/Function/GeneratePageBreadcrumbs.php similarity index 100% rename from BumbleDocGen/Core/Renderer/Twig/Function/GeneratePageBreadcrumbs.php rename to src/Core/Renderer/Twig/Function/GeneratePageBreadcrumbs.php diff --git a/BumbleDocGen/Core/Renderer/Twig/Function/GetDocumentationPageUrl.php b/src/Core/Renderer/Twig/Function/GetDocumentationPageUrl.php similarity index 100% rename from BumbleDocGen/Core/Renderer/Twig/Function/GetDocumentationPageUrl.php rename to src/Core/Renderer/Twig/Function/GetDocumentationPageUrl.php diff --git a/BumbleDocGen/Core/Renderer/Twig/Function/GetDocumentedEntityUrl.php b/src/Core/Renderer/Twig/Function/GetDocumentedEntityUrl.php similarity index 100% rename from BumbleDocGen/Core/Renderer/Twig/Function/GetDocumentedEntityUrl.php rename to src/Core/Renderer/Twig/Function/GetDocumentedEntityUrl.php diff --git a/BumbleDocGen/Core/Renderer/Twig/Function/LoadPluginsContent.php b/src/Core/Renderer/Twig/Function/LoadPluginsContent.php similarity index 100% rename from BumbleDocGen/Core/Renderer/Twig/Function/LoadPluginsContent.php rename to src/Core/Renderer/Twig/Function/LoadPluginsContent.php diff --git a/BumbleDocGen/Core/Renderer/Twig/Function/PrintEntityCollectionAsList.php b/src/Core/Renderer/Twig/Function/PrintEntityCollectionAsList.php similarity index 100% rename from BumbleDocGen/Core/Renderer/Twig/Function/PrintEntityCollectionAsList.php rename to src/Core/Renderer/Twig/Function/PrintEntityCollectionAsList.php diff --git a/BumbleDocGen/Core/Renderer/Twig/MainExtension.php b/src/Core/Renderer/Twig/MainExtension.php similarity index 100% rename from BumbleDocGen/Core/Renderer/Twig/MainExtension.php rename to src/Core/Renderer/Twig/MainExtension.php diff --git a/BumbleDocGen/Core/Renderer/Twig/MainTwigEnvironment.php b/src/Core/Renderer/Twig/MainTwigEnvironment.php similarity index 100% rename from BumbleDocGen/Core/Renderer/Twig/MainTwigEnvironment.php rename to src/Core/Renderer/Twig/MainTwigEnvironment.php diff --git a/BumbleDocGen/Core/utils.php b/src/Core/utils.php similarity index 100% rename from BumbleDocGen/Core/utils.php rename to src/Core/utils.php diff --git a/BumbleDocGen/DocGenerator.php b/src/DocGenerator.php similarity index 100% rename from BumbleDocGen/DocGenerator.php rename to src/DocGenerator.php diff --git a/BumbleDocGen/DocGeneratorFactory.php b/src/DocGeneratorFactory.php similarity index 95% rename from BumbleDocGen/DocGeneratorFactory.php rename to src/DocGeneratorFactory.php index b89357c8..5118cb4c 100644 --- a/BumbleDocGen/DocGeneratorFactory.php +++ b/src/DocGeneratorFactory.php @@ -34,7 +34,7 @@ public function setCustomConfigurationParameters(array $customConfigurationParam * @throws NotFoundException * @throws \Exception */ - public function create(string ...$configurationFiles): DocGenerator + public function create(?string ...$configurationFiles): DocGenerator { $diContainer = $this->containerBuilder->build(); $logger = $diContainer->get(LoggerInterface::class); diff --git a/BumbleDocGen/LanguageHandler/LanguageHandlerInterface.php b/src/LanguageHandler/LanguageHandlerInterface.php similarity index 100% rename from BumbleDocGen/LanguageHandler/LanguageHandlerInterface.php rename to src/LanguageHandler/LanguageHandlerInterface.php diff --git a/BumbleDocGen/LanguageHandler/LanguageHandlersCollection.php b/src/LanguageHandler/LanguageHandlersCollection.php similarity index 100% rename from BumbleDocGen/LanguageHandler/LanguageHandlersCollection.php rename to src/LanguageHandler/LanguageHandlersCollection.php diff --git a/BumbleDocGen/LanguageHandler/Php/Parser/Entity/BaseEntity.php b/src/LanguageHandler/Php/Parser/Entity/BaseEntity.php similarity index 100% rename from BumbleDocGen/LanguageHandler/Php/Parser/Entity/BaseEntity.php rename to src/LanguageHandler/Php/Parser/Entity/BaseEntity.php diff --git a/BumbleDocGen/LanguageHandler/Php/Parser/Entity/Cache/CacheablePhpEntityFactory.php b/src/LanguageHandler/Php/Parser/Entity/Cache/CacheablePhpEntityFactory.php similarity index 100% rename from BumbleDocGen/LanguageHandler/Php/Parser/Entity/Cache/CacheablePhpEntityFactory.php rename to src/LanguageHandler/Php/Parser/Entity/Cache/CacheablePhpEntityFactory.php diff --git a/BumbleDocGen/LanguageHandler/Php/Parser/Entity/ClassEntity.php b/src/LanguageHandler/Php/Parser/Entity/ClassEntity.php similarity index 100% rename from BumbleDocGen/LanguageHandler/Php/Parser/Entity/ClassEntity.php rename to src/LanguageHandler/Php/Parser/Entity/ClassEntity.php diff --git a/BumbleDocGen/LanguageHandler/Php/Parser/Entity/ClassEntityCollection.php b/src/LanguageHandler/Php/Parser/Entity/ClassEntityCollection.php similarity index 96% rename from BumbleDocGen/LanguageHandler/Php/Parser/Entity/ClassEntityCollection.php rename to src/LanguageHandler/Php/Parser/Entity/ClassEntityCollection.php index 7f114eeb..46e6da0a 100644 --- a/BumbleDocGen/LanguageHandler/Php/Parser/Entity/ClassEntityCollection.php +++ b/src/LanguageHandler/Php/Parser/Entity/ClassEntityCollection.php @@ -294,13 +294,13 @@ public function getOnlyInterfaces(): ClassEntityCollection * * @example * $classEntityCollection->findEntity('App'); // class name - * $classEntityCollection->findEntity('SelfDoc\Console\App'); // class with namespace - * $classEntityCollection->findEntity('\SelfDoc\Console\App'); // class with namespace - * $classEntityCollection->findEntity('\SelfDoc\Console\App::test()'); // class with namespace and optional part + * $classEntityCollection->findEntity('BumbleDocGen\Console\App'); // class with namespace + * $classEntityCollection->findEntity('\BumbleDocGen\Console\App'); // class with namespace + * $classEntityCollection->findEntity('\BumbleDocGen\Console\App::test()'); // class with namespace and optional part * $classEntityCollection->findEntity('App.php'); // filename - * $classEntityCollection->findEntity('/SelfDoc/Console/App.php'); // relative path - * $classEntityCollection->findEntity('/Users/someuser/Desktop/projects/bumble-doc-gen/SelfDoc/Console/App.php'); // absolute path - * $classEntityCollection->findEntity('https://github.com/bumble-tech/bumble-doc-gen/blob/master/SelfDoc/Console/App.php'); // source link + * $classEntityCollection->findEntity('/BumbleDocGen/Console/App.php'); // relative path + * $classEntityCollection->findEntity('/Users/someuser/Desktop/projects/bumble-doc-gen/BumbleDocGen/Console/App.php'); // absolute path + * $classEntityCollection->findEntity('https://github.com/bumble-tech/bumble-doc-gen/blob/master/BumbleDocGen/Console/App.php'); // source link */ public function internalFindEntity(string $search, bool $useUnsafeKeys = true): ?ClassEntity { diff --git a/BumbleDocGen/LanguageHandler/Php/Parser/Entity/ConstantEntity.php b/src/LanguageHandler/Php/Parser/Entity/ConstantEntity.php similarity index 100% rename from BumbleDocGen/LanguageHandler/Php/Parser/Entity/ConstantEntity.php rename to src/LanguageHandler/Php/Parser/Entity/ConstantEntity.php diff --git a/BumbleDocGen/LanguageHandler/Php/Parser/Entity/ConstantEntityCollection.php b/src/LanguageHandler/Php/Parser/Entity/ConstantEntityCollection.php similarity index 100% rename from BumbleDocGen/LanguageHandler/Php/Parser/Entity/ConstantEntityCollection.php rename to src/LanguageHandler/Php/Parser/Entity/ConstantEntityCollection.php diff --git a/BumbleDocGen/LanguageHandler/Php/Parser/Entity/DynamicMethodEntity.php b/src/LanguageHandler/Php/Parser/Entity/DynamicMethodEntity.php similarity index 100% rename from BumbleDocGen/LanguageHandler/Php/Parser/Entity/DynamicMethodEntity.php rename to src/LanguageHandler/Php/Parser/Entity/DynamicMethodEntity.php diff --git a/BumbleDocGen/LanguageHandler/Php/Parser/Entity/Exception/ReflectionException.php b/src/LanguageHandler/Php/Parser/Entity/Exception/ReflectionException.php similarity index 100% rename from BumbleDocGen/LanguageHandler/Php/Parser/Entity/Exception/ReflectionException.php rename to src/LanguageHandler/Php/Parser/Entity/Exception/ReflectionException.php diff --git a/BumbleDocGen/LanguageHandler/Php/Parser/Entity/MethodEntity.php b/src/LanguageHandler/Php/Parser/Entity/MethodEntity.php similarity index 98% rename from BumbleDocGen/LanguageHandler/Php/Parser/Entity/MethodEntity.php rename to src/LanguageHandler/Php/Parser/Entity/MethodEntity.php index b250d0ed..aaca99ab 100644 --- a/BumbleDocGen/LanguageHandler/Php/Parser/Entity/MethodEntity.php +++ b/src/LanguageHandler/Php/Parser/Entity/MethodEntity.php @@ -20,6 +20,7 @@ use Psr\Log\LoggerInterface; use Roave\BetterReflection\Reflection\ReflectionClass; use Roave\BetterReflection\Reflection\ReflectionMethod; +use Symfony\Component\Console\Style\OutputStyle; /** * Class method entity @@ -400,6 +401,7 @@ private function isArrayAnnotationType(string $annotationType): bool $parameters[] = [ 'type' => $this->prepareTypeString($type), 'expectedType' => $expectedType, + 'isVariadic' => $param->isVariadic(), 'name' => $name, 'defaultValue' => $this->prepareTypeString($defaultValue), 'description' => $description, @@ -418,7 +420,8 @@ public function getParametersString(): string { $parameters = []; foreach ($this->getParameters() as $parameterData) { - $parameters[] = "{$parameterData['type']} \${$parameterData['name']}" . + $variadicPart = ($parameterData['isVariadic'] ?? false) ? '...' : ''; + $parameters[] = "{$parameterData['type']} {$variadicPart}\${$parameterData['name']}" . ($parameterData['defaultValue'] ? " = {$parameterData['defaultValue']}" : ''); } return implode(', ', $parameters); diff --git a/BumbleDocGen/LanguageHandler/Php/Parser/Entity/MethodEntityCollection.php b/src/LanguageHandler/Php/Parser/Entity/MethodEntityCollection.php similarity index 100% rename from BumbleDocGen/LanguageHandler/Php/Parser/Entity/MethodEntityCollection.php rename to src/LanguageHandler/Php/Parser/Entity/MethodEntityCollection.php diff --git a/BumbleDocGen/LanguageHandler/Php/Parser/Entity/MethodEntityInterface.php b/src/LanguageHandler/Php/Parser/Entity/MethodEntityInterface.php similarity index 100% rename from BumbleDocGen/LanguageHandler/Php/Parser/Entity/MethodEntityInterface.php rename to src/LanguageHandler/Php/Parser/Entity/MethodEntityInterface.php diff --git a/BumbleDocGen/LanguageHandler/Php/Parser/Entity/PropertyEntity.php b/src/LanguageHandler/Php/Parser/Entity/PropertyEntity.php similarity index 100% rename from BumbleDocGen/LanguageHandler/Php/Parser/Entity/PropertyEntity.php rename to src/LanguageHandler/Php/Parser/Entity/PropertyEntity.php diff --git a/BumbleDocGen/LanguageHandler/Php/Parser/Entity/PropertyEntityCollection.php b/src/LanguageHandler/Php/Parser/Entity/PropertyEntityCollection.php similarity index 100% rename from BumbleDocGen/LanguageHandler/Php/Parser/Entity/PropertyEntityCollection.php rename to src/LanguageHandler/Php/Parser/Entity/PropertyEntityCollection.php diff --git a/BumbleDocGen/LanguageHandler/Php/Parser/Entity/Reflection/ReflectorWrapper.php b/src/LanguageHandler/Php/Parser/Entity/Reflection/ReflectorWrapper.php similarity index 100% rename from BumbleDocGen/LanguageHandler/Php/Parser/Entity/Reflection/ReflectorWrapper.php rename to src/LanguageHandler/Php/Parser/Entity/Reflection/ReflectorWrapper.php diff --git a/BumbleDocGen/LanguageHandler/Php/Parser/FilterCondition/ClassConstantFilterCondition/IsPrivateCondition.php b/src/LanguageHandler/Php/Parser/FilterCondition/ClassConstantFilterCondition/IsPrivateCondition.php similarity index 100% rename from BumbleDocGen/LanguageHandler/Php/Parser/FilterCondition/ClassConstantFilterCondition/IsPrivateCondition.php rename to src/LanguageHandler/Php/Parser/FilterCondition/ClassConstantFilterCondition/IsPrivateCondition.php diff --git a/BumbleDocGen/LanguageHandler/Php/Parser/FilterCondition/ClassConstantFilterCondition/IsProtectedCondition.php b/src/LanguageHandler/Php/Parser/FilterCondition/ClassConstantFilterCondition/IsProtectedCondition.php similarity index 100% rename from BumbleDocGen/LanguageHandler/Php/Parser/FilterCondition/ClassConstantFilterCondition/IsProtectedCondition.php rename to src/LanguageHandler/Php/Parser/FilterCondition/ClassConstantFilterCondition/IsProtectedCondition.php diff --git a/BumbleDocGen/LanguageHandler/Php/Parser/FilterCondition/ClassConstantFilterCondition/IsPublicCondition.php b/src/LanguageHandler/Php/Parser/FilterCondition/ClassConstantFilterCondition/IsPublicCondition.php similarity index 100% rename from BumbleDocGen/LanguageHandler/Php/Parser/FilterCondition/ClassConstantFilterCondition/IsPublicCondition.php rename to src/LanguageHandler/Php/Parser/FilterCondition/ClassConstantFilterCondition/IsPublicCondition.php diff --git a/BumbleDocGen/LanguageHandler/Php/Parser/FilterCondition/ClassConstantFilterCondition/VisibilityCondition.php b/src/LanguageHandler/Php/Parser/FilterCondition/ClassConstantFilterCondition/VisibilityCondition.php similarity index 100% rename from BumbleDocGen/LanguageHandler/Php/Parser/FilterCondition/ClassConstantFilterCondition/VisibilityCondition.php rename to src/LanguageHandler/Php/Parser/FilterCondition/ClassConstantFilterCondition/VisibilityCondition.php diff --git a/BumbleDocGen/LanguageHandler/Php/Parser/FilterCondition/ClassFilterCondition/VisibilityConditionModifier.php b/src/LanguageHandler/Php/Parser/FilterCondition/ClassFilterCondition/VisibilityConditionModifier.php similarity index 100% rename from BumbleDocGen/LanguageHandler/Php/Parser/FilterCondition/ClassFilterCondition/VisibilityConditionModifier.php rename to src/LanguageHandler/Php/Parser/FilterCondition/ClassFilterCondition/VisibilityConditionModifier.php diff --git a/BumbleDocGen/LanguageHandler/Php/Parser/FilterCondition/MethodFilterCondition/IsPrivateCondition.php b/src/LanguageHandler/Php/Parser/FilterCondition/MethodFilterCondition/IsPrivateCondition.php similarity index 100% rename from BumbleDocGen/LanguageHandler/Php/Parser/FilterCondition/MethodFilterCondition/IsPrivateCondition.php rename to src/LanguageHandler/Php/Parser/FilterCondition/MethodFilterCondition/IsPrivateCondition.php diff --git a/BumbleDocGen/LanguageHandler/Php/Parser/FilterCondition/MethodFilterCondition/IsProtectedCondition.php b/src/LanguageHandler/Php/Parser/FilterCondition/MethodFilterCondition/IsProtectedCondition.php similarity index 100% rename from BumbleDocGen/LanguageHandler/Php/Parser/FilterCondition/MethodFilterCondition/IsProtectedCondition.php rename to src/LanguageHandler/Php/Parser/FilterCondition/MethodFilterCondition/IsProtectedCondition.php diff --git a/BumbleDocGen/LanguageHandler/Php/Parser/FilterCondition/MethodFilterCondition/IsPublicCondition.php b/src/LanguageHandler/Php/Parser/FilterCondition/MethodFilterCondition/IsPublicCondition.php similarity index 100% rename from BumbleDocGen/LanguageHandler/Php/Parser/FilterCondition/MethodFilterCondition/IsPublicCondition.php rename to src/LanguageHandler/Php/Parser/FilterCondition/MethodFilterCondition/IsPublicCondition.php diff --git a/BumbleDocGen/LanguageHandler/Php/Parser/FilterCondition/MethodFilterCondition/OnlyFromCurrentClassCondition.php b/src/LanguageHandler/Php/Parser/FilterCondition/MethodFilterCondition/OnlyFromCurrentClassCondition.php similarity index 100% rename from BumbleDocGen/LanguageHandler/Php/Parser/FilterCondition/MethodFilterCondition/OnlyFromCurrentClassCondition.php rename to src/LanguageHandler/Php/Parser/FilterCondition/MethodFilterCondition/OnlyFromCurrentClassCondition.php diff --git a/BumbleDocGen/LanguageHandler/Php/Parser/FilterCondition/MethodFilterCondition/VisibilityCondition.php b/src/LanguageHandler/Php/Parser/FilterCondition/MethodFilterCondition/VisibilityCondition.php similarity index 100% rename from BumbleDocGen/LanguageHandler/Php/Parser/FilterCondition/MethodFilterCondition/VisibilityCondition.php rename to src/LanguageHandler/Php/Parser/FilterCondition/MethodFilterCondition/VisibilityCondition.php diff --git a/BumbleDocGen/LanguageHandler/Php/Parser/FilterCondition/PropertyFilterCondition/IsPrivateCondition.php b/src/LanguageHandler/Php/Parser/FilterCondition/PropertyFilterCondition/IsPrivateCondition.php similarity index 100% rename from BumbleDocGen/LanguageHandler/Php/Parser/FilterCondition/PropertyFilterCondition/IsPrivateCondition.php rename to src/LanguageHandler/Php/Parser/FilterCondition/PropertyFilterCondition/IsPrivateCondition.php diff --git a/BumbleDocGen/LanguageHandler/Php/Parser/FilterCondition/PropertyFilterCondition/IsProtectedCondition.php b/src/LanguageHandler/Php/Parser/FilterCondition/PropertyFilterCondition/IsProtectedCondition.php similarity index 100% rename from BumbleDocGen/LanguageHandler/Php/Parser/FilterCondition/PropertyFilterCondition/IsProtectedCondition.php rename to src/LanguageHandler/Php/Parser/FilterCondition/PropertyFilterCondition/IsProtectedCondition.php diff --git a/BumbleDocGen/LanguageHandler/Php/Parser/FilterCondition/PropertyFilterCondition/IsPublicCondition.php b/src/LanguageHandler/Php/Parser/FilterCondition/PropertyFilterCondition/IsPublicCondition.php similarity index 100% rename from BumbleDocGen/LanguageHandler/Php/Parser/FilterCondition/PropertyFilterCondition/IsPublicCondition.php rename to src/LanguageHandler/Php/Parser/FilterCondition/PropertyFilterCondition/IsPublicCondition.php diff --git a/BumbleDocGen/LanguageHandler/Php/Parser/FilterCondition/PropertyFilterCondition/OnlyFromCurrentClassCondition.php b/src/LanguageHandler/Php/Parser/FilterCondition/PropertyFilterCondition/OnlyFromCurrentClassCondition.php similarity index 100% rename from BumbleDocGen/LanguageHandler/Php/Parser/FilterCondition/PropertyFilterCondition/OnlyFromCurrentClassCondition.php rename to src/LanguageHandler/Php/Parser/FilterCondition/PropertyFilterCondition/OnlyFromCurrentClassCondition.php diff --git a/BumbleDocGen/LanguageHandler/Php/Parser/FilterCondition/PropertyFilterCondition/VisibilityCondition.php b/src/LanguageHandler/Php/Parser/FilterCondition/PropertyFilterCondition/VisibilityCondition.php similarity index 100% rename from BumbleDocGen/LanguageHandler/Php/Parser/FilterCondition/PropertyFilterCondition/VisibilityCondition.php rename to src/LanguageHandler/Php/Parser/FilterCondition/PropertyFilterCondition/VisibilityCondition.php diff --git a/BumbleDocGen/LanguageHandler/Php/Parser/ParserHelper.php b/src/LanguageHandler/Php/Parser/ParserHelper.php similarity index 100% rename from BumbleDocGen/LanguageHandler/Php/Parser/ParserHelper.php rename to src/LanguageHandler/Php/Parser/ParserHelper.php diff --git a/BumbleDocGen/LanguageHandler/Php/Parser/SourceLocator/AsyncSourceLocator.php b/src/LanguageHandler/Php/Parser/SourceLocator/AsyncSourceLocator.php similarity index 100% rename from BumbleDocGen/LanguageHandler/Php/Parser/SourceLocator/AsyncSourceLocator.php rename to src/LanguageHandler/Php/Parser/SourceLocator/AsyncSourceLocator.php diff --git a/BumbleDocGen/LanguageHandler/Php/Parser/SourceLocator/CustomSourceLocatorInterface.php b/src/LanguageHandler/Php/Parser/SourceLocator/CustomSourceLocatorInterface.php similarity index 100% rename from BumbleDocGen/LanguageHandler/Php/Parser/SourceLocator/CustomSourceLocatorInterface.php rename to src/LanguageHandler/Php/Parser/SourceLocator/CustomSourceLocatorInterface.php diff --git a/BumbleDocGen/LanguageHandler/Php/Parser/SourceLocator/Internal/CachedSourceLocator.php b/src/LanguageHandler/Php/Parser/SourceLocator/Internal/CachedSourceLocator.php similarity index 100% rename from BumbleDocGen/LanguageHandler/Php/Parser/SourceLocator/Internal/CachedSourceLocator.php rename to src/LanguageHandler/Php/Parser/SourceLocator/Internal/CachedSourceLocator.php diff --git a/BumbleDocGen/LanguageHandler/Php/Parser/SourceLocator/Internal/SystemAsyncSourceLocator.php b/src/LanguageHandler/Php/Parser/SourceLocator/Internal/SystemAsyncSourceLocator.php similarity index 100% rename from BumbleDocGen/LanguageHandler/Php/Parser/SourceLocator/Internal/SystemAsyncSourceLocator.php rename to src/LanguageHandler/Php/Parser/SourceLocator/Internal/SystemAsyncSourceLocator.php diff --git a/BumbleDocGen/LanguageHandler/Php/PhpHandler.php b/src/LanguageHandler/Php/PhpHandler.php similarity index 100% rename from BumbleDocGen/LanguageHandler/Php/PhpHandler.php rename to src/LanguageHandler/Php/PhpHandler.php diff --git a/BumbleDocGen/LanguageHandler/Php/PhpHandlerSettings.php b/src/LanguageHandler/Php/PhpHandlerSettings.php similarity index 100% rename from BumbleDocGen/LanguageHandler/Php/PhpHandlerSettings.php rename to src/LanguageHandler/Php/PhpHandlerSettings.php diff --git a/BumbleDocGen/LanguageHandler/Php/Plugin/CorePlugin/BasePhpStubber/BasePhpStubberPlugin.php b/src/LanguageHandler/Php/Plugin/CorePlugin/BasePhpStubber/BasePhpStubberPlugin.php similarity index 100% rename from BumbleDocGen/LanguageHandler/Php/Plugin/CorePlugin/BasePhpStubber/BasePhpStubberPlugin.php rename to src/LanguageHandler/Php/Plugin/CorePlugin/BasePhpStubber/BasePhpStubberPlugin.php diff --git a/BumbleDocGen/LanguageHandler/Php/Plugin/CorePlugin/BasePhpStubber/ComposerStubberPlugin.php b/src/LanguageHandler/Php/Plugin/CorePlugin/BasePhpStubber/ComposerStubberPlugin.php similarity index 100% rename from BumbleDocGen/LanguageHandler/Php/Plugin/CorePlugin/BasePhpStubber/ComposerStubberPlugin.php rename to src/LanguageHandler/Php/Plugin/CorePlugin/BasePhpStubber/ComposerStubberPlugin.php diff --git a/BumbleDocGen/LanguageHandler/Php/Plugin/CorePlugin/BasePhpStubber/PhpDocumentorStubberPlugin.php b/src/LanguageHandler/Php/Plugin/CorePlugin/BasePhpStubber/PhpDocumentorStubberPlugin.php similarity index 100% rename from BumbleDocGen/LanguageHandler/Php/Plugin/CorePlugin/BasePhpStubber/PhpDocumentorStubberPlugin.php rename to src/LanguageHandler/Php/Plugin/CorePlugin/BasePhpStubber/PhpDocumentorStubberPlugin.php diff --git a/BumbleDocGen/LanguageHandler/Php/Plugin/CorePlugin/BasePhpStubber/PhpUnitStubberPlugin.php b/src/LanguageHandler/Php/Plugin/CorePlugin/BasePhpStubber/PhpUnitStubberPlugin.php similarity index 100% rename from BumbleDocGen/LanguageHandler/Php/Plugin/CorePlugin/BasePhpStubber/PhpUnitStubberPlugin.php rename to src/LanguageHandler/Php/Plugin/CorePlugin/BasePhpStubber/PhpUnitStubberPlugin.php diff --git a/BumbleDocGen/LanguageHandler/Php/Plugin/CorePlugin/BasePhpStubber/PsrClassesStubberPlugin.php b/src/LanguageHandler/Php/Plugin/CorePlugin/BasePhpStubber/PsrClassesStubberPlugin.php similarity index 100% rename from BumbleDocGen/LanguageHandler/Php/Plugin/CorePlugin/BasePhpStubber/PsrClassesStubberPlugin.php rename to src/LanguageHandler/Php/Plugin/CorePlugin/BasePhpStubber/PsrClassesStubberPlugin.php diff --git a/BumbleDocGen/LanguageHandler/Php/Plugin/CorePlugin/BasePhpStubber/SymfonyComponentStubberPlugin.php b/src/LanguageHandler/Php/Plugin/CorePlugin/BasePhpStubber/SymfonyComponentStubberPlugin.php similarity index 100% rename from BumbleDocGen/LanguageHandler/Php/Plugin/CorePlugin/BasePhpStubber/SymfonyComponentStubberPlugin.php rename to src/LanguageHandler/Php/Plugin/CorePlugin/BasePhpStubber/SymfonyComponentStubberPlugin.php diff --git a/BumbleDocGen/LanguageHandler/Php/Plugin/CorePlugin/BasePhpStubber/TwigStubberPlugin.php b/src/LanguageHandler/Php/Plugin/CorePlugin/BasePhpStubber/TwigStubberPlugin.php similarity index 100% rename from BumbleDocGen/LanguageHandler/Php/Plugin/CorePlugin/BasePhpStubber/TwigStubberPlugin.php rename to src/LanguageHandler/Php/Plugin/CorePlugin/BasePhpStubber/TwigStubberPlugin.php diff --git a/BumbleDocGen/LanguageHandler/Php/Plugin/Event/Entity/OnCheckIsClassEntityCanBeLoad.php b/src/LanguageHandler/Php/Plugin/Event/Entity/OnCheckIsClassEntityCanBeLoad.php similarity index 100% rename from BumbleDocGen/LanguageHandler/Php/Plugin/Event/Entity/OnCheckIsClassEntityCanBeLoad.php rename to src/LanguageHandler/Php/Plugin/Event/Entity/OnCheckIsClassEntityCanBeLoad.php diff --git a/BumbleDocGen/LanguageHandler/Php/Plugin/Event/Parser/AfterLoadingClassEntityCollection.php b/src/LanguageHandler/Php/Plugin/Event/Parser/AfterLoadingClassEntityCollection.php similarity index 100% rename from BumbleDocGen/LanguageHandler/Php/Plugin/Event/Parser/AfterLoadingClassEntityCollection.php rename to src/LanguageHandler/Php/Plugin/Event/Parser/AfterLoadingClassEntityCollection.php diff --git a/BumbleDocGen/LanguageHandler/Php/Plugin/Event/Parser/OnAddClassEntityToCollection.php b/src/LanguageHandler/Php/Plugin/Event/Parser/OnAddClassEntityToCollection.php similarity index 100% rename from BumbleDocGen/LanguageHandler/Php/Plugin/Event/Parser/OnAddClassEntityToCollection.php rename to src/LanguageHandler/Php/Plugin/Event/Parser/OnAddClassEntityToCollection.php diff --git a/BumbleDocGen/LanguageHandler/Php/Renderer/EntityDocRenderer/EntityDocRendererHelper.php b/src/LanguageHandler/Php/Renderer/EntityDocRenderer/EntityDocRendererHelper.php similarity index 100% rename from BumbleDocGen/LanguageHandler/Php/Renderer/EntityDocRenderer/EntityDocRendererHelper.php rename to src/LanguageHandler/Php/Renderer/EntityDocRenderer/EntityDocRendererHelper.php diff --git a/BumbleDocGen/LanguageHandler/Php/Renderer/EntityDocRenderer/PhpClassToMd/PhpClassRendererTwigEnvironment.php b/src/LanguageHandler/Php/Renderer/EntityDocRenderer/PhpClassToMd/PhpClassRendererTwigEnvironment.php similarity index 100% rename from BumbleDocGen/LanguageHandler/Php/Renderer/EntityDocRenderer/PhpClassToMd/PhpClassRendererTwigEnvironment.php rename to src/LanguageHandler/Php/Renderer/EntityDocRenderer/PhpClassToMd/PhpClassRendererTwigEnvironment.php diff --git a/BumbleDocGen/LanguageHandler/Php/Renderer/EntityDocRenderer/PhpClassToMd/PhpClassToMdDocRenderer.php b/src/LanguageHandler/Php/Renderer/EntityDocRenderer/PhpClassToMd/PhpClassToMdDocRenderer.php similarity index 100% rename from BumbleDocGen/LanguageHandler/Php/Renderer/EntityDocRenderer/PhpClassToMd/PhpClassToMdDocRenderer.php rename to src/LanguageHandler/Php/Renderer/EntityDocRenderer/PhpClassToMd/PhpClassToMdDocRenderer.php diff --git a/BumbleDocGen/LanguageHandler/Php/Renderer/EntityDocRenderer/PhpClassToMd/templates/_classHeader.md.twig b/src/LanguageHandler/Php/Renderer/EntityDocRenderer/PhpClassToMd/templates/_classHeader.md.twig similarity index 100% rename from BumbleDocGen/LanguageHandler/Php/Renderer/EntityDocRenderer/PhpClassToMd/templates/_classHeader.md.twig rename to src/LanguageHandler/Php/Renderer/EntityDocRenderer/PhpClassToMd/templates/_classHeader.md.twig diff --git a/BumbleDocGen/LanguageHandler/Php/Renderer/EntityDocRenderer/PhpClassToMd/templates/_classMainInfo.md.twig b/src/LanguageHandler/Php/Renderer/EntityDocRenderer/PhpClassToMd/templates/_classMainInfo.md.twig similarity index 100% rename from BumbleDocGen/LanguageHandler/Php/Renderer/EntityDocRenderer/PhpClassToMd/templates/_classMainInfo.md.twig rename to src/LanguageHandler/Php/Renderer/EntityDocRenderer/PhpClassToMd/templates/_classMainInfo.md.twig diff --git a/BumbleDocGen/LanguageHandler/Php/Renderer/EntityDocRenderer/PhpClassToMd/templates/_constants.md.twig b/src/LanguageHandler/Php/Renderer/EntityDocRenderer/PhpClassToMd/templates/_constants.md.twig similarity index 100% rename from BumbleDocGen/LanguageHandler/Php/Renderer/EntityDocRenderer/PhpClassToMd/templates/_constants.md.twig rename to src/LanguageHandler/Php/Renderer/EntityDocRenderer/PhpClassToMd/templates/_constants.md.twig diff --git a/BumbleDocGen/LanguageHandler/Php/Renderer/EntityDocRenderer/PhpClassToMd/templates/_enumCases.md.twig b/src/LanguageHandler/Php/Renderer/EntityDocRenderer/PhpClassToMd/templates/_enumCases.md.twig similarity index 100% rename from BumbleDocGen/LanguageHandler/Php/Renderer/EntityDocRenderer/PhpClassToMd/templates/_enumCases.md.twig rename to src/LanguageHandler/Php/Renderer/EntityDocRenderer/PhpClassToMd/templates/_enumCases.md.twig diff --git a/BumbleDocGen/LanguageHandler/Php/Renderer/EntityDocRenderer/PhpClassToMd/templates/_method_details.md.twig b/src/LanguageHandler/Php/Renderer/EntityDocRenderer/PhpClassToMd/templates/_method_details.md.twig similarity index 90% rename from BumbleDocGen/LanguageHandler/Php/Renderer/EntityDocRenderer/PhpClassToMd/templates/_method_details.md.twig rename to src/LanguageHandler/Php/Renderer/EntityDocRenderer/PhpClassToMd/templates/_method_details.md.twig index 3af0505f..6c445bfc 100644 --- a/BumbleDocGen/LanguageHandler/Php/Renderer/EntityDocRenderer/PhpClassToMd/templates/_method_details.md.twig +++ b/src/LanguageHandler/Php/Renderer/EntityDocRenderer/PhpClassToMd/templates/_method_details.md.twig @@ -40,7 +40,7 @@ {% for parameter in methodEntity.getParameters() %} - ${{ parameter.name }} + ${{ parameter.name }}{% if parameter.isVariadic %} (variadic){% endif %} {{ parameter.expectedType | strTypeToUrl(methodEntity.getRootEntityCollection()) }} {% if parameter.description %}{{ parameter.description | addIndentFromLeft(1, true) }}{% else %}-{% endif %} @@ -65,7 +65,7 @@ {% for throw in methodEntity.getThrows() %} - {{ throw.name }}{% if throw.description %} - {{ throw.description | removeLineBrakes }} {% endif %} + {{ throw.name }}{% if throw.description %} - {{ throw.description | removeLineBrakes }} {% endif %} {% endfor %} diff --git a/BumbleDocGen/LanguageHandler/Php/Renderer/EntityDocRenderer/PhpClassToMd/templates/_methods.md.twig b/src/LanguageHandler/Php/Renderer/EntityDocRenderer/PhpClassToMd/templates/_methods.md.twig similarity index 100% rename from BumbleDocGen/LanguageHandler/Php/Renderer/EntityDocRenderer/PhpClassToMd/templates/_methods.md.twig rename to src/LanguageHandler/Php/Renderer/EntityDocRenderer/PhpClassToMd/templates/_methods.md.twig diff --git a/BumbleDocGen/LanguageHandler/Php/Renderer/EntityDocRenderer/PhpClassToMd/templates/_properties.md.twig b/src/LanguageHandler/Php/Renderer/EntityDocRenderer/PhpClassToMd/templates/_properties.md.twig similarity index 100% rename from BumbleDocGen/LanguageHandler/Php/Renderer/EntityDocRenderer/PhpClassToMd/templates/_properties.md.twig rename to src/LanguageHandler/Php/Renderer/EntityDocRenderer/PhpClassToMd/templates/_properties.md.twig diff --git a/BumbleDocGen/LanguageHandler/Php/Renderer/EntityDocRenderer/PhpClassToMd/templates/_property_details.md.twig b/src/LanguageHandler/Php/Renderer/EntityDocRenderer/PhpClassToMd/templates/_property_details.md.twig similarity index 100% rename from BumbleDocGen/LanguageHandler/Php/Renderer/EntityDocRenderer/PhpClassToMd/templates/_property_details.md.twig rename to src/LanguageHandler/Php/Renderer/EntityDocRenderer/PhpClassToMd/templates/_property_details.md.twig diff --git a/BumbleDocGen/LanguageHandler/Php/Renderer/EntityDocRenderer/PhpClassToMd/templates/_traits.md.twig b/src/LanguageHandler/Php/Renderer/EntityDocRenderer/PhpClassToMd/templates/_traits.md.twig similarity index 100% rename from BumbleDocGen/LanguageHandler/Php/Renderer/EntityDocRenderer/PhpClassToMd/templates/_traits.md.twig rename to src/LanguageHandler/Php/Renderer/EntityDocRenderer/PhpClassToMd/templates/_traits.md.twig diff --git a/BumbleDocGen/LanguageHandler/Php/Renderer/EntityDocRenderer/PhpClassToMd/templates/class.md.twig b/src/LanguageHandler/Php/Renderer/EntityDocRenderer/PhpClassToMd/templates/class.md.twig similarity index 100% rename from BumbleDocGen/LanguageHandler/Php/Renderer/EntityDocRenderer/PhpClassToMd/templates/class.md.twig rename to src/LanguageHandler/Php/Renderer/EntityDocRenderer/PhpClassToMd/templates/class.md.twig diff --git a/BumbleDocGen/LanguageHandler/Php/Renderer/Twig/Function/DrawClassMap.php b/src/LanguageHandler/Php/Renderer/Twig/Function/DrawClassMap.php similarity index 99% rename from BumbleDocGen/LanguageHandler/Php/Renderer/Twig/Function/DrawClassMap.php rename to src/LanguageHandler/Php/Renderer/Twig/Function/DrawClassMap.php index 9e4d22cf..64f886d5 100644 --- a/BumbleDocGen/LanguageHandler/Php/Renderer/Twig/Function/DrawClassMap.php +++ b/src/LanguageHandler/Php/Renderer/Twig/Function/DrawClassMap.php @@ -19,7 +19,7 @@ * * @note This function initiates the creation of documents for the displayed entities * - * @example {{ drawClassMap(classEntityCollection.filterByPaths(['/BumbleDocGen/Renderer'])) }} + * @example {{ drawClassMap(classEntityCollection.filterByPaths(['/src/Renderer'])) }} * @example {{ drawClassMap(classEntityCollection) }} */ final class DrawClassMap implements CustomFunctionInterface diff --git a/BumbleDocGen/LanguageHandler/Php/Renderer/Twig/Function/GetClassMethodsBodyCode.php b/src/LanguageHandler/Php/Renderer/Twig/Function/GetClassMethodsBodyCode.php similarity index 100% rename from BumbleDocGen/LanguageHandler/Php/Renderer/Twig/Function/GetClassMethodsBodyCode.php rename to src/LanguageHandler/Php/Renderer/Twig/Function/GetClassMethodsBodyCode.php diff --git a/BumbleDocGen/LanguageHandler/Php/phpHandlerDefaultSettings.yaml b/src/LanguageHandler/Php/phpHandlerDefaultSettings.yaml similarity index 85% rename from BumbleDocGen/LanguageHandler/Php/phpHandlerDefaultSettings.yaml rename to src/LanguageHandler/Php/phpHandlerDefaultSettings.yaml index fbbf9d12..0e40ba43 100644 --- a/BumbleDocGen/LanguageHandler/Php/phpHandlerDefaultSettings.yaml +++ b/src/LanguageHandler/Php/phpHandlerDefaultSettings.yaml @@ -12,11 +12,7 @@ language_handlers: - protected method_filter: - class: \BumbleDocGen\Core\Parser\FilterCondition\ConditionGroup - arguments: - - and - - class: \BumbleDocGen\LanguageHandler\Php\Parser\FilterCondition\MethodFilterCondition\IsPublicCondition - - class: \BumbleDocGen\LanguageHandler\Php\Parser\FilterCondition\MethodFilterCondition\OnlyFromCurrentClassCondition + class: \BumbleDocGen\LanguageHandler\Php\Parser\FilterCondition\MethodFilterCondition\IsPublicCondition property_filter: class: \BumbleDocGen\Core\Parser\FilterCondition\ConditionGroup diff --git a/BumbleDocGen/TemplateGenerator/ChatGpt/MissingDocBlocksGenerator.php b/src/TemplateGenerator/ChatGpt/MissingDocBlocksGenerator.php similarity index 100% rename from BumbleDocGen/TemplateGenerator/ChatGpt/MissingDocBlocksGenerator.php rename to src/TemplateGenerator/ChatGpt/MissingDocBlocksGenerator.php diff --git a/BumbleDocGen/TemplateGenerator/ChatGpt/ReadmeTemplateFiller.php b/src/TemplateGenerator/ChatGpt/ReadmeTemplateFiller.php similarity index 100% rename from BumbleDocGen/TemplateGenerator/ChatGpt/ReadmeTemplateFiller.php rename to src/TemplateGenerator/ChatGpt/ReadmeTemplateFiller.php diff --git a/BumbleDocGen/TemplateGenerator/ChatGpt/TemplatesStructureGenerator.php b/src/TemplateGenerator/ChatGpt/TemplatesStructureGenerator.php similarity index 100% rename from BumbleDocGen/TemplateGenerator/ChatGpt/TemplatesStructureGenerator.php rename to src/TemplateGenerator/ChatGpt/TemplatesStructureGenerator.php diff --git a/BumbleDocGen/TemplateGenerator/ChatGpt/prompts/missingDocBlockGeneration b/src/TemplateGenerator/ChatGpt/prompts/missingDocBlockGeneration similarity index 100% rename from BumbleDocGen/TemplateGenerator/ChatGpt/prompts/missingDocBlockGeneration rename to src/TemplateGenerator/ChatGpt/prompts/missingDocBlockGeneration diff --git a/BumbleDocGen/TemplateGenerator/ChatGpt/prompts/readmeTemplateFiller b/src/TemplateGenerator/ChatGpt/prompts/readmeTemplateFiller similarity index 100% rename from BumbleDocGen/TemplateGenerator/ChatGpt/prompts/readmeTemplateFiller rename to src/TemplateGenerator/ChatGpt/prompts/readmeTemplateFiller diff --git a/BumbleDocGen/TemplateGenerator/ChatGpt/prompts/structureGeneration b/src/TemplateGenerator/ChatGpt/prompts/structureGeneration similarity index 100% rename from BumbleDocGen/TemplateGenerator/ChatGpt/prompts/structureGeneration rename to src/TemplateGenerator/ChatGpt/prompts/structureGeneration diff --git a/BumbleDocGen/di-config.php b/src/di-config.php similarity index 100% rename from BumbleDocGen/di-config.php rename to src/di-config.php