Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit f76094a

Browse files
committed
Initial commit
0 parents commit f76094a

File tree

15 files changed

+413
-0
lines changed

15 files changed

+413
-0
lines changed

‎.editorconfig

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# editorconfig.org
2+
3+
root = true
4+
5+
[*]
6+
charset = utf-8
7+
end_of_line = lf
8+
insert_final_newline = true
9+
indent_style = space
10+
indent_size = 4
11+
trim_trailing_whitespace = true
12+
13+
[*.md]
14+
trim_trailing_whitespace = false

‎.gitattributes

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Autodetect text files
2+
* text=auto
3+
4+
# ...Unless the name matches the following overriding patterns
5+
6+
# Definitively text files
7+
*.php text
8+
*.css text
9+
*.js text
10+
*.txt text
11+
*.md text
12+
*.xml text
13+
*.json text
14+
*.bat text
15+
*.sql text
16+
*.yml text
17+
18+
# Ensure those won't be messed up with
19+
*.png binary
20+
*.jpg binary
21+
*.gif binary
22+
*.ttf binary
23+
24+
# Ignore some meta files when creating an archive of this repository
25+
/.github export-ignore
26+
/.editorconfig export-ignore
27+
/.gitattributes export-ignore
28+
/.gitignore export-ignore
29+
/phpunit.xml.dist export-ignore
30+
/tests export-ignore
31+
/docs export-ignore
32+
33+
# Avoid merge conflicts in CHANGELOG
34+
# https://about.gitlab.com/2015/02/10/gitlab-reduced-merge-conflicts-by-90-percent-with-changelog-placeholders/
35+
/CHANGELOG.md merge=union

‎.github/workflows/build.yml

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
on:
2+
- pull_request
3+
- push
4+
5+
name: build
6+
7+
jobs:
8+
tests:
9+
name: PHP ${{ matrix.php }}-${{ matrix.os }}
10+
11+
env:
12+
key: cache-v1
13+
14+
runs-on: ${{ matrix.os }}
15+
16+
strategy:
17+
matrix:
18+
os:
19+
- ubuntu-latest
20+
- windows-latest
21+
22+
php:
23+
- "7.4"
24+
- "8.0"
25+
26+
steps:
27+
- name: Checkout
28+
uses: actions/checkout@v2.3.4
29+
30+
- name: Install PHP
31+
uses: shivammathur/setup-php@v2
32+
with:
33+
php-version: ${{ matrix.php }}
34+
ini-values: date.timezone='UTC'
35+
coverage: pcov
36+
tools: composer:v2
37+
38+
- name: Determine composer cache directory on Linux
39+
if: matrix.os == 'ubuntu-latest'
40+
run: echo "COMPOSER_CACHE_DIR=$(composer config cache-dir)" >> $GITHUB_ENV
41+
42+
- name: Determine composer cache directory on Windows
43+
if: matrix.os == 'windows-latest'
44+
run: echo "COMPOSER_CACHE_DIR=~\AppData\Local\Composer" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
45+
46+
- name: Cache dependencies installed with composer
47+
uses: actions/cache@v2
48+
with:
49+
path: ${{ env.COMPOSER_CACHE_DIR }}
50+
key: php${{ matrix.php }}-composer-${{ hashFiles('**/composer.json') }}
51+
restore-keys: |
52+
php${{ matrix.php }}-composer-
53+
- name: Update composer
54+
run: composer self-update
55+
56+
- name: Install dependencies with composer php 7.4
57+
if: matrix.php == '7.4'
58+
run: composer update --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi
59+
60+
- name: Install dependencies with composer php 8.0
61+
if: matrix.php == '8.0'
62+
run: composer update --ignore-platform-reqs --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi
63+
64+
- name: Run tests with phpunit
65+
run: vendor/bin/phpunit --colors=always

‎.github/workflows/mutation.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
on:
2+
pull_request:
3+
push:
4+
branches:
5+
- "master"
6+
7+
name: mutation test
8+
9+
jobs:
10+
mutation:
11+
name: PHP ${{ matrix.php }}-${{ matrix.os }}
12+
13+
runs-on: ${{ matrix.os }}
14+
15+
strategy:
16+
matrix:
17+
os:
18+
- ubuntu-latest
19+
20+
php:
21+
- "7.4"
22+
23+
steps:
24+
- name: Checkout
25+
uses: actions/checkout@v2.3.4
26+
27+
- name: Install PHP
28+
uses: shivammathur/setup-php@v2
29+
with:
30+
php-version: "${{ matrix.php }}"
31+
ini-values: memory_limit=-1
32+
coverage: "pcov"
33+
tools: composer:v2
34+
35+
- name: Determine composer cache directory
36+
run: echo "COMPOSER_CACHE_DIR=$(composer config cache-dir)" >> $GITHUB_ENV
37+
38+
- name: Cache dependencies installed with composer
39+
uses: actions/cache@v2
40+
with:
41+
path: ${{ env.COMPOSER_CACHE_DIR }}
42+
key: php${{ matrix.php }}-composer-${{ hashFiles('**/composer.json') }}
43+
restore-keys: |
44+
php${{ matrix.php }}-composer-
45+
- name: Update composer
46+
run: composer self-update
47+
48+
- name: Install dependencies with composer
49+
run: composer update --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi
50+
51+
- name: Run infection
52+
run: |
53+
git fetch --depth=1 origin $GITHUB_BASE_REF
54+
vendor/bin/roave-infection-static-analysis-plugin -j2 --git-diff-filter=A --git-diff-base=origin/$GITHUB_BASE_REF --logger-github --ignore-msi-with-no-mutations --only-covered
55+
env:
56+
STRYKER_DASHBOARD_API_KEY: ${{ secrets.STRYKER_DASHBOARD_API_KEY }}

‎.github/workflows/static.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
on:
2+
- pull_request
3+
- push
4+
5+
name: static analysis
6+
7+
jobs:
8+
mutation:
9+
name: PHP ${{ matrix.php }}-${{ matrix.os }}
10+
11+
runs-on: ${{ matrix.os }}
12+
13+
strategy:
14+
matrix:
15+
os:
16+
- ubuntu-latest
17+
18+
php:
19+
- "7.4"
20+
21+
steps:
22+
- name: Checkout
23+
uses: actions/checkout@v2.3.4
24+
25+
- name: Install PHP
26+
uses: shivammathur/setup-php@v2
27+
with:
28+
php-version: "${{ matrix.php }}"
29+
tools: composer:v2, cs2pr
30+
coverage: none
31+
32+
- name: Determine composer cache directory
33+
run: echo "COMPOSER_CACHE_DIR=$(composer config cache-dir)" >> $GITHUB_ENV
34+
35+
- name: Cache dependencies installed with composer
36+
uses: actions/cache@v2
37+
with:
38+
path: ${{ env.COMPOSER_CACHE_DIR }}
39+
key: php${{ matrix.php }}-composer-${{ hashFiles('**/composer.json') }}
40+
restore-keys: |
41+
php${{ matrix.php }}-composer-
42+
- name: Update composer
43+
run: composer self-update
44+
45+
- name: Install dependencies with composer
46+
run: composer update --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi
47+
48+
- name: Static analysis
49+
run: vendor/bin/psalm --shepherd --stats --output-format=checkstyle | cs2pr --graceful-warnings --colorize

‎.gitignore

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# phpstorm
2+
.idea
3+
4+
# composer
5+
/vendor
6+
/composer.lock
7+
8+
# phpunit
9+
/phpunit.xml
10+
/.phpunit.result.cache

‎CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# _____ Change Log
2+
3+
## 1.0.0 under development
4+
5+
- Initial release.

‎LICENSE.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
Copyright © 2021 by Sergei Predvoditelev (https://predvoditelev.ru)
2+
All rights reserved.
3+
4+
Redistribution and use in source and binary forms, with or without
5+
modification, are permitted provided that the following conditions
6+
are met:
7+
8+
* Redistributions of source code must retain the above copyright
9+
notice, this list of conditions and the following disclaimer.
10+
* Redistributions in binary form must reproduce the above copyright
11+
notice, this list of conditions and the following disclaimer in
12+
the documentation and/or other materials provided with the
13+
distribution.
14+
* Neither the name of the copyright holder nor the names of its
15+
contributors may be used to endorse or promote products derived
16+
from this software without specific prior written permission.
17+
18+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
21+
FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
22+
COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
23+
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
24+
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
25+
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
26+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27+
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
28+
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29+
POSSIBILITY OF SUCH DAMAGE.

‎README.md

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# _____
2+
3+
[![Latest Stable Version](https://poser.pugx.org/vjik/_____/v/stable.png)](https://packagist.org/packages/vjik/_____)
4+
[![Total Downloads](https://poser.pugx.org/vjik/_____/downloads.png)](https://packagist.org/packages/vjik/_____)
5+
[![Build status](https://github.com/vjik/_____/workflows/build/badge.svg)](https://github.com/vjik/_____/actions?query=workflow%3Abuild)
6+
[![Mutation testing badge](https://img.shields.io/endpoint?style=flat&url=https%3A%2F%2Fbadge-api.stryker-mutator.io%2Fgithub.com%2Fvjik%2F_____%2Fmaster)](https://dashboard.stryker-mutator.io/reports/github.com/vjik/_____/master)
7+
[![static analysis](https://github.com/vjik/_____/workflows/static%20analysis/badge.svg)](https://github.com/vjik/_____/actions?query=workflow%3A%22static+analysis%22)
8+
9+
The package ...
10+
11+
## Requirements
12+
13+
- PHP 7.4 or higher.
14+
15+
## Installation
16+
17+
The package could be installed with [composer](https://getcomposer.org/download/):
18+
19+
```shell
20+
composer require vjik/_____ --prefer-dist
21+
```
22+
23+
## General usage
24+
25+
## Testing
26+
27+
### Unit testing
28+
29+
The package is tested with [PHPUnit](https://phpunit.de/). To run tests:
30+
31+
```shell
32+
./vendor/bin/phpunit
33+
```
34+
35+
### Mutation testing
36+
37+
The package tests are checked with [Infection](https://infection.github.io/) mutation framework with
38+
[Infection Static Analysis Plugin](https://github.com/Roave/infection-static-analysis-plugin). To run it:
39+
40+
```shell
41+
./vendor/bin/roave-infection-static-analysis-plugin
42+
```
43+
44+
### Static analysis
45+
46+
The code is statically analyzed with [Psalm](https://psalm.dev/). To run static analysis:
47+
48+
```shell
49+
./vendor/bin/psalm
50+
```
51+
52+
## License
53+
54+
The _____ is free software. It is released under the terms of the BSD License.
55+
Please see [`LICENSE`](./LICENSE.md) for more information.

‎composer.json

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
{
2+
"name": "vjik/_____",
3+
"type": "library",
4+
"description": "_____",
5+
"keywords": [
6+
"_____"
7+
],
8+
"license": "BSD-3-Clause",
9+
"support": {
10+
"issues": "https://github.com/vjik/_____/issues?state=open",
11+
"source": "https://github.com/vjik/_____"
12+
},
13+
"minimum-stability": "stable",
14+
"require": {
15+
"php": "^7.4|^8.0"
16+
},
17+
"require-dev": {
18+
"phpunit/phpunit": "^9.5",
19+
"roave/infection-static-analysis-plugin": "^1.6",
20+
"vimeo/psalm": "^4.3"
21+
},
22+
"autoload": {
23+
"psr-4": {
24+
"Vjik\\_____\\": "src"
25+
}
26+
},
27+
"autoload-dev": {
28+
"psr-4": {
29+
"Vjik\\_____\\Tests\\": "tests"
30+
}
31+
},
32+
"scripts": {
33+
},
34+
"config": {
35+
"sort-packages": true
36+
}
37+
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /