for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Sunnysideup\ShareThisSimple\Model;
use SilverStripe\Assets\File;
use SilverStripe\Core\Extension;
use Sunnysideup\ShareThisSimple\Api\ShareThisSimpleProvider;
/**
* Class \Sunnysideup\ShareThisSimple\Model\ShareThisSimpleExtension
*
* @property FileExtension $owner
*/
class FileExtension extends Extension
{
public function getPinterestLink(?string $imageMethod = '', ?bool $useImageTitle = false): string
$useImageTitle
If this is a false-positive, you can also ignore this issue in your code via the ignore-unused annotation
ignore-unused
public function getPinterestLink(?string $imageMethod = '', /** @scrutinizer ignore-unused */ ?bool $useImageTitle = false): string
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.
$imageMethod
public function getPinterestLink(/** @scrutinizer ignore-unused */ ?string $imageMethod = '', ?bool $useImageTitle = false): string
$owner = $this->getOwner();
return 'https://pinterest.com/pin/create/button/?url=' . ($owner->AbsoluteLink()) . '&'
. 'description=' . rawurlencode($owner->Title) . '&'
. 'media=' . rawurlencode($owner->AbsoluteLink());
}
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.