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())
$member
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.
$context
if ($this->owner->Name === 'disallowCanView') {
return false;
}
public function canEdit($member = null, $context = array())
if ($this->owner->Name === 'disallowCanEdit') {
public function canDelete($member = null, $context = array())
if ($this->owner->Name === 'disallowCanDelete') {
public function canCreate($member = null, $context = array())
if (isset($context['Name']) && $context['Name'] === 'disallowCanCreate') {
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.