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

invalid phpdocs #119

Open
staabm opened this issue Apr 27, 2023 · 1 comment
Open

invalid phpdocs #119

staabm opened this issue Apr 27, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@staabm
Copy link
Owner

staabm commented Apr 27, 2023

these errors should be counted as invalid hppdoc

------ ---------------------------------------------------------------------- 
  Line   app/shared/controllers/KMCmsfrontendController.php                    
 ------ ---------------------------------------------------------------------- 
  8      PHPDoc tag @var has invalid value (DataLayerError|null;): Unexpected  
         token ";", expected TOKEN_HORIZONTAL_WS at offset 35                  
 ------ ---------------------------------------------------------------------- 

 ------ --------------------------------------------------------------------- 
  Line   lib/KunzmannRemoteOAuthRequest.php                                   
 ------ --------------------------------------------------------------------- 
  46     PHPDoc tag @return has invalid value (array('id' => string, 'email'  
         => string, 'firstname' => string, 'lastname' => string,              
         'authProvider' => string}): Unexpected token "(", expected           
         TOKEN_HORIZONTAL_WS at offset [24](https://github.com/complex-gmbh/kunzmann/actions/runs/4818214651/jobs/8579907342?pr=4056#step:16:25)                                     
 ------ ---------------------------------------------------------------------
@staabm
Copy link
Owner Author

staabm commented Oct 2, 2023

needs test first, to verify its not yet supported, similar to

function testInvalidPhpdocs():void
{
$analyzer = new BaselineAnalyzer(Baseline::forFile(__DIR__ . '/fixtures/invalid-phpdocs.neon'));
$result = $analyzer->analyze();
$this->assertSame(8, $result->overallErrors);
$this->assertSame(0, $result->classesComplexity);
$this->assertSame(0, $result->deprecations);
$this->assertSame(8, $result->invalidPhpdocs);
$this->assertSame(0, $result->unknownTypes);
$this->assertSame(0, $result->anonymousVariables);
$this->assertSame(0, $result->propertyTypeCoverage);
$this->assertSame(0, $result->paramTypeCoverage);
$this->assertSame(0, $result->returnTypeCoverage);
$this->assertSame(0, $result->unusedSymbols);
}

@staabm staabm added the enhancement New feature or request label Oct 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant