Skip to content

Commit 78f753e

Browse files
authored
Merge pull request #2 from liderman/refactoring
Refactoring and added static analysis tool
2 parents 0f7ede5 + 32327ba commit 78f753e

File tree

8 files changed

+56
-6
lines changed

8 files changed

+56
-6
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
/vendor/
2+
.idea

.travis.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
language: php
2+
3+
sudo: false
4+
5+
php:
6+
- 5.5.9
7+
- 5.6
8+
- 7.0
9+
- 7.1
10+
- 7.2
11+
- nightly
12+
13+
cache:
14+
directories:
15+
- $HOME/.composer/cache
16+
17+
before_script:
18+
- composer install
19+
20+
script: composer test

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ It supports multiple encodings.
77

88
This package implements the functionality of a similar package for Go Lang – [text-generator](https://github.com/liderman/text-generator).
99

10+
[![Build Status](https://travis-ci.org/liderman/php-text-generator.svg)](https://travis-ci.org/liderman/php-text-generator)
1011
[![Latest Stable Version](https://poser.pugx.org/liderman/php-text-generator/v/stable)](https://packagist.org/packages/liderman/php-text-generator)
1112
[![Total Downloads](https://poser.pugx.org/liderman/php-text-generator/downloads)](https://packagist.org/packages/liderman/php-text-generator)
1213
[![Latest Unstable Version](https://poser.pugx.org/liderman/php-text-generator/v/unstable)](https://packagist.org/packages/liderman/php-text-generator)
@@ -48,6 +49,8 @@ Features
4849
* Easy wrapping thanks to the integrated interface
4950
* Covered tests
5051
* Written by PSR standards and 100% covered with documentation (PHP-Doc)
52+
* Without external dependencies
53+
* The code is checked by the static analyzer PhpStan lvl 7
5154

5255
Requirements
5356
-----------

composer.json

Lines changed: 31 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
{
22
"name": "liderman/php-text-generator",
33
"description": "Fast SEO text generator on a mask",
4-
"keywords": ["seo", "text", "generator", "mask"],
4+
"keywords": [
5+
"seo",
6+
"text",
7+
"generator",
8+
"mask"
9+
],
510
"type": "library",
611
"license": "MIT",
712
"authors": [
@@ -11,13 +16,33 @@
1116
}
1217
],
1318
"autoload": {
14-
"psr-4": { "Liderman\\TextGenerator\\": "" },
15-
"exclude-from-classmap": [
16-
"/Tests/"
17-
]
19+
"psr-4": {
20+
"Liderman\\TextGenerator\\": "src/"
21+
}
22+
},
23+
"autoload-dev": {
24+
"psr-4" : {
25+
"Liderman\\TextGenerator\\Tests\\": "tests/"
26+
}
1827
},
1928
"minimum-stability": "dev",
2029
"require": {
2130
"php": ">=5.5.9"
31+
},
32+
"require-dev": {
33+
"phpunit/phpunit": "^5.0.0",
34+
"phpstan/phpstan": "^0.9.0"
35+
},
36+
"scripts": {
37+
"phpunit": [
38+
"vendor/bin/phpunit"
39+
],
40+
"phpstan": [
41+
"vendor/bin/phpstan analyze src tests -c phpstan.neon --level=7"
42+
],
43+
"test": [
44+
"@phpunit",
45+
"@phpstan"
46+
]
2247
}
23-
}
48+
}

phpstan.neon

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
parameters:
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)