%s function %s::%s() cannot be declared private

Description

A method may be private, as in only available to current class, or abstract, as in always redefined in a child class, but not both at the same time.

These two properties are mutually exclusive.

Example

<?php

class X {
     private abstract function foo() ;
}

?>

Literal Examples

  • abstract function X::foo() cannot be declared private

Solutions

  • Make the method protected or public.

  • Remove the abstract keyword.