Conversation
| @@ -0,0 +1,121 @@ | |||
| <?php declare(strict_types = 1); | |||
There was a problem hiding this comment.
What are the conventions in opensource php community? In Gamee, Monday Factory, we use:
<?php
declare(strict_types=1);So does for example consistence/consistence.
There was a problem hiding this comment.
It's based on slevomat/coding-standards. :(
There was a problem hiding this comment.
It's based on slevomat/coding-standards. :(
Just for reference, this statement is incorrect - Slevomat CS is only a set of rules and this sniff is configurable. Doctrine also uses Slevomat CS with no spaces around = and two newlines after open tag:
https://github.com/doctrine/coding-standard/blob/0469c18a1a4724c278f2879c0dd7b1fa860b52de/lib/Doctrine/ruleset.xml#L192-L208
| class CSVResponse implements IResponse | ||
| { | ||
|
|
||
| /** @var string */ |
There was a problem hiding this comment.
Personally, I don't like these short docblocks. In all project we use:
/**
* @var string
*/
protected $delimiter;
And so does Symfony, Guzzle, etc.
There was a problem hiding this comment.
We agreed with @paveljanda to write it both ways. We'll see in the future.
src/Response/CSVResponse.php
Outdated
| ) | ||
| { | ||
| if (strpos($name, '.csv') === FALSE) { | ||
| $name = sprintf('%.csv', $name); |
There was a problem hiding this comment.
Maybe $name = sprintf('%s.csv', $name); to make more clear?
|
We should also change |
Refactoring: - require PHP 7 - update codesniffer - update ruleset (TRUE=>true) - use Travis CI stages - update readme - added @paveljanda to authors
|
I've fixed mentioned bug and convert TRUE=>true. Take a look @paveljanda. |
| * @phpcsSuppress SlevomatCodingStandard.TypeHints.TypeHintDeclaration.MissingParameterTypeHint | ||
| * @phpcsSuppress SlevomatCodingStandard.TypeHints.TypeHintDeclaration.MissingReturnTypeHint | ||
| */ | ||
| public function link($dest, array $params = []); |
There was a problem hiding this comment.
I would like, but it's not compatible with Nette LinkGenerator, thus there is phpcsSupress ;-)
| * @phpcsSuppress SlevomatCodingStandard.TypeHints.TypeHintDeclaration.MissingParameterTypeHint | ||
| */ | ||
| public function link($dest, array $params = []) | ||
| public function link($dest, array $params = []): string |
| @@ -0,0 +1,121 @@ | |||
| <?php declare(strict_types = 1); | |||
|
My last comments, otherwise it's ok. :) |
|
Welcome @paveljanda ;-) |
|
:) |
Refactoring: