yii2-rest-doc icon indicating copy to clipboard operation
yii2-rest-doc copied to clipboard

php 7 codestyle use

Open des1roer opened this issue 8 years ago • 4 comments

when use aka php7

use common/models{
     Class1, Class2
}; 

fatal error

Parse Error: Syntax error, unexpected '{', expecting T_STRING on line 9 Exception 'yii\base\InvalidParamException' with message 'File /var/www/html/frontend/modules/api/modules/v3/controllers/RecommendationController.php includes more then one class'

des1roer avatar Oct 03 '17 09:10 des1roer

Is it legal to have some classes in one file according yii2 standards?

pahanini avatar Oct 03 '17 09:10 pahanini

yes. in php 7 u can use multiple uses https://www.tutorialspoint.com/php7/php7_use_statement.htm

des1roer avatar Oct 04 '17 09:10 des1roer

https://github.com/phpDocumentor/Reflection/issues/125

pahanini avatar Feb 04 '18 05:02 pahanini

@pahanini https://github.com/phpDocumentor/Reflection/issues/125#issuecomment-364738648

sdlins avatar Apr 08 '19 18:04 sdlins