From cc66c1e53b4ce6db68da76e7a5619c0f56ca8e39 Mon Sep 17 00:00:00 2001 From: Fernando Bevilacqua Date: Wed, 23 Jun 2021 08:04:02 -0300 Subject: [PATCH] docs: add a few comments --- CHANGELOG.md | 4 ++++ src/PollFromText.php | 11 ++++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1f8eeb3..22777f3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/src/PollFromText.php b/src/PollFromText.php index bd342ce..784589f 100644 --- a/src/PollFromText.php +++ b/src/PollFromText.php @@ -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 + * @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); }