mchljams / spun
PHP Library to process strings containing spintax syntax.
0.0.6
2017-09-28 23:12 UTC
Requires
- php: >=5.3.0
Requires (Dev)
- phpunit/phpunit: 5.7
- squizlabs/php_codesniffer: 2.8.0
This package is not auto-updated.
Last update: 2024-04-23 10:13:29 UTC
README
PHP string/text spinning library using spintax.
How To Use
$spun = new Spun; $spun->str = "This is a string that {includes|contains|holds} choices you can spin."; $new_string = $spun->spin();
One Possible Result
This is a string that holds choices you can spin.
Proposed Features
- Nesting
- Configurable Syntax (Use delimiters other than curly braces)
Unit Tests
Run Unit Tests
Change directory to the root of this package and run:
./vendor/bin/phpunit
Run Unit Tests With HTML Coverage Report
./vendor/bin/phpunit --coverage-html coverage
Code Linting
Using PHP_CodeSniffer
Developed using the PSR-2 Standard
./vendor/bin/phpcs --standard=PSR2 ./src