-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
29 changed files
with
6,136 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
service_name: travis-ci | ||
|
||
# for php-coveralls | ||
coverage_clover: build/logs/clover.xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Drupal editor configuration normalization | ||
# @see http://editorconfig.org/ | ||
|
||
# This is the top-most .editorconfig file; do not search in parent directories. | ||
root = true | ||
|
||
# All files. | ||
[*] | ||
end_of_line = LF | ||
indent_style = space | ||
indent_size = 2 | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
|
||
[composer.{json,lock}] | ||
indent_size = 4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
--- | ||
name: "🚨 Bug report" | ||
about: Create a report to help us improve the project | ||
title: '' | ||
labels: 'type: Bug' | ||
assignees: '' | ||
--- | ||
|
||
### 💬 Describe the bug | ||
A clear and concise description of what the bug is. | ||
|
||
### 🔢 To Reproduce | ||
Steps to reproduce the behaviour: | ||
1. Go to '...' | ||
2. Click on '....' | ||
3. Scroll down to '....' | ||
4. See error | ||
|
||
### 🧞 Expected behaviour | ||
A clear and concise description of what you expected to happen. | ||
|
||
### 📸 Screenshots | ||
If applicable, add screenshots to help explain your problem. | ||
|
||
### ⚙️ Additional context | ||
Add any other context about the problem here. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
--- | ||
name: "☝️ Feature request" | ||
about: Suggest an idea for this project | ||
title: '' | ||
labels: 'type: New feature' | ||
assignees: '' | ||
--- | ||
|
||
### 💬 Is your feature request related to a problem? Please describe. | ||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] | ||
|
||
### 🧞 Describe the solution you'd like | ||
A clear and concise description of what you want to happen. | ||
|
||
### ☝️ Describe alternatives you've considered | ||
A clear and concise description of any alternative solutions or features you've considered. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
--- | ||
name: "🔬 Review" | ||
about: Create a new review issue | ||
title: '' | ||
labels: 'type: Review' | ||
assignees: '' | ||
--- | ||
|
||
### 💬 Describe the context | ||
A clear and concise description of what the review is about. | ||
|
||
### ✅ To modify | ||
List of required modifications: | ||
- [ ] Do that | ||
- [ ] Change this | ||
|
||
### 📸 Screenshots | ||
If needed, add screenshots to help explain your review. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
--- | ||
name: "☑️ Task" | ||
about: Task issue | ||
title: '' | ||
labels: '' | ||
assignees: '' | ||
--- | ||
|
||
### 💬 Describe the task | ||
A clear and concise description of what the task is about. | ||
|
||
### ✅ Todo | ||
Steps to achieve the task: | ||
- [ ] Do that | ||
- [ ] Produce this | ||
|
||
### 🧞 Expected result | ||
A clear and concise description of what you expected to produce. | ||
|
||
### 📸 Screenshots | ||
If applicable, add screenshots to help explain the task. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
### 💬 Describe the pull request | ||
A clear and concise description of what the pull request is about. | ||
|
||
### 🗃️ Issues | ||
This pull request is related to : | ||
- #1 | ||
|
||
### 🔢 To Review | ||
Steps to review the PR: | ||
1. Install '...' | ||
2. Go to '...' | ||
3. Click on '....' | ||
4. Scroll down to '....' | ||
|
||
### 📸 Screenshots | ||
If applicable, add screenshots to help explain the task. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
name: code-styles | ||
on: [pull_request] | ||
|
||
jobs: | ||
php-cs-fixer: | ||
name: php-cs-fixer | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v1 | ||
with: | ||
php-version: '7.3' | ||
extensions: mbstring, intl, gd, xml, dom, json, fileinfo, curl, zip, iconv | ||
tools: php-cs-fixer, cs2pr | ||
- uses: actions/checkout@master | ||
- run: composer install --prefer-dist | ||
- run: ./vendor/bin/php-cs-fixer fix --dry-run --format=checkstyle | cs2pr | ||
|
||
phpmd: | ||
name: phpmd | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v1 | ||
with: | ||
php-version: '7.3' | ||
extensions: mbstring, intl, gd, xml, dom, json, fileinfo, curl, zip, iconv | ||
- uses: actions/checkout@master | ||
- run: composer install --prefer-dist | ||
- run: ./vendor/bin/phpmd ./ text ./phpmd.xml --suffixes php,inc,test --exclude vendor,bin,tests | ||
|
||
phpcpd: | ||
name: phpcpd | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v1 | ||
with: | ||
php-version: '7.3' | ||
extensions: mbstring, intl, gd, xml, dom, json, fileinfo, curl, zip, iconv | ||
- uses: actions/checkout@master | ||
- run: composer install --prefer-dist | ||
- run: ./vendor/bin/phpcpd ./ --names=*.php,*.inc,*.test --names-exclude=*.md --ansi --exclude=vendor --exclude=bin --exclude=tests | ||
|
||
phpstan: | ||
name: phpstan | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v1 | ||
with: | ||
php-version: '7.3' | ||
extensions: mbstring, intl, gd, xml, dom, json, fileinfo, curl, zip, iconv | ||
tools: phpstan, cs2pr | ||
- uses: actions/checkout@master | ||
- run: composer install --prefer-dist | ||
- run: ./vendor/bin/phpstan analyse ./src ./tests --error-format=checkstyle | cs2pr | ||
|
||
psalm: | ||
name: psalm | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v1 | ||
with: | ||
php-version: '7.3' | ||
extensions: mbstring, intl, gd, xml, dom, json, fileinfo, curl, zip, iconv | ||
- uses: actions/checkout@master | ||
- run: composer install --prefer-dist | ||
- run: ./vendor/bin/psalm --output-format=github | ||
|
||
security-checker: | ||
name: security-checker | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v1 | ||
with: | ||
php-version: '7.3' | ||
extensions: mbstring, intl, gd, xml, dom, json, fileinfo, curl, zip, iconv | ||
tools: php-cs-fixer, cs2pr | ||
- uses: actions/checkout@master | ||
- run: composer install --prefer-dist | ||
- run: ./vendor/bin/security-checker security:check ./composer.lock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?php | ||
|
||
$finder = PhpCsFixer\Finder::create() | ||
->exclude('vendor') | ||
->exclude('.sonarlint') | ||
->in(__DIR__) | ||
; | ||
|
||
return PhpCsFixer\Config::create() | ||
->setRules([ | ||
'@Symfony' => true, | ||
'array_syntax' => ['syntax' => 'short'], | ||
'phpdoc_align' => ['align' => 'vertical', 'tags' => ['param', 'type', 'var']], | ||
]) | ||
->setFinder($finder) | ||
; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
preset: psr2 | ||
|
||
risky: false | ||
|
||
finder: | ||
exclude: | ||
- "tests" | ||
- "vendor" | ||
- "bin" | ||
name: | ||
- "*.php" | ||
path: | ||
- "./" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
language: php | ||
sudo: true | ||
php: | ||
- 7.1 | ||
- 7.2 | ||
- 7.3 | ||
before_script: | ||
- composer self-update | ||
- composer install --prefer-source --no-interaction --dev --ignore-platform-reqs | ||
script: | ||
- ./vendor/bin/phpunit | ||
after_success: | ||
- travis_retry php vendor/bin/php-coveralls -v |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
CHANGELOG | ||
--------- | ||
|
||
## 0.0.1-alpha (2020-06-12) | ||
- allow conversion of GPS (WGS84) coordinates from/to CH1903/LV03 (MN03) | ||
- allow conversion of GPS (WGS84) coordinates from/to CH1995/LV95 (MN95) | ||
|
||
## 0.0.0 (2020-06-12) | ||
- under heavy development |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
## Submitting issues | ||
|
||
Please read the below before posting an issue. Thank you! | ||
|
||
If, you think you've found a bug, or would like to discuss a change or improvement, feel free to raise an issue. | ||
|
||
## Pull requests | ||
|
||
This is a fairly simple converter, but it has been made much better by contributions from those using it. | ||
If you'd like to suggest an improvement, please raise an issue to discuss it before making your pull request. | ||
|
||
Pull requests for bugs are more than welcome - please explain the bug you're trying to fix in the message. | ||
|
||
## Developing | ||
|
||
## 🚔 Check Symfony 4 coding standards & best practices | ||
|
||
You need to run composer before using [FriendsOfPHP/PHP-CS-Fixer](https://github.com/FriendsOfPHP/PHP-CS-Fixer). | ||
|
||
### Ensure PHP Community Best Practicies using PHP Coding Standards Fixer | ||
|
||
It can modernize your code (like converting the pow function to the ** operator on PHP 5.6) and (micro) optimize it. | ||
|
||
```bash | ||
./vendor/bin/php-cs-fixer fix --dry-run --format=checkstyle | ||
``` | ||
|
||
### Attempts to dig into your program and find as many type-related bugs as possiblevia Psalm | ||
|
||
```bash | ||
./vendor/bin/psalm | ||
``` | ||
|
||
### Catches whole classes of bugs even before you write tests using PHPStan | ||
|
||
```bash | ||
./vendor/bin/phpstan analyse ./ --error-format=checkstyle | ||
``` | ||
|
||
### Asserts Security Vulnerabilities | ||
|
||
The [SensioLabs Security Checker](https://github.com/sensiolabs/security-checker) is a command line tool that checks | ||
if the application uses dependencies with known security vulnerabilitie. | ||
|
||
```bash | ||
./vendor/bin/security-checker security:check ./composer.lock | ||
``` | ||
|
||
### Improve global code quality using PHPCPD (Code duplication) & PHPMD (PHP Mess Detector) | ||
|
||
Detect overcomplicated expressions & Unused parameters, methods, properties | ||
|
||
```bash | ||
./vendor/bin/phpmd ./ text ./phpmd.xml --suffixes php,inc,test --exclude vendor,bin,tests | ||
``` | ||
|
||
Copy/Paste Detector | ||
|
||
```bash | ||
./vendor/bin/phpcpd ./ --names=*.php,*.inc,*.test --names-exclude=*.md --ansi --exclude=vendor --exclude=bin --exclude=tests | ||
``` | ||
|
||
### Checks compatibility with PHP interpreter versions | ||
|
||
```bash | ||
./vendor/bin/phpcf --target 7.3 --file-extensions php,inc,test ./ | ||
``` | ||
|
||
### Enforce code standards with git hooks | ||
|
||
Maintaining code quality by adding the custom post-commit hook to yours. | ||
|
||
```bash | ||
cat ./bin/post-commit >> ./.git/hooks/post-commit | ||
``` |
Oops, something went wrong.