Jump to content

Dev center inserting functions as 'static public' instead of 'public static'

Go to solution Solved by Daniel F,

Recommended Posts

Just want to put this bug in your ears, especially with the code checker now in place and the possibility it will get strict along these lines in the future. Apologies if this has already been noted recently (or way in the past) - have not looked too deeply here.

I've noticed more than a few instances of functions defined as static public instead of public static in code; mine and yours. Your source files have a couple (4?), your apps more, but I was more puzzled why my app and plugin hooks had a bunch as this isn't a thing I normally do.

As an example, a hook on baseCss() is routinely static public in the hook. So I looked and your method is clearly public static. So to test I just opened up the dev center and added a baseCss() hook, and it appends into the hook as static public.

I've probably never given this a moment's notice but with the checker forcing us to really work over the syntax it's kinda all jumps out now. Yes, I know, you are allowed to do this, it's 
"fine", but it's also not PSR kosher and if you start forcing this level of strictness through with the checker - well, at least give everyone fair warning before turning that on.

I'm changing them as I find them but having the dev center push these functions into the hooks correctly would be nice to have eventually.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...