for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace SilverStripe\AssetAdmin\Tests\Controller\AssetAdminTest;
use SilverStripe\Dev\TestOnly;
use SilverStripe\ORM\DataExtension;
class FolderExtension extends DataExtension implements TestOnly
{
public function canView($member = null, $context = array())
$context
If this is a false-positive, you can also ignore this issue in your code via the ignore-unused annotation
ignore-unused
public function canView($member = null, /** @scrutinizer ignore-unused */ $context = array())
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.
$member
public function canView(/** @scrutinizer ignore-unused */ $member = null, $context = array())
if ($this->owner->Name === 'disallowCanView') {
return false;
}
public function canEdit($member = null, $context = array())
public function canEdit($member = null, /** @scrutinizer ignore-unused */ $context = array())
if ($this->owner->Name === 'disallowCanEdit') {
public function canDelete($member = null, $context = array())
public function canDelete($member = null, /** @scrutinizer ignore-unused */ $context = array())
if ($this->owner->Name === 'disallowCanDelete') {
public function canCreate($member = null, $context = array())
if (isset($context['Name']) && $context['Name'] === 'disallowCanCreate') {
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.