Skip to content
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

DX: more specific @param types #4235

Merged
merged 1 commit into from
Feb 3, 2019
Merged

DX: more specific @param types #4235

merged 1 commit into from
Feb 3, 2019

Conversation

kubawerlos
Copy link
Contributor

A source was this part of the PHPStan report:

 ------ ------------------------------------------------------------------ 
  Line   Fixer/Import/SingleLineAfterImportsFixer.php                      
 ------ ------------------------------------------------------------------ 
  86     Binary operation "+=" between array and int results in an error.  
 ------ ------------------------------------------------------------------ 

 ------ ---------------------------------------------------------------- 
  Line   Fixer/LanguageConstruct/NoUnsetOnPropertyFixer.php              
 ------ ---------------------------------------------------------------- 
  204    Binary operation "+" between string and 1 results in an error.  
  222    Binary operation "+" between string and 1 results in an error.  
 ------ ---------------------------------------------------------------- 

@@ -64,7 +64,7 @@ public function getClassyElements()
*
* @param bool $perNamespace Return namespace uses per namespace
*
* @return array|array[]
* @return int[]|int[][]
Copy link
Contributor

Choose a reason for hiding this comment

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

the int[] is really an empty array here I think, than again int[] might be a better fit

@SpacePossum SpacePossum added this to the 2.12.6 milestone Jan 4, 2019
@keradus keradus modified the milestones: 2.12.6, 2.12.7 Jan 4, 2019
@keradus
Copy link
Member

keradus commented Feb 3, 2019

Thank you @kubawerlos.

@keradus keradus merged commit a583a14 into PHP-CS-Fixer:2.12 Feb 3, 2019
keradus added a commit that referenced this pull request Feb 3, 2019
This PR was merged into the 2.12 branch.

Discussion
----------

DX: more specific @param types

A source was this part of the PHPStan report:
```
 ------ ------------------------------------------------------------------
  Line   Fixer/Import/SingleLineAfterImportsFixer.php
 ------ ------------------------------------------------------------------
  86     Binary operation "+=" between array and int results in an error.
 ------ ------------------------------------------------------------------

 ------ ----------------------------------------------------------------
  Line   Fixer/LanguageConstruct/NoUnsetOnPropertyFixer.php
 ------ ----------------------------------------------------------------
  204    Binary operation "+" between string and 1 results in an error.
  222    Binary operation "+" between string and 1 results in an error.
 ------ ----------------------------------------------------------------
```

Commits
-------

a583a14 DX: more specific @param types
@kubawerlos kubawerlos deleted the dx-more-specific-param-types branch February 3, 2019 14:43
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