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: jsor/geokit
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.3.0
Choose a base ref
...
head repository: jsor/geokit
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref
Loading
44 changes: 44 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: CI

on:
push:
pull_request:

jobs:
tests:
name: Tests (PHP ${{ matrix.php }})
runs-on: ubuntu-latest
strategy:
matrix:
include:
- php: '7.4'
- php: '8.0'
code-coverage: 'yes'
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: pcov

- name: Install dependencies
run: composer update --no-interaction --no-progress --prefer-dist

- name: Run tests
if: matrix.code-coverage != 'yes'
run: vendor/bin/phpunit --coverage-text

- name: Run tests with code coverage
if: matrix.code-coverage == 'yes'
run: vendor/bin/phpunit --coverage-clover build/logs/clover.xml

- name: Upload coverage results to Coveralls
if: matrix.code-coverage == 'yes'
env:
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
composer global require php-coveralls/php-coveralls
php-coveralls -v
51 changes: 51 additions & 0 deletions .github/workflows/static.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Static analysis

on:
push:
branches:
- master
pull_request:

jobs:
php-cs-fixer:
name: PHP-CS-Fixer
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'
coverage: none
extensions: mbstring
tools: "cs2pr"

- name: Install dependencies
run: composer update --no-interaction --no-progress --prefer-dist

- name: Run PHP CS Fixer
run: vendor/bin/php-cs-fixer fix --dry-run --format=checkstyle | cs2pr

psalm:
name: Psalm
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'
coverage: none
extensions: mbstring, intl

- name: Install dependencies
run: composer update --no-interaction --no-progress --prefer-dist

- name: Run Psalm
run: vendor/bin/psalm --no-progress --output-format=github
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
build/
vendor/
.php-cs-fixer.php
.php-cs-fixer.cache
.phpunit.result.cache
composer.lock
composer.phar
phpunit.xml
vendor/
34 changes: 34 additions & 0 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?php

$finder = (new PhpCsFixer\Finder())
->in(__DIR__);

return (new PhpCsFixer\Config())
->setRiskyAllowed(true)
->setRules([
'@Symfony' => true,
'@Symfony:risky' => true,
'array_syntax' => [
'syntax' => 'short',
],
'concat_space' => [
'spacing' => 'one',
],
'global_namespace_import' => [
'import_classes' => true,
'import_constants' => null,
'import_functions' => true,
],
'native_constant_invocation' => [
'fix_built_in' => false,
],
'ordered_imports' => [
'imports_order' => [
'class',
'function',
'const',
],
],
'single_line_throw' => false,
])
->setFinder($finder);
22 changes: 0 additions & 22 deletions .php_cs

This file was deleted.

11 changes: 0 additions & 11 deletions .scrutinizer.yml

This file was deleted.

35 changes: 0 additions & 35 deletions .travis.yml

This file was deleted.

12 changes: 7 additions & 5 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
Copyright (c) 2011-2016 Jan Sorgalla
MIT License

Copyright (c) 2011-2022 Jan Sorgalla

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:
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.
@@ -15,5 +17,5 @@ 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.
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Loading