rspec/rules/S1784/php/rule.adoc

23 lines
516 B
Plaintext

Class methods may be defined as public, private, or protected. Methods declared without any explicit visibility keyword are defined as public. To prevent any misunderstanding, this visibility should always be explicitly declared.
== Noncompliant Code Example
----
function foo(){...}
----
== Compliant Solution
----
public function foo(){...}
----
ifdef::env-github,rspecator-view[]
'''
== Implementation Specification
(visible only on this page)
include::../message.adoc[]
endif::env-github,rspecator-view[]