1. Go to this page and download the library: Download ahmedanbar/devguard library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
ahmedanbar / devguard example snippets
// @devguard-ignore: direct_db_in_controller
$rows = DB::table('users')->whereRaw($trustedExpr)->get();
$x = $request->raw(); // @devguard-ignore (suppresses every rule at this line)
final class MyTool implements ToolInterface
{
public function name(): string { return 'mytool'; }
public function title(): string { return 'My Tool'; }
public function description(): string { return 'Does a thing.'; }
public function run(ProjectContext $ctx): ToolReport
{
$report = new ToolReport(tool: $this->name(), title: $this->title());
$report->add(CheckResult::pass('hello', 'It works'));
return $report;
}
}
$app->addTool(new MyTool());
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.