Skip to content

Commit

Permalink
docs: add a few comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Dovyski committed Jun 23, 2021
1 parent 78bb1f7 commit cc66c1e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

All notable changes to this project are documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and the project follows [semantic versioning](http://semver.org/spec/v2.0.0.html).

## [1.0.1] (https://github.com/ccuffs/poll-from-text/releases/tag/v.1.0.1) - 2021-06-23
### Added
- Static method `CCUFFS\Text\PollFromText::make()` for convinente parsing.


## [1.0.0] (https://github.com/ccuffs/poll-from-text/releases/tag/v.1.0.0) - 2021-06-22
- Initial public release
11 changes: 10 additions & 1 deletion src/PollFromText.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,21 @@
namespace CCUFFS\Text;

/**
*
* Class to parse semi-structured text into structured-data that can be used to build questionnaires (forms).
* The main goal is to allow end users to build dynamic forms, e.g. Google Forms, using plain text like they
* would if the forms were to be printed on paper.
*
* @author Fernando Bevilacqua <[email protected]>
* @license MIT
*/
class PollFromText
{
/**
* @param mixed $text text to be parsed into a questionnaire
* @param array $config specific configuration for this parsing, e.g. allow multiline questions.
*
* @return array associative array containing the structured questionnaire.
*/
public static function make($text, array $config = []) {
return (new PollFromText())->parse($text, $config);
}
Expand Down

0 comments on commit cc66c1e

Please sign in to comment.