narokishi/number-to-words

PHP package to transform numbers into words

1.0.0 2018-09-01 11:40 UTC

This package is not auto-updated.

Last update: 2024-05-06 14:01:17 UTC


README

Build Coverage Downloads Release License
Build Status Coverage Status Total Downloads Latest Stable Version License

Description

"NumberToWords" is a PHP package, which transform numbers (as float) to human-friendly written value with currency.

Installation

Composer

Installing via Composer will keep this package up to date for you.

composer require narokishi/number-to-words

Usage

use Narokishi\NumberToWords\NumberTransformer;

...

Transformer::make()
    ->setLanguage('PL') // Language
    ->toWords(172.05, 'PLN') // Value, currency

Contributing

Thank you for considering contributing to the package.

Running tests

composer tests
composer tests-windows

Submitting a Patch

  • Fork the Repository
  • After the action has completed, clone your fork locally
git clone git@github.com:{username}/number-to-words.git
cd number-to-words
git remote add upstream git://github.com/narokishi/number-to-words.git
  • Check that tests pass
  • Create and work on your own topic branch
git checkout -b {branch} master
  • Prepare your patch (while rebasing you might have to resolve conflicts)
git checkout master
git fetch upstream
git merge upstream/master
git checkout BRANCH_NAME
git rebase master
  • In case of conflicts
 git add {files}
 git rebase --continue
  • Check that all tests pass and push your branch
 git push origin {branch} --force
  • Make a Pull Request on narokishi/number-to-words repository