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

Feature/new coding style #36

Merged
merged 3 commits into from Oct 10, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Expand Up @@ -10,3 +10,6 @@ bin

# Vim
.*.swp

# development stuff
.php_cs.cache
12 changes: 12 additions & 0 deletions .php_cs.dist
@@ -0,0 +1,12 @@
<?php

$config = PhpCsFixer\Config::create();
$config->getFinder()
->exclude('vendor')
->in(__DIR__);
$config->setRules([
'@PSR1' => true,
'@Symfony' =>true
]);

return $config;
9 changes: 4 additions & 5 deletions .travis.yml
Expand Up @@ -13,13 +13,12 @@ addons:
# required for php7.3snapshot
- libzip4

before_script:
- rm -f ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini
- composer install

script:
- ./bin/phpunit --configuration tests/phpunit.xml.dist --coverage-clover=coverage.xml
- ./bin/sabre-cs-fixer fix lib/ --dry-run --diff

before_script:
- rm -f ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini
- composer install

after_success:
- bash <(curl -s https://codecov.io/bash)
1 change: 0 additions & 1 deletion composer.json
Expand Up @@ -37,7 +37,6 @@
}
},
"require-dev": {
"sabre/cs": "~1.0.0",
"phpunit/phpunit" : "^6.0"
},
"config" : {
Expand Down
10 changes: 6 additions & 4 deletions lib/InvalidUriException.php
@@ -1,9 +1,11 @@
<?php declare (strict_types=1);
<?php

declare(strict_types=1);

namespace Sabre\Uri;

/**
* Invalid Uri
* Invalid Uri.
*
* This is thrown when an attempt was made to use Sabre\Uri parse a uri that
* it could not.
Expand All @@ -12,6 +14,6 @@
* @author Evert Pot (https://evertpot.com/)
* @license http://sabre.io/license/
*/
class InvalidUriException extends \Exception {

class InvalidUriException extends \Exception
{
}
11 changes: 6 additions & 5 deletions lib/Version.php
@@ -1,4 +1,6 @@
<?php declare (strict_types=1);
<?php

declare(strict_types=1);

namespace Sabre\Uri;

Expand All @@ -9,11 +11,10 @@
* @author Evert Pot (http://evertpot.com/)
* @license http://sabre.io/license/
*/
class Version {

class Version
{
/**
* Full version number
* Full version number.
*/
const VERSION = '2.1.1';

}