for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace SilverStripe\StaticPublishQueue\Test\StaticPublisherTest\Controller;
use PageController;
use SilverStripe\Control\HTTPResponse;
use SilverStripe\Dev\TestOnly;
class StaticPublisherTestPageController extends PageController implements TestOnly
{
/**
* @var array
* @config
*/
private static $allowed_actions = array('json');
$allowed_actions
This check marks private properties in classes that are never used. Those properties can be removed.
* @return HTTPResponse
public function json()
$response = new HTTPResponse('{"firstName": "John"}');
$response->addHeader('Content-Type', 'application/json');
return $response;
}
This check marks private properties in classes that are never used. Those properties can be removed.