for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace WebDevEtc\BlogEtc\Captcha;
use Illuminate\Http\Request;
use WebDevEtc\BlogEtc\Interfaces\CaptchaInterface;
use WebDevEtc\BlogEtc\Models\Post;
/**
* Class CaptchaAbstract.
*/
abstract class CaptchaAbstract implements CaptchaInterface
{
* executed when viewing single post.
public function runCaptchaBeforeShowingPosts(/** @scrutinizer ignore-unused */ Request $request, /** @scrutinizer ignore-unused */ Post $blogEtcPost)
/*
No code here to run! Maybe in your subclass you can make use of this?
But you could put something like this -
$some_question = ...
$correct_captcha = ...
View::share("correct_captcha", $someQuestion); // << reference this in the view file.
Session::put("correct_captcha",$correctCaptcha);
...then in the validation rules you can check if the submitted value matched the above value.
}
* executed when posting new comment.
public function runCaptchaBeforeAddingComment(Request $request, Post $blogEtcPost)
$request
If this is a false-positive, you can also ignore this issue in your code via the ignore-unused annotation
ignore-unused
public function runCaptchaBeforeAddingComment(/** @scrutinizer ignore-unused */ Request $request, Post $blogEtcPost)
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.
$blogEtcPost
public function runCaptchaBeforeAddingComment(Request $request, /** @scrutinizer ignore-unused */ Post $blogEtcPost)
// no code here to run! Maybe in your subclass you can make use of this?
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.