PHP: Set private, protected, public in interface?

coding-style, interface, php

Solution

what is the point of a private function in an interface? declaring `public` is redundant.

from TFM:

`All methods declared in an interface must be public, this is the nature of an interface.`

http://php.net/manual/en/language.oop5.interfaces.php

Problem

when I look through GitHub most projects define methods in the interface this way: ``` interface ExampleInterface { function getId(); } ``` my question now is why it is bad style to define the method visability in the Interface: ``` interface ExampleInterface { public function getId(); } ``` It makes the interface more strict but isn't that whats an interface used for?

Original source