Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: jordanbrauer/unit-converter
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.8.4
Choose a base ref
...
head repository: jordanbrauer/unit-converter
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v0.8.5
Choose a head ref

Commits on Dec 31, 2020

  1. added inHg and hPa units

    cezam committed Dec 31, 2020

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    eaaf3a8 View commit details

Commits on Jan 5, 2021

  1. Merge pull request #158 from cezam/unit_inhg

    added inHg and hPa units
    jordanbrauer authored Jan 5, 2021
    Copy the full SHA
    9870712 View commit details

Commits on Jan 8, 2021

  1. Copy the full SHA
    61fb363 View commit details
  2. update readme

    jordanbrauer committed Jan 8, 2021
    Copy the full SHA
    87ff0ea View commit details
  3. Copy the full SHA
    0e6cbea View commit details
  4. Copy the full SHA
    445a526 View commit details
  5. setup PHP 7.1

    jordanbrauer committed Jan 8, 2021
    Copy the full SHA
    71664e8 View commit details
  6. Copy the full SHA
    abf7f84 View commit details
  7. remove bad steps

    jordanbrauer committed Jan 8, 2021
    Copy the full SHA
    c87dc8c View commit details
  8. bump PHP version

    jordanbrauer committed Jan 8, 2021
    Copy the full SHA
    8dff7b6 View commit details
  9. remove circle CI config

    jordanbrauer committed Jan 8, 2021
    Copy the full SHA
    96b76ee View commit details
  10. Copy the full SHA
    41bc3a7 View commit details
  11. Refactor tests (closes #130)

    * WIP
    
    * add base test class and helper trait
    
    * refactor a couple volume unit tests
    
    * add coverage annotations
    
    * declare used code for coverage reports
    
    * dynamic converter for incoming from unit
    
    * refactor tests to use generator data providers
    
    * add volume unit test suite
    
    * simplify test input
    
    * add time converter to tests
    
    * create time unit test suite
    
    * refactor provider test input to match new arguments
    
    * refactor tests for plane angle measurement units
    
    * just use `as` method to reduce boilerplate
    
    * change composer script syntax from `-` to `:`
    
    * remove redundancy in config
    
    * rename test for more clarity on meaning
    
    * refactor day tests
    
    * refactor hour tests
    
    * refactor microsecond tests
    
    * formatting
    
    * refactor millisecond tests
    
    * refactor minute tests
    
    * refactor month tests
    
    * refactor nanosecond tests
    
    * refactor seconds tests
    
    * refactor week tests
    
    * refactor year tests
    
    * refactor speed tests
    
    * refactor temperature tests
    
    * add formulae to convert Kelvin values
    
    * run fuel economy tests in volume suite
    
    * refactor frequency tests
    
    * try listing code use in parent test
    
    * list used code on each test itself
    
    * list code usage for tests
    
    * list code usage
    
    * refactor pressure tests
    
    * make coverage work again with new test structure
    
    * remove trait for now
    
    * refactor area tests
    
    * add energy units test suite
    
    * refactor calorie tests
    
    * refactor foot pound tests
    
    * refactor tests and update unit values
    
    * fix broken tests after merging master
    
    * fix energy tests
    
    * add length test suite
    
    * add default formula to all units
    
    * refactor, add, and correct all length tests – add forumla where needed
    
    * refactor all fuel economy volume tests
    
    * add mass test suite
    
    * refactor and add mass tests + add needed formulae
    
    * add digital storage test suite
    
    * refactor and add digital storage tests + needed formulae
    
    * add missing coverage statements
    
    * fix typo
    
    * add code coverage declarations
    
    * add missing code coverage usage annotation
    jordanbrauer authored Jan 8, 2021
    Copy the full SHA
    1523525 View commit details
  12. Copy the full SHA
    f9fc717 View commit details

Commits on Jan 9, 2021

  1. add distinction between unit families (#151 closes #87)

    * rename existing interfaces
    
    * SI units are metric
    
    * remove superfluous interface
    jordanbrauer authored Jan 9, 2021
    Copy the full SHA
    8f80a40 View commit details
  2. Copy the full SHA
    092dece View commit details

Commits on Jan 22, 2021

  1. close #160 add type checks to calculator inputs (#161)

    * assert for proper type errors when calculator receives invalid arguments
    
    * add helper method to a test variable and throw a preformatted TypeError if it fails
    
    * check for bcmath extension before we instantiate a binary calculator
    
    * add type checks for calculator inputs
    jordanbrauer authored Jan 22, 2021
    Copy the full SHA
    499c7f0 View commit details
  2. fix #162 upgrade PHP Doc & generate new master docs (#164)

    * upgrade phpdoc
    
    * generate new (unstable) master documentation
    jordanbrauer authored Jan 22, 2021
    Copy the full SHA
    ef8a2fd View commit details

Commits on Feb 12, 2021

  1. denormalize scientific notation numbers (#163) – closes #159

    * denormalize scientific notation numbers
    
    * testing on PHP 7.4
    
    * better scientific notation expanding
    
    * ensure that results are always valid numbers
    
    * ensure we trim only when a decimal is present
    jordanbrauer authored Feb 12, 2021
    Copy the full SHA
    133abc7 View commit details

Commits on Mar 26, 2021

  1. Fix #120 (#168)

    * use proper unit of measurement
    
    * update test to consider new measurement
    
    closes #120
    jordanbrauer authored Mar 26, 2021
    Copy the full SHA
    9b03e3d View commit details
  2. Copy the full SHA
    3d7e3f9 View commit details
Showing 884 changed files with 6,256 additions and 317,502 deletions.
107 changes: 0 additions & 107 deletions .circleci/config.yml

This file was deleted.

84 changes: 84 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
name: CI

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: PHP Installation
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'
extensions: bcmath
- name: Code Checkout
uses: actions/checkout@v2
- name: Cache
id: composer-cache
uses: actions/cache@v2
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('src/', 'tests/') }}
restore-keys: |
${{ runner.os }}-php-
- name: Installation
if: steps.composer-cache.outputs.cache-hit != 'true'
run: composer install --prefer-dist --no-progress --no-suggest
- name: Prepare Artifacts
run: tar -cvf vendor.tar vendor
- name: Archive Artifacts
uses: actions/upload-artifact@v2
with:
name: test-dist
retention-days: 1
path: vendor.tar

analysis:
runs-on: ubuntu-latest
needs: build
steps:
- name: PHP Installation
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'
extensions: bcmath
- name: Code Checkout
uses: actions/checkout@v2
- name: Download Artifacts
uses: actions/download-artifact@v2
with:
name: test-dist
- name: Unpackage Artifacts
run: tar -xvf vendor.tar
- name: Validate
run: |
composer validate
composer normalize --dry-run
# - name: Lint (Codestyle)
# run: composer style -- --dry-run
# - name: Static Analysis
# run: composer analyze -- --error-format=github

tests:
runs-on: ubuntu-latest
needs: build
steps:
- name: PHP Installation
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'
extensions: bcmath
- name: Code Checkout
uses: actions/checkout@v2
- name: Download Artifacts
uses: actions/download-artifact@v2
with:
name: test-dist
- name: Unpackage Artifacts
run: tar -xvf vendor.tar
- name: Test
run: composer test
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -8,6 +8,7 @@ report/

### FriendsOfPHP ###
.php_cs.cache
.phpdoc/

# Created by https://www.gitignore.io/api/git,vim,node,linux,macos,emacs,windows,composer,phpstorm,sublimetext,phpstorm+all,phpstorm+iml,visualstudiocode

17 changes: 7 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,17 @@
# Unit Converter

[![Latest Stable Version](https://poser.pugx.org/jordanbrauer/unit-converter/version?format=flat-square)](https://packagist.org/packages/jordanbrauer/unit-converter)
[![Latest Stable Version](https://img.shields.io/packagist/v/jordanbrauer/unit-converter?color=257ec2&label=stable&style=flat-square)](https://packagist.org/packages/jordanbrauer/unit-converter)
[![Latest Unstable Version](https://poser.pugx.org/jordanbrauer/unit-converter/v/unstable?format=flat-square)](//packagist.org/packages/jordanbrauer/unit-converter)
[![CircleCI](https://img.shields.io/circleci/build/github/jordanbrauer/unit-converter/master?label=tests&style=flat-square)](https://circleci.com/gh/jordanbrauer/unit-converter/tree/master)
[![PHP from Packagist](https://img.shields.io/packagist/php-v/jordanbrauer/unit-converter?color=8892be&style=flat-square)](https://secure.php.net/releases/)
[![composer.lock available](https://poser.pugx.org/jordanbrauer/unit-converter/composerlock?format=flat-square)](https://packagist.org/packages/jordanbrauer/unit-converter)
[![license](https://img.shields.io/github/license/jordanbrauer/unit-converter.svg?style=flat-square)](https://github.com/jordanbrauer/unit-converter/blob/master/LICENSE)

[![CI Workflow](https://img.shields.io/github/workflow/status/jordanbrauer/unit-converter/CI?style=flat-square&label=tests)](https://github.com/jordanbrauer/unit-converter/actions?query=workflow%3ACI)
[![Code Maintainability](https://img.shields.io/codeclimate/maintainability/jordanbrauer/unit-converter.svg?style=flat-square)](https://codeclimate.com/github/jordanbrauer/unit-converter)
[![Code Coverage](https://img.shields.io/codeclimate/coverage/jordanbrauer/unit-converter.svg?style=flat-square)](https://codeclimate.com/github/jordanbrauer/unit-converter)
[![Technical Debt](https://img.shields.io/codeclimate/tech-debt/jordanbrauer/unit-converter.svg?style=flat-square)](https://codeclimate.com/github/jordanbrauer/unit-converter/issues)

<!-- [![Maintainability](https://api.codeclimate.com/v1/badges/0b4639967df0b1578734/maintainability)](https://codeclimate.com/github/jordanbrauer/unit-converter/maintainability) -->
<!-- [![Test Coverage](https://api.codeclimate.com/v1/badges/0b4639967df0b1578734/test_coverage)](https://codeclimate.com/github/jordanbrauer/unit-converter/test_coverage) -->

[![Maintenance](https://img.shields.io/maintenance/yes/2020.svg?style=flat-square)](https://github.com/jordanbrauer/unit-converter)
[![Maintenance](https://img.shields.io/maintenance/yes/2021.svg?style=flat-square)](https://github.com/jordanbrauer/unit-converter)
[![Packagist](https://img.shields.io/packagist/dt/jordanbrauer/unit-converter.svg?style=flat-square)](https://packagist.org/packages/jordanbrauer/unit-converter)
[![PHP from Packagist](https://img.shields.io/packagist/php-v/jordanbrauer/unit-converter.svg?style=flat-square)](https://secure.php.net/releases/)
[![composer.lock available](https://poser.pugx.org/jordanbrauer/unit-converter/composerlock?format=flat-square)](https://packagist.org/packages/jordanbrauer/unit-converter)
[![license](https://img.shields.io/github/license/jordanbrauer/unit-converter.svg?style=flat-square)](https://github.com/jordanbrauer/unit-converter/blob/master/LICENSE)

<br />

Binary file modified bin/phpdoc.phar
Binary file not shown.
43 changes: 30 additions & 13 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,34 +1,26 @@
{
"name": "jordanbrauer/unit-converter",
"description": "Convert standard units from one to another with this easy to use, lightweight package",
"type": "component",
"description": "Convert standard units from one to another with this easy to use, lightweight package",
"license": "MIT",
"authors": [
{
"name": "jordanbrauer",
"email": "18744334+jordanbrauer@users.noreply.github.com"
}
],
"scripts": {
"test": "vendor/bin/phpunit --configuration=./phpunit.xml --testsuite=fullspec --color=always",
"unit": "vendor/bin/phpunit --configuration=./phpunit.xml --testsuite=unit --color=always",
"integration": "vendor/bin/phpunit --configuration=./phpunit.xml --testsuite=integration --color=always",
"coverage": "vendor/bin/phpunit --coverage-text --configuration=./phpunit.xml --testsuite=fullspec --color=always",
"clover": "phpunit --coverage-clover=./clover.xml --configuration=./phpunit.xml --testsuite=fullspec --color=never",
"style": "bin/php-cs-fixer fix --config=.php_cs --show-progress=dots --ansi -v",
"report": "vendor/bin/phpmetrics --report-html=report --exclude='.github,.notes,.vscode,bin,docs,node_modules,report,tests,vendor' ."
},
"require": {
"php": "^7.1",
"ext-bcmath": "*"
},
"require-dev": {
"codedungeon/phpunit-result-printer": "^0.19.12",
"consolidation/robo": "^1.2",
"ergebnis/composer-normalize": "^2.13",
"phpmetrics/phpmetrics": "^2.4",
"phpunit/phpunit": "^6.3",
"symfony/var-dumper": "^3.3",
"vlucas/phpdotenv": "^2.4",
"codedungeon/phpunit-result-printer": "^0.19.12",
"phpmetrics/phpmetrics": "^2.4"
"vlucas/phpdotenv": "^2.4"
},
"autoload": {
"psr-4": {
@@ -37,8 +29,33 @@
},
"autoload-dev": {
"psr-4": {
"UnitConverter\\Tests\\": "tests/",
"UnitConverter\\Tests\\Integration\\": "tests/integration/",
"UnitConverter\\Tests\\Unit\\": "tests/unit/"
}
},
"scripts": {
"clover": "phpunit --coverage-clover=./clover.xml --configuration=./phpunit.xml --testsuite=fullspec --color=never",
"coverage": "vendor/bin/phpunit --coverage-text --configuration=./phpunit.xml --testsuite=fullspec --color=always",
"integration": "vendor/bin/phpunit --configuration=./phpunit.xml --testsuite=integration --color=always",
"report": "vendor/bin/phpmetrics --report-html=report --exclude='.github,.notes,.vscode,bin,docs,node_modules,report,tests,vendor' .",
"style": "bin/php-cs-fixer fix --config=.php_cs --show-progress=dots --ansi -v",
"test": "vendor/bin/phpunit --configuration=./phpunit.xml --testsuite=fullspec --color=always",
"test:area": "vendor/bin/phpunit --configuration=./phpunit.xml --testsuite=area --color=always",
"test:coverage": "vendor/bin/phpunit --coverage-text --configuration=./phpunit.xml --testsuite=fullspec --color=always",
"test:energy": "vendor/bin/phpunit --configuration=./phpunit.xml --testsuite=energy --color=always",
"test:frequency": "vendor/bin/phpunit --configuration=./phpunit.xml --testsuite=frequency --color=always",
"test:integration": "vendor/bin/phpunit --configuration=./phpunit.xml --testsuite=integration --color=always",
"test:length": "vendor/bin/phpunit --configuration=./phpunit.xml --testsuite=length --color=always",
"test:mass": "vendor/bin/phpunit --configuration=./phpunit.xml --testsuite=mass --color=always",
"test:planeangle": "vendor/bin/phpunit --configuration=./phpunit.xml --testsuite=planeangle --color=always",
"test:pressure": "vendor/bin/phpunit --configuration=./phpunit.xml --testsuite=pressure --color=always",
"test:speed": "vendor/bin/phpunit --configuration=./phpunit.xml --testsuite=speed --color=always",
"test:storage": "vendor/bin/phpunit --configuration=./phpunit.xml --testsuite=storage --color=always",
"test:temperature": "vendor/bin/phpunit --configuration=./phpunit.xml --testsuite=temperature --color=always",
"test:time": "vendor/bin/phpunit --configuration=./phpunit.xml --testsuite=time --color=always",
"test:unit": "vendor/bin/phpunit --configuration=./phpunit.xml --testsuite=unit --color=always",
"test:volume": "vendor/bin/phpunit --configuration=./phpunit.xml --testsuite=volume --color=always",
"unit": "vendor/bin/phpunit --configuration=./phpunit.xml --testsuite=unit --color=always"
}
}
5 changes: 0 additions & 5 deletions docs/.htaccess

This file was deleted.

Loading