From 06ea2e5f5935467fc00e827d3e1515fcb5946d2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simonas=20=C5=A0erlinskas?= Date: Tue, 4 Oct 2016 11:43:37 +0300 Subject: [PATCH] fixed psr2 style issues --- Event/Events.php | 2 +- Event/SettingActionEvent.php | 2 +- Service/SettingsManager.php | 1 - Tests/Unit/Service/SettingsManagerTest.php | 8 +++++++- 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/Event/Events.php b/Event/Events.php index acdf64c..4ac96e8 100644 --- a/Event/Events.php +++ b/Event/Events.php @@ -21,4 +21,4 @@ final class Events const POST_UPDATE = 'ongr.settings.post_update'; const PRE_DELETE = 'ongr.settings.pre_delete'; const POST_DELETE = 'ongr.settings.post_delete'; -} \ No newline at end of file +} diff --git a/Event/SettingActionEvent.php b/Event/SettingActionEvent.php index 8a8cfcc..eb915df 100644 --- a/Event/SettingActionEvent.php +++ b/Event/SettingActionEvent.php @@ -84,4 +84,4 @@ public function setSetting($setting) { $this->setting = $setting; } -} \ No newline at end of file +} diff --git a/Service/SettingsManager.php b/Service/SettingsManager.php index c9e58b2..4d99abf 100644 --- a/Service/SettingsManager.php +++ b/Service/SettingsManager.php @@ -250,7 +250,6 @@ public function update($name, $data = []) public function delete($name) { if ($this->has($name)) { - $this->eventDispatcher->dispatch(Events::PRE_UPDATE, new SettingActionEvent($name, [], null)); $setting = $this->get($name); diff --git a/Tests/Unit/Service/SettingsManagerTest.php b/Tests/Unit/Service/SettingsManagerTest.php index 63f4656..08b60e2 100644 --- a/Tests/Unit/Service/SettingsManagerTest.php +++ b/Tests/Unit/Service/SettingsManagerTest.php @@ -61,7 +61,13 @@ public function setUp() ->disableOriginalConstructor() ->setMethods( [ - 'findOneBy', 'remove', 'createSearch', 'findDocuments', 'getClassName', 'getManager', 'getAggregation' + 'findOneBy', + 'remove', + 'createSearch', + 'findDocuments', + 'getClassName', + 'getManager', + 'getAggregation', ] ) ->getMock();