Remove phpstan from dependancies - want to keep this compatible with php 7.0 as per github build steps
This commit is contained in:
parent
7cebbfc06a
commit
a84cdd8917
2 changed files with 32 additions and 34 deletions
|
@ -1,35 +1,34 @@
|
||||||
{
|
{
|
||||||
"name": "joshtronic/php-loremipsum",
|
"name": "joshtronic/php-loremipsum",
|
||||||
"description": "Lorem ipsum generator in PHP without dependencies",
|
"description": "Lorem ipsum generator in PHP without dependencies",
|
||||||
"version": "2.0.0",
|
"version": "2.0.0",
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"lorem",
|
"lorem",
|
||||||
"ipsum",
|
"ipsum",
|
||||||
"generator"
|
"generator"
|
||||||
],
|
],
|
||||||
"homepage": "https://github.com/joshtronic/php-loremipsum",
|
"homepage": "https://github.com/joshtronic/php-loremipsum",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"authors": [{
|
"authors": [{
|
||||||
"name": "Josh Sherman",
|
"name": "Josh Sherman",
|
||||||
"email": "hello@joshtronic.com",
|
"email": "hello@joshtronic.com",
|
||||||
"homepage": "https://joshtronic.com"
|
"homepage": "https://joshtronic.com"
|
||||||
}],
|
}],
|
||||||
"require": {
|
"require": {
|
||||||
"php": ">=5.3"
|
"php": ">=5.3"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"phpunit/phpunit": "^4.8.36 || ^9.0",
|
"phpunit/phpunit": "^4.8.36 || ^9.0"
|
||||||
"phpstan/phpstan": "^1.3"
|
},
|
||||||
},
|
"autoload": {
|
||||||
"autoload": {
|
"psr-4": {
|
||||||
"psr-4": {
|
"joshtronic\\": "src/"
|
||||||
"joshtronic\\": "src/"
|
}
|
||||||
}
|
},
|
||||||
},
|
"autoload-dev": {
|
||||||
"autoload-dev": {
|
"psr-4": {
|
||||||
"psr-4": {
|
"joshtronic\\Tests\\": "tests/"
|
||||||
"joshtronic\\Tests\\": "tests/"
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
|
@ -312,8 +312,7 @@ class LoremIpsum
|
||||||
private function punctuate(&$sentences)
|
private function punctuate(&$sentences)
|
||||||
{
|
{
|
||||||
foreach ($sentences as $key => $sentence) {
|
foreach ($sentences as $key => $sentence) {
|
||||||
$words = count($sentences);
|
$words = count($sentence);
|
||||||
|
|
||||||
// Only worry about commas on sentences longer than 4 words
|
// Only worry about commas on sentences longer than 4 words
|
||||||
if ($words > 4) {
|
if ($words > 4) {
|
||||||
$mean = log($words, 6);
|
$mean = log($words, 6);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue