Skip to content

Feature: acquire ublaboo#12

Merged
f3l1x merged 1 commit intomasterfrom
feature/ublaboo
Apr 22, 2018
Merged

Feature: acquire ublaboo#12
f3l1x merged 1 commit intomasterfrom
feature/ublaboo

Conversation

@f3l1x
Copy link
Member

@f3l1x f3l1x commented Apr 11, 2018

Refactoring:

  • require PHP 7
  • update codesniffer
  • update ruleset (TRUE=>true)
  • use Travis CI stages
  • update readme
  • added @paveljanda to authors

@f3l1x f3l1x requested a review from paveljanda April 11, 2018 21:34
@f3l1x f3l1x added this to the v0.3 milestone Apr 11, 2018
@f3l1x f3l1x force-pushed the feature/ublaboo branch from e216312 to dc78a96 Compare April 11, 2018 21:36
@@ -0,0 +1,121 @@
<?php declare(strict_types = 1);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's based on slevomat/coding-standards. :(

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, ok.

Copy link

@Majkl578 Majkl578 Jun 17, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 */
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Personally, I don't like these short docblocks. In all project we use:

/**
 * @var string
 */
protected $delimiter;

And so does Symfony, Guzzle, etc.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We agreed with @paveljanda to write it both ways. We'll see in the future.

)
{
if (strpos($name, '.csv') === FALSE) {
$name = sprintf('%.csv', $name);
Copy link
Member

@paveljanda paveljanda Apr 12, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe $name = sprintf('%s.csv', $name); to make more clear?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, it's a bug.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

@paveljanda
Copy link
Member

We should also change FALSE to false, TRUE to true and NULL to null.. :)

Refactoring:
- require PHP 7
- update codesniffer
- update ruleset (TRUE=>true)
- use Travis CI stages
- update readme
- added @paveljanda to authors
@f3l1x
Copy link
Member Author

f3l1x commented Apr 19, 2018

I've fixed mentioned bug and convert TRUE=>true. Take a look @paveljanda.

@f3l1x f3l1x force-pushed the feature/ublaboo branch from dc78a96 to 6628d04 Compare April 19, 2018 05:43
* @phpcsSuppress SlevomatCodingStandard.TypeHints.TypeHintDeclaration.MissingParameterTypeHint
* @phpcsSuppress SlevomatCodingStandard.TypeHints.TypeHintDeclaration.MissingReturnTypeHint
*/
public function link($dest, array $params = []);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

string $dest?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

string $dest?

@@ -0,0 +1,121 @@
<?php declare(strict_types = 1);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, ok.

@paveljanda
Copy link
Member

My last comments, otherwise it's ok. :)

@f3l1x f3l1x merged commit e683422 into master Apr 22, 2018
@f3l1x f3l1x deleted the feature/ublaboo branch April 22, 2018 11:18
@f3l1x
Copy link
Member Author

f3l1x commented Apr 22, 2018

Welcome @paveljanda ;-)

This was referenced Apr 22, 2018
@paveljanda
Copy link
Member

:)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants