Method %s::%s() must be static¶
Description¶
The magic methods __set_state
and __callStatic
must be static. These are the only magic methods that must be static.
Example¶
<?php
class X {
function __set_state($state) {}
}
?>
Solutions¶
Add
static
to the method signature, and remove all$this
in its body.Remove the methods.