Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

removed config #11

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/.gitattributes export-ignore
/.gitignore export-ignore
/.github/ export-ignore
/.styleci.yml export-ignore
/.scrutinizer.yml export-ignore
/.sensiolabs.yml export-ignore
/nitpick.json export-ignore
/composer.lock export-ignore
/tests/ export-ignore
/phpunit.xml export-ignore
/phpstan.neon export-ignore
/phpcs.xml export-ignore
43 changes: 18 additions & 25 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: PHP Composer
name: tests

on:
push:
Expand All @@ -8,29 +8,22 @@ on:

jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
php-versions: ['7.0', '7.1', '7.2', '7.3', '7.4']
name: PHP ${{ matrix.php-versions }} Test
steps:
- uses: actions/checkout@v2

- name: Validate composer.json and composer.lock
run: composer validate --strict

- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v2
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-

- name: Install dependencies
run: composer install --prefer-dist --no-progress --no-suggest

# Add a test script to composer.json, for instance: "test": "vendor/bin/phpunit"
# Docs: https://getcomposer.org/doc/articles/scripts.md

# - name: Run test suite
# run: composer run-script test
- uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
coverage: xdebug
- name: Validate composer.json and composer.lock
run: composer validate
- name: Install dependencies
if: steps.composer-cache.outputs.cache-hit != 'true'
run: composer install --prefer-dist --no-progress --no-suggest
- name: Run test suite
run: vendor/bin/phpunit --coverage-clover tests/logs/clover.xml
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
/phpunit.xml
/vendor/
*.cache

.phpcs-cache
14 changes: 0 additions & 14 deletions .scrutinizer.yml

This file was deleted.

3 changes: 0 additions & 3 deletions .sensiolabs.yml

This file was deleted.

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

This file was deleted.

3 changes: 1 addition & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@
"squizlabs/php_codesniffer": "~2.7",
"sebastian/phpcpd": "*",
"phploc/phploc": "*",
"pdepend/pdepend" : "^2.2.4",
"sensiolabs/security-checker": "^4.0.0"
"pdepend/pdepend" : "^2.2.4"
},
"autoload": {
"psr-4": {
Expand Down
1 change: 0 additions & 1 deletion phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
syntaxCheck="false"
bootstrap="vendor/autoload.php"
>
<testsuites>
Expand Down
4 changes: 2 additions & 2 deletions src/Geography/Latitude.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ class Latitude extends Real
/**
* Returns a new Latitude object.
*
* @param float $value
* @param float|string $value
*
* @throws InvalidNativeArgumentException
*/
public function __construct(float $value)
public function __construct($value)
{
// normalization process through Coordinate object
$coordinate = new BaseCoordinate([$value, 0]);
Expand Down
4 changes: 2 additions & 2 deletions src/Geography/Longitude.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ class Longitude extends Real
/**
* Returns a new Longitude object.
*
* @param float $value
* @param float|string $value
*
* @throws InvalidNativeArgumentException
*/
public function __construct(float $value)
public function __construct($value)
{
// normalization process through Coordinate object
$coordinate = new BaseCoordinate([0, $value]);
Expand Down
2 changes: 1 addition & 1 deletion tests/Number/ComplexTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ public function testDifferentLocaleWithDifferentDecimalCharacter()
$this->testGetIm();
$this->testGetModulus();
$this->testGetArgument();
$this->testToString('2,034 - 1,4i');
$this->testToString('2.034 - 1.4i');
$this->testNotSameValue();
}
}
2 changes: 1 addition & 1 deletion tests/Number/RealTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,6 @@ public function testDifferentLocaleWithDifferentDecimalCharacter()
$this->testSameValueAs();
$this->testToInteger();
$this->testToNatural();
$this->testToString('0,7');
$this->testToString('0.7');
}
}