diff --git a/.travis.yml b/.travis.yml index 24b1527..b7be01f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,5 @@ language: php -dist: trusty +dist: bionic sudo: required matrix: @@ -7,26 +7,33 @@ matrix: - php: 5.3 dist: precise - php: 5.4 + dist: trusty - php: 5.5 + dist: trusty - php: 5.6 + dist: trusty - php: 7.0 + dist: xenial + env: PHPUNIT=5.7 - php: 7.1 - php: 7.2 - - php: hhvm - env: HHVM=true + - php: 7.3 install: - composer install - - if [[ $HHVM == true ]]; then composer require "phpunit/phpunit:5.7"; fi + - if [[ $PHPUNIT == 5.7 ]]; then composer require "phpunit/phpunit:5.7"; fi before_script: - mkdir -p build/logs - cd tests script: - - if [[ $HHVM == true ]]; then ../vendor/bin/phpunit --colors --coverage-clover ../build/logs/clover.xml .; fi - - if [[ $HHVM != true ]]; then phpunit --colors --coverage-clover ../build/logs/clover.xml .; fi - + - | + if [[ $PHPUNIT == 5.7 ]]; then + ../vendor/bin/phpunit --colors --coverage-clover ../build/logs/clover.xml . + else + phpunit --colors --coverage-clover ../build/logs/clover.xml . + fi after_success: - cd .. diff --git a/LICENSE b/LICENSE index 46c6d1c..ea461be 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2014, 2015, 2016, 2017, 2018 Josh Sherman +Copyright (c) 2014, 2015, 2016, 2017, 2018, 2019 Josh Sherman Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index 848057d..7ea594d 100644 --- a/README.md +++ b/README.md @@ -4,36 +4,14 @@ [](https://coveralls.io/github/joshtronic/php-loremipsum?branch=master) [](https://packagist.org/packages/joshtronic/php-loremipsum) -Lorem ipsum generator in PHP without dependencies. Compatible with PHP 5.3+ as -well as HHVM. +Lorem ipsum generator in PHP without dependencies. Compatible with PHP 5.3+. -## Origins - -Once upon a time, I was attempting to find a lorem ipsum generator over on -[Packagist](https://packagist.org/search/?q=lorem%20ipsum). I was presented -with many options, and some of those options were good. Unfortunately, the -bulk of those options depended on Symphony or the Zend Framework. This -wouldn’t have been a big deal but under the circumstances, I wanted something -that was not tightly coupled to these frameworks because I wanted to use the -generator in my _own_ framework. - -I had decided to use -[badcow/lorem-ipsum](https://packagist.org/packages/badcow/lorem-ipsum) -because it did not have any dependencies nor did it rely on any external APIs. -As I started to use the library, I found that I was going to have to fight -with it to get it to do what I wanted. After digging through the code, I -realized that I was going to end up gutting most of it to bend it to my will. -I know when you overhaul someone’s code the liklihood of them accepting a pull -request goes down dramatically, hence building this library while taking cues -from it’s predecessor. - -Also, the aforementioned package had a bunch of “setter” and “getter” methods -that were grossing me out :scream: +[](https://www.patreon.com/joshtronic) ## Installation -The preferred installation method is via `composer`. First add the following -to your `composer.json` +The preferred installation method is via `composer`. First add the following to +your `composer.json`: ```json "require": { @@ -41,7 +19,7 @@ to your `composer.json` } ``` -Then run `composer update` +Then run `composer update`. ## Usage @@ -58,21 +36,21 @@ echo '1 word: ' . $lipsum->word(); echo '5 words: ' . $lipsum->words(5); ``` -### Generating sentences +### Generating Sentences ```php -echo '1 sentence: ' . $lipsum->sentence(); +echo '1 sentence: ' . $lipsum->sentence(); echo '5 sentences: ' . $lipsum->sentences(5); ``` -### Generating paragraphs +### Generating Paragraphs ```php -echo '1 paragraph: ' . $lipsum->paragraph(); +echo '1 paragraph: ' . $lipsum->paragraph(); echo '5 paragraphs: ' . $lipsum->paragraphs(5); ``` -### Wrapping text with HTML tags +### Wrapping Text with HTML Tags If you would like to wrap the generated text with a tag, pass it as the second parameter: @@ -99,7 +77,7 @@ echo $lipsum->words(3, '