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
staticto the method signature, and remove all$thisin its body.Remove the methods.