-
Notifications
You must be signed in to change notification settings - Fork 356
Follow PSR2 rules #140
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
Closed
Closed
Follow PSR2 rules #140
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 |
---|---|---|
|
@@ -3,6 +3,7 @@ | |
!/bin/validate-json | ||
coverage | ||
.buildpath | ||
.php_cs.cache | ||
.project | ||
.settings | ||
composer.lock |
This file contains hidden or 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,14 @@ | ||
<?php | ||
|
||
use Symfony\CS\Config\Config; | ||
use Symfony\CS\FixerInterface; | ||
|
||
$config = Config::create() | ||
->level(Symfony\CS\FixerInterface::PSR2_LEVEL) | ||
->setUsingCache(true) | ||
->setUsingLinter(false); | ||
|
||
$finder = $config->getFinder() | ||
->in(__DIR__); | ||
|
||
return $config; |
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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 |
---|---|---|
|
@@ -14,4 +14,4 @@ | |
*/ | ||
class InvalidArgumentException extends \InvalidArgumentException | ||
{ | ||
} | ||
} |
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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 |
---|---|---|
|
@@ -14,4 +14,4 @@ | |
*/ | ||
class ResourceNotFoundException extends \RuntimeException | ||
{ | ||
} | ||
} |
This file contains hidden or 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 |
---|---|---|
|
@@ -14,4 +14,4 @@ | |
*/ | ||
class UriResolverException extends \RuntimeException | ||
{ | ||
} | ||
} |
This file contains hidden or 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 |
---|---|---|
|
@@ -76,4 +76,4 @@ protected function fetchContentType($response) | |
|
||
return false; | ||
} | ||
} | ||
} |
This file contains hidden or 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 |
---|---|---|
|
@@ -14,8 +14,8 @@ | |
|
||
/** | ||
* Tries to retrieve JSON schemas from a URI using file_get_contents() | ||
* | ||
* @author Sander Coolen <[email protected]> | ||
* | ||
* @author Sander Coolen <[email protected]> | ||
*/ | ||
class FileGetContents extends AbstractRetriever | ||
{ | ||
|
This file contains hidden or 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 |
---|---|---|
|
@@ -52,4 +52,4 @@ public function retrieve($uri) | |
|
||
return $this->schemas[$uri]; | ||
} | ||
} | ||
} |
This file contains hidden or 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 |
---|---|---|
|
@@ -11,8 +11,8 @@ | |
|
||
/** | ||
* Interface for URI retrievers | ||
* | ||
* @author Sander Coolen <[email protected]> | ||
* | ||
* @author Sander Coolen <[email protected]> | ||
*/ | ||
interface UriRetrieverInterface | ||
{ | ||
|
@@ -29,4 +29,4 @@ public function retrieve($uri); | |
* @return string | ||
*/ | ||
public function getContentType(); | ||
} | ||
} |
This file contains hidden or 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 |
---|---|---|
|
@@ -13,16 +13,16 @@ | |
|
||
/** | ||
* Resolves JSON Schema URIs | ||
* | ||
* @author Sander Coolen <[email protected]> | ||
* | ||
* @author Sander Coolen <[email protected]> | ||
*/ | ||
class UriResolver | ||
{ | ||
/** | ||
* Parses a URI into five main components | ||
* | ||
* | ||
* @param string $uri | ||
* @return array | ||
* @return array | ||
*/ | ||
public function parse($uri) | ||
{ | ||
|
@@ -35,7 +35,7 @@ public function parse($uri) | |
'authority' => $match[4], | ||
'path' => $match[5] | ||
); | ||
} | ||
} | ||
if (7 < count($match)) { | ||
$components['query'] = $match[7]; | ||
} | ||
|
@@ -48,13 +48,13 @@ public function parse($uri) | |
|
||
/** | ||
* Builds a URI based on n array with the main components | ||
* | ||
* | ||
* @param array $components | ||
* @return string | ||
* @return string | ||
*/ | ||
public function generate(array $components) | ||
{ | ||
$uri = $components['scheme'] . '://' | ||
$uri = $components['scheme'] . '://' | ||
. $components['authority'] | ||
. $components['path']; | ||
|
||
|
@@ -70,7 +70,7 @@ public function generate(array $components) | |
|
||
/** | ||
* Resolves a URI | ||
* | ||
* | ||
* @param string $uri Absolute or relative | ||
* @param string $baseUri Optional base URI | ||
* @return string Absolute URI | ||
|
@@ -146,7 +146,7 @@ private static function normalizePath($path) | |
|
||
/** | ||
* @param string $uri | ||
* @return boolean | ||
* @return boolean | ||
*/ | ||
public function isValid($uri) | ||
{ | ||
|
This file contains hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There they are: #132 (comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't get it... it's ok for you to add that missing braces or not ?