for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace App\Services\Validation;
use App\Http\Controllers\CourseController;
class CourseValidator
{
/*
* Requires error message implementation and proper namespace usage.
*/
public function validate(Request $request, Applicant $applicant)
$applicant
If this is a false-positive, you can also ignore this issue in your code via the ignore-unused annotation
ignore-unused
public function validate(Request $request, /** @scrutinizer ignore-unused */ Applicant $applicant)
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.
App\Services\Validation\Request
Request
\
$request->validate([
'courses[:template][:id][name]' => [
'required',
],
'courses[:template][:id][institution]' => [
'required', // If someone declares a course we should require them to say where they completed this course.
]
]);
If a function call spawns multiple lines, the coding standard suggests to move the closing parenthesis to a new line:
someFunctionCall( $firstArgument, $secondArgument, $thirdArgument ); // Closing parenthesis on a new line.
}