OrganizationEntityProvider does not seem to conform to the naming convention (Utils?$).
This check examines a number of code elements and verifies that they conform
to the given naming conventions.
You can set conventions for local variables, abstract classes, utility classes, constant, properties,
methods, parameters, interfaces, classes, exceptions and special methods.
Loading history...
15
{
16
/**
17
* @param array $params
18
*
19
* @return Organization
20
*/
21
public static function createEntityWithRandomData(array $params = array())
Since createNewRelations() is declared private, calling it with static will lead to errors in possible sub-classes. You can either use self, or increase the visibility of createNewRelations() to at least protected.
Let’s assume you have a class which uses late-static binding:
The code above will run fine in your PHP runtime. However, if you now create a
sub-class and call the getSomeVariable() on that sub-class, you will receive
a runtime error:
classYourSubClassextendsYourClass{privatestaticfunctiongetTemperature(){return"-182 °C";}}printYourSubClass::getSomeVariable();// Will cause an access error.
In the case above, it makes sense to update SomeClass to use self instead:
This check examines a number of code elements and verifies that they conform to the given naming conventions.
You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.