1 | <?php |
||
10 | trait InteractsWithAssignments |
||
11 | { |
||
12 | /** |
||
13 | * Ask assignment. |
||
14 | */ |
||
15 | protected function askAssignment() |
||
23 | |||
24 | /** |
||
25 | * Current assignment |
||
26 | */ |
||
27 | protected function currentAssignment() { |
||
36 | |||
37 | /** |
||
38 | * Find assignment by name. |
||
39 | * |
||
40 | * @param $name |
||
41 | * @return null |
||
42 | */ |
||
43 | protected function findAssignmentByName($name) |
||
51 | |||
52 | /** |
||
53 | * Ask forge site. |
||
54 | * |
||
55 | * @return string |
||
56 | */ |
||
57 | protected function askForgeSite() |
||
62 | |||
63 | /** |
||
64 | * Ask forge server. |
||
65 | * |
||
66 | * @return string |
||
67 | */ |
||
68 | protected function askForgeServer() |
||
73 | |||
74 | /** |
||
75 | * Default forge site |
||
76 | */ |
||
77 | protected function defaultForgeSite() |
||
81 | |||
82 | /** |
||
83 | * Default forge server. |
||
84 | */ |
||
85 | protected function defaultForgeServer() |
||
89 | |||
90 | /** |
||
91 | * Ask name. |
||
92 | */ |
||
93 | protected function askName() |
||
98 | |||
99 | /** |
||
100 | * Ask repository Uri. |
||
101 | */ |
||
102 | protected function askRepositoryUri() { |
||
106 | |||
107 | /** |
||
108 | * Ask repository Uri. |
||
109 | */ |
||
110 | protected function askRepositoryType() { |
||
114 | |||
115 | /** |
||
116 | * Default repository type. |
||
117 | * |
||
118 | * @return string |
||
119 | */ |
||
120 | protected function defaultRepositoryType() |
||
124 | |||
125 | /** |
||
126 | * Default repository URI. |
||
127 | * |
||
128 | * @return null |
||
129 | */ |
||
130 | protected function defaultRepositoryUri() |
||
134 | |||
135 | /** |
||
136 | * Default name. |
||
137 | * |
||
138 | * @return null|string |
||
139 | */ |
||
140 | protected function defaultName() |
||
144 | } |
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: