File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -897,6 +897,30 @@ class Example
897897}
898898```
899899
900+ ## 4.10 Interface properties
901+
902+ Abstract roperties may be defined in interfaces or abstract classes, but are required to
903+ specify if they must support ` get ` operations, ` set ` operations, or both.
904+
905+ * The operation block MUST be on the same line as the property.
906+ * There MUST be a single space between the property name and the operation block ` {} ` .
907+ * There MUST be a single space after the opening ` { ` .
908+ * There MUST be a single space before the closing ` } ` ;
909+ * There MUST NOT be a space between the operation and its required semicolon.
910+ * If multiple operations are specified, they MUST be separated by a single space.
911+ * The ` get ` operation MUST be listed before the ` set ` operation.
912+
913+ ``` php
914+ interface Example
915+ {
916+ public string $readable { get; }
917+
918+ public string $writeable { set; }
919+
920+ public string $both { get; set; }
921+ }
922+ ```
923+
900924## 5. Control Structures
901925
902926The general style rules for control structures are as follows:
You can’t perform that action at this time.
0 commit comments