[Neos] CGL Questions

Aske Ertmann aske at moc.net
Mon Oct 14 09:30:48 CEST 2013


Hey Rens

Thanks for taking the initiative to get this done, really something I'm missing personally.

> * Usage of functions in foreach / if / for / switch statements
> Do we allow this? For example:
> 
> 	foreach ($this->getSomeArray() as $v) { ….
Good question, personally I don't mind. Maybe we need to make a doodle about it?

> 
> * Do we allow empty catch statements?
> Example:
> 
> 	} catch (\Exception $e) { // just some comments or nothing }}
This one annoys me with the current TYPO3 CS rules, so I'd like to see it allowing catch(\Exception $e) {}. Question is if it should allow the closing bracket on the next line also or not.

> 
> * How do we format use statements?
> Will we use 1 use statement like:
> 
> 	use	Class 1,
> 		Class 2;
> 
> Or do we add all use statements on a new line?
IIRC we decided not to allow comma separated use statements the last time it was brought up. Reasoning was that most IDE's don't support that when importing automatically so to keep it consistent all lines should have their own use statement.

Regards,
Aske


More information about the Neos mailing list