Fix psr-2 formatting

This commit is contained in:
Damian Mooyman 2016-07-29 10:44:00 +12:00
parent f04975c64e
commit d2142f252e
5 changed files with 413 additions and 409 deletions

View File

@ -158,7 +158,6 @@ class SS_Report extends ViewableData
public function getLink($action = null)
{
return Controller::join_links(
ReportAdmin::singleton()->Link('show'),
get_class($this),
@ -388,14 +387,17 @@ class SS_Report extends ViewableData
* @param Member|int $member
* @return boolean|null
*/
public function extendedCan($methodName, $member) {
public function extendedCan($methodName, $member)
{
$results = $this->extend($methodName, $member);
if ($results && is_array($results)) {
// Remove NULLs
$results = array_filter($results, function ($v) {return !is_null($v);});
// If there are any non-NULL responses, then return the lowest one of them.
// If any explicitly deny the permission, then we don't get access
if($results) return min($results);
if ($results) {
return min($results);
}
}
return null;
}

View File

@ -101,7 +101,8 @@ class ReportAdmin extends LeftAndMain implements PermissionProvider
return $output;
}
public function handleAction($request, $action) {
public function handleAction($request, $action)
{
$this->reportClass = $request->param('ReportClass');
// Check report

View File

@ -64,7 +64,8 @@ class ReportTest extends SapphireTest
'ReportTest_FakeTest_Abstract is NOT in reports list as it is abstract');
}
public function testPermissions() {
public function testPermissions()
{
$report = new ReportTest_FakeTest2();
// Visitor cannot view