Skip to content

Fix lint issues #125

@repejota

Description

@repejota
$ make lint
find src test examples spec -name *.php -exec php -l {} \;
No syntax errors detected in src/Nats/Connection.php
No syntax errors detected in src/Nats/ServerInfo.php
No syntax errors detected in src/Nats/EncodedConnection.php
No syntax errors detected in src/Nats/Php71RandomGenerator.php
No syntax errors detected in src/Nats/Encoders/PHPEncoder.php
No syntax errors detected in src/Nats/Encoders/Encoder.php
No syntax errors detected in src/Nats/Encoders/JSONEncoder.php
No syntax errors detected in src/Nats/Encoders/YAMLEncoder.php
No syntax errors detected in src/Nats/Exception.php
No syntax errors detected in src/Nats/Message.php
No syntax errors detected in src/Nats/ConnectionOptions.php
No syntax errors detected in test/ConnectionTest.php
No syntax errors detected in test/MessageTest.php
No syntax errors detected in test/ConnectionOptionsTest.php
No syntax errors detected in test/Encoders/YAMLEncoderTest.php
No syntax errors detected in test/Encoders/JSONEncoderTest.php
No syntax errors detected in test/Encoders/PHPEncoderTest.php
No syntax errors detected in test/EncodedConnectionTest.php
No syntax errors detected in examples/simpleclient/main.php
No syntax errors detected in examples/connectauth.php
No syntax errors detected in examples/connect.php
No syntax errors detected in examples/ping.php
No syntax errors detected in examples/reqres/jsonencodedreqres.php
No syntax errors detected in examples/reqres/request.php
No syntax errors detected in examples/reqres/reqres.php
No syntax errors detected in examples/pubsub/sub.php
No syntax errors detected in examples/pubsub/jsonencodedpubsub.php
No syntax errors detected in examples/pubsub/pub.php
No syntax errors detected in examples/pubsub/pubsub.php
No syntax errors detected in examples/connectauthtoken.php
No syntax errors detected in spec/Nats/ServerInfoSpec.php
No syntax errors detected in spec/Nats/ConnectionOptionsSpec.php
No syntax errors detected in spec/Nats/MessageSpec.php
No syntax errors detected in spec/Nats/ConnectionSpec.php
./phpcs.phar --standard=PSR2 --colors -w -s --warning-severity=0 src test examples


FILE: /Users/raul/Projects/phpnats/src/Nats/Connection.php
---------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 10 ERRORS AND 1 WARNING AFFECTING 4 LINES
---------------------------------------------------------------------------------------------------------------------------------------------------------
 448 | ERROR   | [x] Multi-line function call not indented correctly; expected 8 spaces but found 12 (PSR2.Methods.FunctionCallSignature.Indent)
 448 | ERROR   | [x] Only one argument is allowed per line in a multi-line function call (PSR2.Methods.FunctionCallSignature.MultipleArguments)
 448 | ERROR   | [x] Only one argument is allowed per line in a multi-line function call (PSR2.Methods.FunctionCallSignature.MultipleArguments)
 448 | ERROR   | [x] Closing parenthesis of a multi-line function call must be on a line by itself
     |         |     (PSR2.Methods.FunctionCallSignature.CloseBracketLine)
 462 | ERROR   | [x] Multi-line function call not indented correctly; expected 16 spaces but found 20 (PSR2.Methods.FunctionCallSignature.Indent)
 462 | ERROR   | [x] Closing parenthesis of a multi-line function call must be on a line by itself
     |         |     (PSR2.Methods.FunctionCallSignature.CloseBracketLine)
 465 | ERROR   | [x] Multi-line function call not indented correctly; expected 16 spaces but found 24 (PSR2.Methods.FunctionCallSignature.Indent)
 465 | ERROR   | [x] Only one argument is allowed per line in a multi-line function call (PSR2.Methods.FunctionCallSignature.MultipleArguments)
 465 | ERROR   | [x] Only one argument is allowed per line in a multi-line function call (PSR2.Methods.FunctionCallSignature.MultipleArguments)
 465 | ERROR   | [x] Closing parenthesis of a multi-line function call must be on a line by itself
     |         |     (PSR2.Methods.FunctionCallSignature.CloseBracketLine)
 606 | WARNING | [ ] Line exceeds 120 characters; contains 136 characters (Generic.Files.LineLength.TooLong)
---------------------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 10 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------------------------------------------------------------


FILE: /Users/raul/Projects/phpnats/test/ConnectionOptionsTest.php
--------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 3 WARNINGS AFFECTING 3 LINES
--------------------------------------------------------------------------------------------------------
 21 | WARNING | Line exceeds 120 characters; contains 184 characters
    |         | (Generic.Files.LineLength.TooLong)
 43 | WARNING | Line exceeds 120 characters; contains 165 characters
    |         | (Generic.Files.LineLength.TooLong)
 66 | WARNING | Line exceeds 120 characters; contains 146 characters
    |         | (Generic.Files.LineLength.TooLong)
--------------------------------------------------------------------------------------------------------

Time: 221ms; Memory: 8Mb

make: *** [lint-psr2] Error 2

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions