1 | <?php |
||
17 | class AttributesController extends AuthorizedController |
||
18 | { |
||
19 | /** |
||
20 | * {@inheritdoc} |
||
21 | */ |
||
22 | protected $resource = Attribute::class; |
||
23 | |||
24 | /** |
||
25 | * List all attributes. |
||
26 | * |
||
27 | * @param \Cortex\Attributes\DataTables\Adminarea\AttributesDataTable $attributesDataTable |
||
28 | * |
||
29 | * @return \Illuminate\Http\JsonResponse|\Illuminate\View\View |
||
30 | */ |
||
31 | public function index(AttributesDataTable $attributesDataTable) |
||
38 | |||
39 | /** |
||
40 | * List attribute logs. |
||
41 | * |
||
42 | * @param \Cortex\Attributes\Models\Attribute $attribute |
||
43 | * @param \Cortex\Foundation\DataTables\LogsDataTable $logsDataTable |
||
44 | * |
||
45 | * @return \Illuminate\Http\JsonResponse|\Illuminate\Http\RedirectResponse |
||
|
|||
46 | */ |
||
47 | public function logs(Attribute $attribute, LogsDataTable $logsDataTable) |
||
56 | |||
57 | /** |
||
58 | * Import attributes. |
||
59 | * |
||
60 | * @return \Illuminate\View\View |
||
61 | */ |
||
62 | public function import() |
||
71 | |||
72 | /** |
||
73 | * Hoard attributes. |
||
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 attribute 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 attribute. |
||
106 | * |
||
107 | * @param \Cortex\Attributes\Models\Attribute $attribute |
||
108 | * |
||
109 | * @return \Illuminate\View\View |
||
110 | */ |
||
111 | public function create(Attribute $attribute) |
||
115 | |||
116 | /** |
||
117 | * Edit given attribute. |
||
118 | * |
||
119 | * @param \Cortex\Attributes\Models\Attribute $attribute |
||
120 | * |
||
121 | * @return \Illuminate\View\View |
||
122 | */ |
||
123 | public function edit(Attribute $attribute) |
||
127 | |||
128 | /** |
||
129 | * Show attribute create/edit form. |
||
130 | * |
||
131 | * @param \Cortex\Attributes\Models\Attribute $attribute |
||
132 | * |
||
133 | * @return \Illuminate\View\View |
||
134 | */ |
||
135 | protected function form(Attribute $attribute) |
||
149 | |||
150 | /** |
||
151 | * Store new attribute. |
||
152 | * |
||
153 | * @param \Cortex\Attributes\Http\Requests\Adminarea\AttributeFormRequest $request |
||
154 | * @param \Cortex\Attributes\Models\Attribute $attribute |
||
155 | * |
||
156 | * @return \Illuminate\Http\JsonResponse|\Illuminate\Http\RedirectResponse |
||
157 | */ |
||
158 | public function store(AttributeFormRequest $request, Attribute $attribute) |
||
162 | |||
163 | /** |
||
164 | * Update given attribute. |
||
165 | * |
||
166 | * @param \Cortex\Attributes\Http\Requests\Adminarea\AttributeFormRequest $request |
||
167 | * @param \Cortex\Attributes\Models\Attribute $attribute |
||
168 | * |
||
169 | * @return \Illuminate\Http\JsonResponse|\Illuminate\Http\RedirectResponse |
||
170 | */ |
||
171 | public function update(AttributeFormRequest $request, Attribute $attribute) |
||
175 | |||
176 | /** |
||
177 | * Process stored/updated attribute. |
||
178 | * |
||
179 | * @param \Illuminate\Foundation\Http\FormRequest $request |
||
180 | * @param \Cortex\Attributes\Models\Attribute $attribute |
||
181 | * |
||
182 | * @return \Illuminate\Http\JsonResponse|\Illuminate\Http\RedirectResponse |
||
183 | */ |
||
184 | protected function process(FormRequest $request, Attribute $attribute) |
||
197 | |||
198 | /** |
||
199 | * Destroy given attribute. |
||
200 | * |
||
201 | * @param \Cortex\Attributes\Models\Attribute $attribute |
||
202 | * |
||
203 | * @return \Illuminate\Http\JsonResponse|\Illuminate\Http\RedirectResponse |
||
204 | */ |
||
205 | public function destroy(Attribute $attribute) |
||
214 | } |
||
215 |
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.