mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 11:05:53 +02:00
Fix psr-2 formatting
This commit is contained in:
parent
f04975c64e
commit
d2142f252e
@ -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;
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user