for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace App\Docsets;
use Godbout\DashDocsetBuilder\Docsets\BaseDocset;
use Illuminate\Support\Collection;
use Illuminate\Support\Facades\Storage;
use Wa72\HtmlPageDom\HtmlPageCrawler;
class Alfred4 extends BaseDocset
{
public const CODE = 'alfred-4';
public const NAME = 'Alfred 4';
public const URL = 'alfred-4.com';
public const INDEX = 'index.html';
public const PLAYGROUND = '';
public const ICON_16 = 'favicon-16x16.png';
public const ICON_32 = 'favicon-32x32.png';
public const EXTERNAL_DOMAINS = [
'',
];
public function entries(string $file): Collection
$crawler = HtmlPageCrawler::create(Storage::get($file));
$crawler->filter('h1')->each(function (HtmlPageCrawler $node) use ($entries) {
$node
If this is a false-positive, you can also ignore this issue in your code via the ignore-unused annotation
ignore-unused
$crawler->filter('h1')->each(function (/** @scrutinizer ignore-unused */ HtmlPageCrawler $node) use ($entries) {
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.
$entries
$entries->push([
'name' => 'What Shows up in Dash',
'type' => 'One of the Million of Dash Entry Type',
'path' => 'The Path to the File',
]);
});
return $entries;
}
public function format(string $file): string
/**
* This is equivalent to murder
*/
$crawler->filter('body')->remove();
return $crawler->saveHTML();
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.