1 | <?php |
||
13 | class ConversationController extends Controller |
||
14 | { |
||
15 | /** |
||
16 | * Show the conversation by its id. |
||
17 | * |
||
18 | * @return \Illuminate\Http\Response |
||
|
|||
19 | */ |
||
20 | public function show(Request $request, string $slug, int $id) |
||
43 | |||
44 | /** |
||
45 | * Show the create form. |
||
46 | * |
||
47 | * @return \Illuminate\View\View |
||
48 | */ |
||
49 | public function showCreateForm(): View |
||
50 | { |
||
51 | $categories = DiscussCategory::pluckLocked('title', 'id'); |
||
52 | |||
53 | $breadcrumbs = $this->breadcrumbs->addCrumb('Start a discussion', route('discuss.conversation.create')); |
||
54 | |||
55 | return view('Discuss::conversation.create', compact('breadcrumbs', 'categories')); |
||
56 | } |
||
57 | |||
58 | /** |
||
59 | * Handle a conversation create request for the application. |
||
60 | * |
||
61 | * @param \Illuminate\Http\Request $request |
||
62 | * |
||
63 | * @return \Illuminate\Http\RedirectResponse |
||
64 | */ |
||
65 | public function create(Request $request) |
||
87 | |||
88 | /** |
||
89 | * Handle a conversation update request for the application. |
||
90 | * |
||
91 | * @param \Illuminate\Http\Request $request |
||
92 | * @param string $slug |
||
93 | * @param int $id |
||
94 | * |
||
95 | * @return \Illuminate\Http\RedirectResponse |
||
96 | */ |
||
97 | public function update(Request $request, string $slug, int $id) |
||
110 | |||
111 | /** |
||
112 | * Get the current page for the conversation. |
||
113 | * |
||
114 | * @param \Illuminate\Http\Request $request |
||
115 | * |
||
116 | * @return int |
||
117 | */ |
||
118 | protected function getCurrentPage(Request $request): int |
||
122 | } |
||
123 |
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.