Fixed Formatting and added docblock

This commit is contained in:
Oscar Arzola 2017-06-02 09:51:13 -05:00
parent 0bd12cf0e6
commit a7d20211ae
2 changed files with 6 additions and 4 deletions

View File

@ -223,9 +223,11 @@ class WidgetManager
}
/**
* Removes a single report widget item
* Remove a registered ReportWidget.
* @param string $className Widget class name.
* @return void
*/
public function removeReportWidgetItem($className)
public function removeReportWidget($className)
{
if (!$this->reportWidgets) {
throw new SystemException('Unable to remove a widget before widgets are loaded.');
@ -234,4 +236,4 @@ class WidgetManager
unset($this->reportWidgets[$className]);
}
}
}

View File

@ -38,7 +38,7 @@ class WidgetManagerTest extends TestCase
'context' => 'dashboard'
]);
$manager->removeReportWidgetItem('Acme\Fake\ReportWidget\ByeWorld');
$manager->removeReportWidget('Acme\Fake\ReportWidget\ByeWorld');
$widgets = $manager->listReportWidgets();