[CCA Standards] Was missfällt an PSR-1 und PSR-2 :: static Keyword

Tristan Lins tristan.lins at bit3.de
Fr Mai 2 10:23:37 CEST 2014


[PSR-2] 1. Overview #1

> Visibility MUST be declared ... abstract and final MUST be declared
> before the visibility ...; static MUST be declared after the
> visibility.

Ich bin der Meinung, dass auch "static" vor die visibility gehört.

Also

> static public function ...

anstatt

> public static function ...

Begründung: Das "static" Keyword ist in den meisten Fällen wichtiger als
die Visibility und sollte deshalb vorne stehen, so dass man es zuerst
ließt. So lassen sich schneller static von non-static Properties/Methods
unterscheiden.

-----

Duplicate: [PSR-2] 4.5. abstract, final, and static

> When present, the static declaration MUST come after the visibility
> declaration.

-- 
Tristan Lins - Inhaber, Softwareentwickler
bit3 UG (haftungsbeschränkt)
Im Coenen Palais · Hofstr. 272 · 56077 Koblenz
info at bit3.de · http://bit3.de · 0261-45093253
Amtsgericht Koblenz, HRB 23386


More information about the Standards mailing list