Cannot use ‘readonly’ as method modifier
Description
readonly is reserved for properties, and cannot be used with methods, constants, enumeration cases or static properties.
Example
<?php
class X {
private readonly function foo() {}
}
?>
Alternatives
- Remove the option from the method signature.