is there any way to set the default case?

WE don't use camel case on our project and when PHP storm generates code it always uses that (at least in the way I have it setup).

I've seen the prefernces>format section but couldn't see anything about preffered case.

We use underscore_case


Comment actions Permalink

Hi there,

What functionality (what generated code)?

Comment actions Permalink

when I generate a getter or setter for a field it returns it in the below format. I know camel case is pretty common but we have our standards as under_score_case. So genrating the function then going after wards to set the case seems a bit redudant. I assumed that I could set our case in the same way we can set whether we use tabs or spaces and other formatting choices. Is there a way to do this?

     * @return int
    public function getTargetQuantity()
        return $this->target_quantity;

Comment actions Permalink

Currently it's not possible. -- please vote/comment/etc.


I could only suggest to install CamelCase plugin to help you with switching between different naming styles after code is generated (a bit faster than editing names manually).

Another idea is to create some custom Live Template and use it to generate getters/setters instead of built-in functionality (not so convenient for sure, but possibly better than nothing).


Please sign in to leave a comment.