Skip to content

Commit c5fbb88

Browse files
committed
Set up repo
1 parent 4e816eb commit c5fbb88

File tree

9 files changed

+2834
-6
lines changed

9 files changed

+2834
-6
lines changed

.gitignore

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
composer.phar
22
/vendor/
3-
4-
# Commit your application's lock file https://getcomposer.org/doc/01-basic-usage.md#commit-your-composer-lock-file-to-version-control
5-
# You may choose to ignore a library lock file http://getcomposer.org/doc/02-libraries.md#lock-file
6-
# composer.lock
3+
reports/
4+
build/
5+
coverage/
6+
.idea/

.scrutinizer.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
build:
2+
tests:
3+
override:
4+
-
5+
command: 'vendor/bin/phpunit --coverage-clover=build/logs/clover.xml'
6+
coverage:
7+
file: 'build/logs/clover.xml'
8+
format: 'clover'

.travis.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
language: php
2+
php:
3+
- '7.2'
4+
script:
5+
- make coverage
6+
after_success:
7+
- travis_retry php vendor/bin/php-coveralls -v

Makefile

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
.PHONY: test
2+
test: src tests vendor
3+
./vendor/phpmd/phpmd/src/bin/phpmd src text \
4+
controversial,design,naming,unusedcode
5+
./vendor/squizlabs/php_codesniffer/bin/phpcs --standard=PSR2 --colors src
6+
./vendor/phpunit/phpunit/phpunit
7+
8+
vendor: composer.lock
9+
composer install
10+
11+
.PHONY: coverage
12+
coverage: src tests vendor
13+
mkdir -p build
14+
rm -rf build/*
15+
./vendor/phpmd/phpmd/src/bin/phpmd src text \
16+
controversial,design,naming,unusedcode \
17+
--reportfile ./build/phpmd.xml
18+
./vendor/squizlabs/php_codesniffer/bin/phpcs --standard=PSR2 --colors src \
19+
--report-file=./build/phpcs.xml
20+
./vendor/phpunit/phpunit/phpunit --coverage-clover=build/logs/clover.xml \
21+
--coverage-html=build/coverage --coverage-text

README.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,12 @@
1-
# php-fraction
2-
PHP fraction library with fraction simplification and float to fraction conversion
1+
# PHP Fraction
2+
3+
[![Build Status](https://travis-ci.org/hughgrigg/php-fraction.svg?branch=master)](https://travis-ci.org/hughgrigg/php-fraction)
4+
[![Coverage Status](https://coveralls.io/repos/github/hughgrigg/php-fraction/badge.svg)](https://coveralls.io/github/hughgrigg/php-fraction)
5+
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/ef5b774bce624ab2b1f3632e9307a909)](https://app.codacy.com/app/hugh_2/php-fraction?utm_source=github.com&utm_medium=referral&utm_content=hughgrigg/php-fraction&utm_campaign=badger)
6+
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/hughgrigg/php-fraction/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/hughgrigg/php-fraction/?branch=master)
7+
[![StyleCI](https://styleci.io/repos/154997973/shield?branch=master)](https://styleci.io/repos/154997973)
8+
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
9+
10+
PHP fraction library with fraction simplification and float to fraction
11+
conversion.
12+

composer.json

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
{
2+
"name": "hughgrigg/php-fraction",
3+
"description": "Fraction library with fraction simplification and float to fraction conversion.",
4+
"version": "1.0.1",
5+
"type": "library",
6+
"require": {
7+
"php": "^7.2",
8+
"nesbot/carbon": "^1.25"
9+
},
10+
"require-dev": {
11+
"phpunit/phpunit": "^7.0",
12+
"phpmd/phpmd": "@stable",
13+
"squizlabs/php_codesniffer": "@stable",
14+
"johnkary/phpunit-speedtrap": "^3.0",
15+
"php-coveralls/php-coveralls": "^2.0"
16+
},
17+
"license": "MIT",
18+
"authors": [
19+
{
20+
"name": "Hugh Grigg",
21+
"email": "[email protected]"
22+
}
23+
],
24+
"minimum-stability": "stable",
25+
"autoload": {
26+
"psr-4": {
27+
"BusinessTime\\": "src/",
28+
"BusinessTime\\Tests\\": "tests/"
29+
}
30+
}
31+
}

0 commit comments

Comments
 (0)