Skip to content

Commit

Permalink
Init repository
Browse files Browse the repository at this point in the history
  • Loading branch information
Bartosz Kubicki committed May 10, 2020
0 parents commit 587b43c
Show file tree
Hide file tree
Showing 8 changed files with 1,762 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.idea/
.env
.phpunit.result.cache
docker-compose.yml
docker/
vendor/
21 changes: 21 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) 2020 Bartosz Kubicki

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
64 changes: 64 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# BKubicki Polish Nouns Numeral Declension

## Overview
This mini-library provides declesion of noun according to numeral used before, specifically for polish language.
[Rules are following](http://www.rjp.pan.pl/index.php?option=com_content&view=article&id=1011:skadnia-liczebnikow-70&catid=44&Itemid=145).
This library is port of [this awesome mini-library](https://github.com/mmiszy/polish-plurals) for php language.

3 forms of nouns are now supported:

* singular nominative
* plural nominative
* plural accusative

```
decle(1, "komentarz", "komentarze", "komentarzy"); // komentarz
decle(0, "komentarz", "komentarze", "komentarzy"); // komentarzy
decle(3, "komentarz", "komentarze", "komentarzy"); // komentarze
```

As its only mini-library, it doesn't support any exceptions from the rules.

## Prerequisites
* PHP 7.2/7.3


## Installation ###

To install the extension use the following commands:

```bash
composer require bkubicki/polish-noun-numeral-declination
```


## Tests ##


### Unit ###
1. Run command
```
./vendor/bin/phpunit -c phpunit.xml --testsuite "Unit" --coverage-html coverage/coverage-html --colors=always
```

2. You can also use some alias:
- `test-unit-coverage` - _`vendor/bin/phpunit -c phpunit.xml --testsuite "Unit" --coverage-html coverage/coverage-html --colors=always`_

## Versioning

We use [SemVer](http://semver.org/) for versioning. For the versions available, see the [tags on this repository](https://github.com/bartoszkubicki/magento2-unit-tests-doubles/tags).


## Changelog

See changelog [here](CHANGELOG.md).


## Authors

* [Bartosz Kubicki](https://github.com/bartoszkubicki)


## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE.md) file for details.
41 changes: 41 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"name": "bkubicki/polish-noun-numeral-declension",
"description": "Polish noun numeral declension",
"type": "library",
"license": [
"MIT"
],
"authors": [
{
"name": "Bartosz Kubicki",
"email": "[email protected]"
}
],
"version": "1.0.0",
"minimum-stability": "stable",
"require": {
"php": "^7.2.0|~7.3.0"
},
"require-dev": {
"phpunit/phpunit": "^8.0.0"
},
"keywords": [
"noun",
"declension",
"decle",
"numeral"
],
"autoload": {
"files": [
"src/functions.php"
]
},
"autoload-dev": {
"psr-4": {
"BKubicki\\PolishNounNumeralDeclension\\Test\\": "tests"
}
},
"scripts": {
"test-unit-coverage": "vendor/bin/phpunit -c phpunit.xml --testsuite 'Unit' --coverage-html coverage/coverage-html --colors=always"
}
}
Loading

0 comments on commit 587b43c

Please sign in to comment.