Skip to content

Commit 9630262

Browse files
committed
Initial: phpexperts/skeleton v1.1.1.
0 parents  commit 9630262

File tree

11 files changed

+323
-0
lines changed

11 files changed

+323
-0
lines changed

.codeclimate.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"version": "2",
3+
"checks": {
4+
"complex-logic": {
5+
"config": {
6+
"threshold": 7
7+
}
8+
},
9+
"method-complexity": {
10+
"config": {
11+
"threshold": 10
12+
}
13+
}
14+
}
15+
}

.gitattributes

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
/tests export-ignore
2+
/.gitattributes export-ignore
3+
/.gitignore export-ignore
4+
.gitkeep export-ignore
5+
/.php_cs export-ignore
6+
/.travis.yml export-ignore
7+
/phpunit.xml export-ignore
8+
/CHANGELOG.md export-ignore
9+
/composer.lock export-ignore
10+
/benchmarks export-ignore
11+
/phpbench.js export-ignore
12+

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
.env
2+
composer.lock
3+
/.php_cs.cache
4+
/.phpunit*
5+
/coverage
6+
/vendor
7+
/.idea

.php_cs

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
<?php
2+
3+
$header = <<<HEADER
4+
This file is part of Combinatorics, a PHP Experts, Inc., Project.
5+
6+
Copyright © 2019 PHP Experts, Inc.
7+
Author: Theodore R. Smith <theodore@phpexperts.pro>
8+
GPG Fingerprint: 4BF8 2613 1C34 87AC D28F 2AD8 EB24 A91D D612 5690
9+
https://www.phpexperts.pro/
10+
https://github.com/PHPExpertsInc/Skeleton
11+
12+
This file is licensed under the MIT License.
13+
HEADER;
14+
15+
return PhpCsFixer\Config::create()
16+
->setRules([
17+
'@Symfony' => true,
18+
'elseif' => false,
19+
'yoda_style' => false,
20+
'list_syntax' => ['syntax' => 'short'],
21+
'concat_space' => ['spacing' => 'one'],
22+
'binary_operator_spaces' => array(
23+
'align_double_arrow' => true,
24+
),
25+
'phpdoc_no_alias_tag' => false,
26+
'declare_strict_types' => true,
27+
'no_superfluous_elseif' => true,
28+
'blank_line_after_opening_tag' => false,
29+
'header_comment' => [
30+
'header' => $header,
31+
'location' => 'after_declare_strict',
32+
'comment_type' => 'PHPDoc',
33+
]
34+
])
35+
->setFinder(
36+
PhpCsFixer\Finder::create()
37+
->exclude('vendor')
38+
->in(__DIR__)
39+
);

.travis.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
language: php
2+
3+
php:
4+
- '7.1'
5+
- '7.2'
6+
- '7.3'
7+
8+
before_script:
9+
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
10+
- chmod +x ./cc-test-reporter
11+
- ./cc-test-reporter before-build
12+
- travis_retry composer self-update
13+
- travis_retry composer install --no-interaction --prefer-source
14+
15+
script:
16+
# Fail the Travis CI build on the first error.
17+
- set -e
18+
- mkdir -p build/logs
19+
- php vendor/bin/phpcs --standard=PSR12 src
20+
- php vendor/bin/phpcs --standard=PSR1 tests
21+
- php vendor/bin/phpstan analyze --level max src
22+
- vendor/bin/phpunit --coverage-text --coverage-clover build/logs/clover.xml
23+
24+
after_script:
25+
- if [[ ! -z "$CC_TEST_REPORTER_ID" ]]; then ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT; fi

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2019 PHP Experts, Inc.
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# Combinatorics
2+
3+
[![TravisCI]()]()
4+
[![Maintainability]()]()
5+
[![Test Coverage]()]()
6+
7+
Combinatorics is a PHP Experts, Inc., Project meant for the ease of access of Combinatorics algorithms.
8+
9+
See https://en.wikipedia.org/wiki/Combinatorics
10+
11+
## Installation
12+
13+
Via Composer
14+
15+
```bash
16+
composer require phpexperts/combinatorics
17+
```
18+
19+
## Usage
20+
21+
22+
# Use cases
23+
24+
## Testing
25+
26+
```bash
27+
phpunit --testdox
28+
```
29+
30+
To actually see what's going on -and- run the stress tests, run
31+
32+
```bash
33+
phpunit --debug
34+
```
35+
36+
Note: It takes over 4 minutes on an Intel i7 to run all of the stress tests.
37+
38+
# Contributors
39+
40+
[Theodore R. Smith](https://www.phpexperts.pro/]) <theodore@phpexperts.pro>
41+
GPG Fingerprint: 4BF8 2613 1C34 87AC D28F 2AD8 EB24 A91D D612 5690
42+
CEO: PHP Experts, Inc.
43+
44+
## License
45+
46+
MIT license. Please see the [license file](LICENSE) for more information.
47+

composer.json

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
{
2+
"name": "phpexperts/combinatorics",
3+
"description": "A collection of utility classes for dealing with combinations.",
4+
"keywords": [
5+
"combinatorics",
6+
"combinations"
7+
],
8+
"homepage": "https://www.phpexperts.pro/",
9+
"license": "MIT",
10+
"authors": [
11+
{
12+
"name": "PHP Experts, Inc.",
13+
"homepage": "https://www.phpexperts.pro/"
14+
},
15+
{
16+
"name": "Theodore R. Smith",
17+
"homepage": "https://www.linkedin.com/in/tedrsmith"
18+
}
19+
],
20+
"require": {
21+
"php": "^7.1",
22+
"ext-json": "*"
23+
},
24+
"require-dev": {
25+
"phpunit/phpunit": "7.*|8.*",
26+
"phpstan/phpstan": "*",
27+
"friendsofphp/php-cs-fixer": "*",
28+
"symfony/var-dumper": "*",
29+
"povils/phpmnd": "*",
30+
"squizlabs/php_codesniffer": "*"
31+
},
32+
"autoload": {
33+
"psr-4": {
34+
"PHPExperts\\Combinatorics\\" : "src/"
35+
}
36+
},
37+
"autoload-dev": {
38+
"psr-4": { "PHPExperts\\Combinatorics\\Tests\\" : "tests/" }
39+
},
40+
"config": {
41+
"classmap-authoritative": true
42+
},
43+
"scripts": {
44+
"post-create-project-cmd": [
45+
"php install.php"
46+
]
47+
}
48+
}

phpunit.xml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<phpunit bootstrap="./vendor/autoload.php"
3+
colors="true"
4+
convertErrorsToExceptions="true"
5+
convertNoticesToExceptions="true"
6+
convertWarningsToExceptions="true"
7+
testdox="true"
8+
stopOnError="true"
9+
stopOnFailure="true">
10+
<testsuites>
11+
<testsuite name="main">
12+
<directory>./tests</directory>
13+
</testsuite>
14+
</testsuites>
15+
16+
<filter>
17+
<whitelist processUncoveredFilesFromWhitelist="true">
18+
<directory suffix=".php">./src</directory>
19+
</whitelist>
20+
</filter>
21+
22+
<logging>
23+
<log type="coverage-html" target="./coverage" lowUpperBound="35" highLowerBound="85"/>
24+
</logging>
25+
</phpunit>

psalm.xml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
<?xml version="1.0"?>
2+
<psalm
3+
totallyTyped="false"
4+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5+
xmlns="https://getpsalm.org/schema/config"
6+
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
7+
>
8+
<projectFiles>
9+
<directory name="src" />
10+
<ignoreFiles>
11+
<directory name="vendor" />
12+
</ignoreFiles>
13+
</projectFiles>
14+
15+
<issueHandlers>
16+
<LessSpecificReturnType errorLevel="info" />
17+
18+
<!-- level 3 issues - slightly lazy code writing, but provably low false-negatives -->
19+
20+
<DeprecatedMethod errorLevel="info" />
21+
<DeprecatedProperty errorLevel="info" />
22+
<DeprecatedClass errorLevel="info" />
23+
<DeprecatedConstant errorLevel="info" />
24+
<DeprecatedInterface errorLevel="info" />
25+
<DeprecatedTrait errorLevel="info" />
26+
27+
<InternalMethod errorLevel="info" />
28+
<InternalProperty errorLevel="info" />
29+
<InternalClass errorLevel="info" />
30+
31+
<MissingClosureReturnType errorLevel="info" />
32+
<MissingReturnType errorLevel="info" />
33+
<MissingPropertyType errorLevel="info" />
34+
<InvalidDocblock errorLevel="info" />
35+
<MisplacedRequiredParam errorLevel="info" />
36+
37+
<PropertyNotSetInConstructor errorLevel="info" />
38+
<MissingConstructor errorLevel="info" />
39+
<MissingClosureParamType errorLevel="info" />
40+
<MissingParamType errorLevel="info" />
41+
42+
<RedundantCondition errorLevel="info" />
43+
44+
<DocblockTypeContradiction errorLevel="info" />
45+
<RedundantConditionGivenDocblockType errorLevel="info" />
46+
47+
<UnresolvableInclude errorLevel="info" />
48+
49+
<RawObjectIteration errorLevel="info" />
50+
51+
<InvalidStringClass errorLevel="info" />
52+
</issueHandlers>
53+
</psalm>

0 commit comments

Comments
 (0)