1 | <?php |
||
17 | class ContactsController extends AuthorizedController |
||
18 | { |
||
19 | /** |
||
20 | * {@inheritdoc} |
||
21 | */ |
||
22 | protected $resource = Contact::class; |
||
23 | |||
24 | /** |
||
25 | * List all contacts. |
||
26 | * |
||
27 | * @param \Cortex\Contacts\DataTables\Adminarea\ContactsDataTable $contactsDataTable |
||
28 | * |
||
29 | * @return \Illuminate\Http\JsonResponse|\Illuminate\View\View |
||
30 | */ |
||
31 | public function index(ContactsDataTable $contactsDataTable) |
||
38 | |||
39 | /** |
||
40 | * List contact logs. |
||
41 | * |
||
42 | * @param \Cortex\Contacts\Models\Contact $contact |
||
43 | * @param \Cortex\Foundation\DataTables\LogsDataTable $logsDataTable |
||
44 | * |
||
45 | * @return \Illuminate\Http\JsonResponse|\Illuminate\Http\RedirectResponse |
||
|
|||
46 | */ |
||
47 | public function logs(Contact $contact, LogsDataTable $logsDataTable) |
||
56 | |||
57 | /** |
||
58 | * Import contacts. |
||
59 | * |
||
60 | * @return \Illuminate\View\View |
||
61 | */ |
||
62 | public function import() |
||
71 | |||
72 | /** |
||
73 | * Hoard contacts. |
||
74 | * |
||
75 | * @param \Cortex\Foundation\Http\Requests\ImportFormRequest $request |
||
76 | * @param \Cortex\Foundation\Importers\DefaultImporter $importer |
||
77 | * |
||
78 | * @return void |
||
79 | */ |
||
80 | public function hoard(ImportFormRequest $request, DefaultImporter $importer) |
||
86 | |||
87 | /** |
||
88 | * List contact import logs. |
||
89 | * |
||
90 | * @param \Cortex\Foundation\DataTables\ImportLogsDataTable $importLogsDatatable |
||
91 | * |
||
92 | * @return \Illuminate\Http\JsonResponse|\Illuminate\Http\RedirectResponse |
||
93 | */ |
||
94 | public function importLogs(ImportLogsDataTable $importLogsDatatable) |
||
103 | |||
104 | /** |
||
105 | * Create new contact. |
||
106 | * |
||
107 | * @param \Cortex\Contacts\Models\Contact $contact |
||
108 | * |
||
109 | * @return \Illuminate\View\View |
||
110 | */ |
||
111 | public function create(Contact $contact) |
||
115 | |||
116 | /** |
||
117 | * Edit given contact. |
||
118 | * |
||
119 | * @param \Cortex\Contacts\Models\Contact $contact |
||
120 | * |
||
121 | * @return \Illuminate\View\View |
||
122 | */ |
||
123 | public function edit(Contact $contact) |
||
127 | |||
128 | /** |
||
129 | * Show contact create/edit form. |
||
130 | * |
||
131 | * @param \Cortex\Contacts\Models\Contact $contact |
||
132 | * |
||
133 | * @return \Illuminate\View\View |
||
134 | */ |
||
135 | protected function form(Contact $contact) |
||
151 | |||
152 | /** |
||
153 | * Store new contact. |
||
154 | * |
||
155 | * @param \Cortex\Contacts\Http\Requests\Adminarea\ContactFormRequest $request |
||
156 | * @param \Cortex\Contacts\Models\Contact $contact |
||
157 | * |
||
158 | * @return \Illuminate\Http\JsonResponse|\Illuminate\Http\RedirectResponse |
||
159 | */ |
||
160 | public function store(ContactFormRequest $request, Contact $contact) |
||
164 | |||
165 | /** |
||
166 | * Update given contact. |
||
167 | * |
||
168 | * @param \Cortex\Contacts\Http\Requests\Adminarea\ContactFormRequest $request |
||
169 | * @param \Cortex\Contacts\Models\Contact $contact |
||
170 | * |
||
171 | * @return \Illuminate\Http\JsonResponse|\Illuminate\Http\RedirectResponse |
||
172 | */ |
||
173 | public function update(ContactFormRequest $request, Contact $contact) |
||
177 | |||
178 | /** |
||
179 | * Process stored/updated contact. |
||
180 | * |
||
181 | * @param \Illuminate\Foundation\Http\FormRequest $request |
||
182 | * @param \Cortex\Contacts\Models\Contact $contact |
||
183 | * |
||
184 | * @return \Illuminate\Http\JsonResponse|\Illuminate\Http\RedirectResponse |
||
185 | */ |
||
186 | protected function process(FormRequest $request, Contact $contact) |
||
199 | |||
200 | /** |
||
201 | * Destroy given contact. |
||
202 | * |
||
203 | * @param \Cortex\Contacts\Models\Contact $contact |
||
204 | * |
||
205 | * @return \Illuminate\Http\JsonResponse|\Illuminate\Http\RedirectResponse |
||
206 | */ |
||
207 | public function destroy(Contact $contact) |
||
216 | } |
||
217 |
This check compares the return type specified in the
@return
annotation of a function or method doc comment with the types returned by the function and raises an issue if they mismatch.