Skip to content
This repository has been archived by the owner on Feb 13, 2022. It is now read-only.

Add Psalm to build checks and fix issues #77

Merged
merged 4 commits into from Jan 2, 2018

Conversation

muglug
Copy link
Contributor

@muglug muglug commented Jan 1, 2018

This PR adds checks by https://github.com/vimeo/psalm to the Travis build.

Fixes:

  • a call to array_key_exists($fieldName, $resolver) on a value that possibly could have been an ArrayAccess. I believe array_key_exists always returns false when it isn't passed an array
  • Ratchet\WebSocket\WsServer::disableVersion doesn't seem to exist
  • Siler\Diactoros\emit's second argument had no effect, so I removed it

This uses dev-master because of some changes I added to Psalm to get it to understand composer autoload files.

@codecov
Copy link

codecov bot commented Jan 1, 2018

Codecov Report

Merging #77 into master will increase coverage by 0.2%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff             @@
##             master      #77     +/-   ##
===========================================
+ Coverage     96.82%   97.02%   +0.2%     
  Complexity       41       41             
===========================================
  Files            19       19             
  Lines           472      471      -1     
===========================================
  Hits            457      457             
+ Misses           15       14      -1
Impacted Files Coverage Δ Complexity Δ
src/Siler.php 100% <ø> (ø) 0 <0> (ø) ⬇️
src/Graphql/SubscriptionManager.php 100% <ø> (ø) 15 <0> (ø) ⬇️
src/Twig/Twig.php 100% <ø> (ø) 0 <0> (ø) ⬇️
src/Http/Http.php 100% <ø> (ø) 0 <0> (ø) ⬇️
src/Http/Response.php 100% <ø> (ø) 0 <0> (ø) ⬇️
src/Jwt/Jwt.php 100% <100%> (ø) 0 <0> (ø) ⬇️
src/Diactoros/Diactoros.php 100% <100%> (ø) 0 <0> (ø) ⬇️
src/Graphql/Graphql.php 81.81% <100%> (+1.04%) 0 <0> (ø) ⬇️
src/Http/Request.php 100% <100%> (ø) 0 <0> (ø) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c8321c3...76a6c07. Read the comment docs.

@muglug
Copy link
Contributor Author

muglug commented Jan 1, 2018

Updated to undo const migration, after I added support for such in Psalm.

@leocavalcante
Copy link
Owner

Hi @muglug
Thanks for the contribution. Is this a replacement for PHPStan? Looks cool!
Can you fix code style issues? https://styleci.io/analyses/8AxpRl Please.
Cheers.

@muglug
Copy link
Contributor Author

muglug commented Jan 1, 2018

Is this a replacement for PHPStan

Certainly not a drop-in replacement. It's an alternative, started around the same time, with a slightly different approach.

@muglug
Copy link
Contributor Author

muglug commented Jan 1, 2018

Can you fix code style issues?

Fixed in 76a6c07!

@leocavalcante leocavalcante merged commit bb0879d into leocavalcante:master Jan 2, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants