<commit_before>php-plantumlwriter [![Build Status](https://travis-ci.org/davidfuhr/php-plantumlwriter.png?branch=master)](https://travis-ci.org/davidfuhr/php-plantumlwriter)
==================

Description
-----------

A tool to create [PlantUML](http://plantuml.sourceforge.net/) class diagrams from your PHP source.

Currently the following language features are supported:

- Property and method visibility
- Static properties and methods
- Method return types from doc comment
- Parameter types from type hinting and doc comment
- Parameter default values
- Class constants with value
- Property type froms doc comment
- Property default values
- Implemented interfaces and parent classes

Usage
-----

To generate the PlantUML code for `WriteCommand.php` run

    php bin/console.php write src/Flagbit/Plantuml/Command/WriteCommand.php

which will output

    @startuml
    class Flagbit.Plantuml.Command.WriteCommand {
        #configure()
        #execute(input: Symfony.Component.Console.Input.InputInterface, output: Symfony.Component.Console.Output.OutputInterface)
    }
    class Flagbit.Plantuml.Command.WriteCommand extends Symfony.Component.Console.Command.Command
    @enduml

If you have a large class with lots of methods you can suppress method printing using the `--without-methods` flag:

    php bin/console.php write --without-methods path/to/your/LargeClass.php

You can also generate a whole directory at once:

    php bin/console.php write path/to/directory

Or multiple files or directories:

    php bin/console.php write path/to/ClassOne.php path/to/ClassTwo.php path/to/directory<commit_msg>[~TASK] added known limitations to readme<commit_after>php-plantumlwriter [![Build Status](https://travis-ci.org/davidfuhr/php-plantumlwriter.png?branch=master)](https://travis-ci.org/davidfuhr/php-plantumlwriter)
==================

Description
-----------

A tool to create [PlantUML](http://plantuml.sourceforge.net/) class diagrams from your PHP source.

Currently the following language features are supported:

- Property and method visibility
- Static properties and methods
- Method return types from doc comment
- Parameter types from type hinting and doc comment
- Parameter default values
- Class constants with value
- Property types from doc comment
- Property default values
- Implemented interfaces and parent classes

Usage
-----

To generate the PlantUML code for `WriteCommand.php` run

    php bin/console.php write src/Flagbit/Plantuml/Command/WriteCommand.php

which will output

    @startuml
    class Flagbit.Plantuml.Command.WriteCommand {
        #configure()
        #execute(input: Symfony.Component.Console.Input.InputInterface, output: Symfony.Component.Console.Output.OutputInterface)
    }
    class Flagbit.Plantuml.Command.WriteCommand extends Symfony.Component.Console.Command.Command
    @enduml

If you have a large class with lots of methods you can suppress method printing using the `--without-methods` flag:

    php bin/console.php write --without-methods path/to/your/LargeClass.php

You can also generate a whole directory at once:

    php bin/console.php write path/to/directory

Or multiple files or directories:

    php bin/console.php write path/to/ClassOne.php path/to/ClassTwo.php path/to/directory

Limitations
-----------

- Imported classes are currently not handled correctly if read from doc comment
  (use-Statement is not evaluated) which affects return values and property types
{'fraction_non_alphanumeric': 0.09710982658959537, 'fraction_numerical': 0.0, 'mean_word_length': 4.02322206095791, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6970673', 'n_tokens_mistral': 961, 'n_tokens_neox': 929, 'n_words': 310}