1 | <?php |
||
12 | trait DocsGeneratorTrait |
||
13 | { |
||
14 | |||
15 | /** |
||
16 | * @return mixed |
||
17 | */ |
||
18 | private function getFullApiUrl($type) |
||
22 | |||
23 | /** |
||
24 | * @return mixed |
||
25 | */ |
||
26 | private function getAppUrl() |
||
27 | { |
||
28 | return $this->config->get('app.url'); |
||
|
|||
29 | } |
||
30 | |||
31 | /** |
||
32 | * @return mixed |
||
33 | */ |
||
34 | private function getHtmlPath() |
||
38 | |||
39 | /** |
||
40 | * Where to generate the new documentation. |
||
41 | * |
||
42 | * @return string |
||
43 | */ |
||
44 | private function getDocumentationPath($type) |
||
48 | |||
49 | /** |
||
50 | * @return string |
||
51 | */ |
||
52 | private function getJsonFilePath($type) |
||
56 | |||
57 | /** |
||
58 | * @return string |
||
59 | */ |
||
60 | private function getConfigFile() |
||
64 | |||
65 | /** |
||
66 | * @return mixed |
||
67 | */ |
||
68 | private function getTypeConfig() |
||
72 | |||
73 | /** |
||
74 | * @return mixed |
||
75 | */ |
||
76 | private function getExecutable() |
||
80 | |||
81 | /** |
||
82 | * @param $type |
||
83 | * |
||
84 | * @return mixed |
||
85 | */ |
||
86 | private function getUrl($type) |
||
92 | |||
93 | /** |
||
94 | * @param $type |
||
95 | * |
||
96 | * @return string |
||
97 | */ |
||
98 | private function getEndpointFiles($type) |
||
112 | |||
113 | |||
114 | /** |
||
115 | * @param $templateKey |
||
116 | * @param $value |
||
117 | */ |
||
118 | private function replace($templateKey, $value) |
||
122 | |||
123 | /** |
||
124 | * @param $minutes |
||
125 | * |
||
126 | * @return string |
||
127 | */ |
||
128 | private function minutesToTimeDisplay($minutes) |
||
137 | |||
138 | } |
||
139 |
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion: