Total Complexity | 2 |
Total Lines | 25 |
Duplicated Lines | 0 % |
Changes | 5 | ||
Bugs | 1 | Features | 0 |
1 | <?php |
||
12 | abstract class CaptchaAbstract implements CaptchaInterface |
||
13 | { |
||
14 | /** |
||
15 | * executed when viewing single post. |
||
16 | */ |
||
17 | public function runCaptchaBeforeShowingPosts(/** @scrutinizer ignore-unused */ Request $request, /** @scrutinizer ignore-unused */ Post $blogEtcPost) |
||
18 | { |
||
19 | /* |
||
20 | No code here to run! Maybe in your subclass you can make use of this? |
||
21 | |||
22 | But you could put something like this - |
||
23 | $some_question = ... |
||
24 | $correct_captcha = ... |
||
25 | View::share("correct_captcha", $someQuestion); // << reference this in the view file. |
||
26 | Session::put("correct_captcha",$correctCaptcha); |
||
27 | |||
28 | ...then in the validation rules you can check if the submitted value matched the above value. |
||
29 | */ |
||
30 | } |
||
31 | |||
32 | /** |
||
33 | * executed when posting new comment. |
||
34 | */ |
||
35 | public function runCaptchaBeforeAddingComment(Request $request, Post $blogEtcPost) |
||
37 | // no code here to run! Maybe in your subclass you can make use of this? |
||
38 | } |
||
40 |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.