-
-
Notifications
You must be signed in to change notification settings - Fork 342
Update PHP_CodeSniffer #328
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
Merged
Merged
Changes from 5 commits
Commits
Show all changes
6 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 |
---|---|---|
|
@@ -8,3 +8,7 @@ logs | |
|
||
# ignore test results | ||
phpunit-test-results | ||
|
||
*.log | ||
|
||
coverage.xml |
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 |
---|---|---|
|
@@ -27,7 +27,7 @@ To setup the Test Parse Server: | |
* Run `npm install` from the project root to download the server and it's dependencies. | ||
* When you're ready to run tests use `npm start` from the project root to boot up the test server. | ||
|
||
The embedded test server utilizes this [parse server test] project. | ||
The embedded test server utilizes this [parse server test] project. | ||
It's setup with the appropriate configuration to run the php sdk test suite. | ||
Additionally it handles setting up mongodb for the server. | ||
|
||
|
@@ -65,6 +65,18 @@ You should now be able to execute the tests, from project root folder: | |
|
||
./vendor/bin/phpunit | ||
|
||
You may also run tests directly using phpunit as follows: | ||
|
||
npm test | ||
|
||
Make sure your code is linted with phpcs (PSR-2 Coding Style) | ||
|
||
npm run lint | ||
|
||
You can automatically fix lint errors with phpcbf | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. And if we can add a colon here at the end of this statement too that would be fantastic. |
||
|
||
npm run lint:fix | ||
|
||
The test suite is setup for code coverage if you have [XDebug] installed and setup. | ||
Coverage is outputted as text and as html in the phpunit-test-results/ directory within the project root. | ||
|
||
|
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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<ruleset name="phpcsignore"> | ||
<description>PHPCS Ignore Rule</description> | ||
<rule ref="PSR2" /> | ||
<rule ref="PSR1.Files.SideEffects.FoundWithSymbols"> | ||
<severity>0</severity> | ||
</rule> | ||
<rule ref="PSR2.Methods.MethodDeclaration"> | ||
<severity>0</severity> | ||
</rule> | ||
<rule ref="PSR2.Classes.PropertyDeclaration.Underscore"> | ||
<severity>0</severity> | ||
</rule> | ||
</ruleset> |
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.
I figure just so people aren't wondering about why we would enforce PSR-2 we should make this a link. You can use http://www.php-fig.org/psr/psr-2/, which is the style guide published by the framework interop group.
Making it...
Make sure your code is linted with phpcs (PSR-2 Coding Style)
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.
And if we can add a colon after this statement, same as the line above it: