diff --git a/plugins/october/demo/Plugin.php b/plugins/october/demo/Plugin.php index 5ebc66572..46767095e 100644 --- a/plugins/october/demo/Plugin.php +++ b/plugins/october/demo/Plugin.php @@ -25,5 +25,4 @@ class Plugin extends PluginBase '\October\Demo\Components\Todo' => 'demoTodo' ]; } - -} \ No newline at end of file +} diff --git a/plugins/october/demo/components/Todo.php b/plugins/october/demo/components/Todo.php index 78bf289bc..7c3b56b1e 100644 --- a/plugins/october/demo/components/Todo.php +++ b/plugins/october/demo/components/Todo.php @@ -31,13 +31,14 @@ class Todo extends ComponentBase { $items = post('items', []); - if (count($items) >= $this->property('max')) + if (count($items) >= $this->property('max')) { throw new \Exception(sprintf('Sorry only %s items are allowed.', $this->property('max'))); + } - if (($newItem = post('newItem')) != '') + if (($newItem = post('newItem')) != '') { $items[] = $newItem; + } $this->page['items'] = $items; } - -} \ No newline at end of file +}