Skip to content

Commit

Permalink
feat: Complete rework
Browse files Browse the repository at this point in the history
  • Loading branch information
seebeen committed Apr 26, 2024
1 parent b9d7179 commit 2a65008
Show file tree
Hide file tree
Showing 14 changed files with 2,757 additions and 222 deletions.
21 changes: 21 additions & 0 deletions .codeclimate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
ratings:
paths:
- "**.php"
checks:
file-lines:
enabled: true
config:
threshold: 500
method-complexity:
enabled: true
config:
threshold: 10
method-count:
enabled: true
config:
threshold: 50
method-lines:
config:
threshold: 75

23 changes: 23 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# editorconfig.org

root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.php]
indent_size = 4

[*.scss]
indent_size = 2

[*.js]
indent_size = 2

[*.md]
trim_trailing_whitespace = false
14 changes: 14 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/.github export-ignore
/docs export-ignore
/.codeclimate.yml export-ignore
/.editorconfig export-ignore
/.gitattributes export-ignore
/.gitignore export-ignore
/CODE_OF_CONDUCT.md export-ignore
/composer.lock export-ignore
/CONTRIBUTING.md export-ignore
/LICENSE export-ignore
/SECURITY.md export-ignore
/phpcs.xml export-ignore
/phpunit.xml export-ignore
/phpstan.neon export-ignore
26 changes: 26 additions & 0 deletions .github/workflows/send_coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Upload coverage
on: [push, pull_request]
jobs:
run:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Cache Composer dependencies
uses: actions/cache@v4
with:
path: /tmp/composer-cache
key: ${{ runner.os }}-${{ hashFiles('**/composer.lock') }}
- name: Install dependencies
uses: php-actions/composer@v6
with:
php_version: "8.1"
php_extensions: xdebug
- name: Run tests and collect coverage
run: vendor/bin/phpunit --coverage-clover=coverage.xml
env:
XDEBUG_MODE: coverage
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.phpunit.cache
coverage
vendor
60 changes: 41 additions & 19 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,44 @@
{
"name": "seebeen/numberstoserbianwords",
"version": "1.0",
"description": "Class to convert numbers to Serbian words",
"keywords": ["numbers", "words", "serbian"],
"require": {
"php": ">=5.4"
"name": "seebeen/numberstoserbianwords",
"version": "1.0",
"description": "Class to convert numbers to Serbian words",
"keywords": [
"numbers",
"words",
"serbian"
],
"require": {
"php": ">=8.1"
},
"license": "GPL",
"authors": [
{
"name": "Sibin Grasic",
"email": "sg@sgi.io"
}
],
"autoload": {
"psr-4": {
"Oblak\\SrbUtils\\": "src"
},
"license": "GPL",
"authors": [
{
"name": "Sibin Grasic",
"email": "sg@sgi.io"
}
],
"autoload": {
"psr-4": {
"SeeBeen\\SerbianPHP\\": "src/"
},
"classmap": ["src/"]
"classmap": [
"src/"
]
},
"autoload-dev": {
"psr-4": {
"Oblak\\SrbUtils\\Tests\\": "tests"
}
},
"require-dev": {
"phpstan/phpstan": "^1.10",
"squizlabs/php_codesniffer": "^3.9",
"phpunit/phpunit": "^10.5",
"slevomat/coding-standard": "^8.15"
},
"config": {
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": true
}
}
}
}
Loading

0 comments on commit 2a65008

Please sign in to comment.