owncloud / data_exporter

Export/Import for ownCloud user data
GNU General Public License v2.0
7 stars 5 forks source link

[Tests-Only] Adjust PHPdoc for phpstan #166

Closed phil-davis closed 4 years ago

phil-davis commented 4 years ago

Description

The latest phpstan 0.12.30 recognises that the PHPdoc for $application claims that it is always set. So last night it complained: https://drone.owncloud.com/owncloud/data_exporter/1190/2/5

php -d zend.enable_gc=0 vendor-bin/phpstan/vendor/bin/phpstan analyse --memory-limit=4G --configuration=./phpstan.neon --no-progress --level=5 appinfo lib
 ------ --------------------------------------------------------------------- 
  Line   appinfo/register_command.php                                         
 ------ --------------------------------------------------------------------- 
  10     Variable $application in isset() always exists and is not nullable.  
 ------ --------------------------------------------------------------------- 

 [ERROR] Found 1 error

Adjust the PHPdoc so it admits that the var could be null. That stops phpstan from complaining about the "unnecessary" isset() check.

How Has This Been Tested?

CI

Types of changes

Checklist:

codecov[bot] commented 4 years ago

Codecov Report

Merging #166 into master will not change coverage. The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master     #166   +/-   ##
=========================================
  Coverage     85.67%   85.67%           
  Complexity      235      235           
=========================================
  Files            36       36           
  Lines          1117     1117           
=========================================
  Hits            957      957           
  Misses          160      160           
Impacted Files Coverage Δ Complexity Δ
appinfo/register_command.php 0.00% <0.00%> (ø) 0.00 <0.00> (ø)

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 4222d64...b776feb. Read the comment docs.