From 018e0a417293b15d010358715fa637e39a783e9b Mon Sep 17 00:00:00 2001 From: Stefan Talen Date: Sat, 18 Oct 2014 12:49:29 +0200 Subject: [PATCH] Updating plugin folder --- plugins/october/demo/Plugin.php | 3 +-- plugins/october/demo/components/Todo.php | 9 +++++---- 2 files changed, 6 insertions(+), 6 deletions(-) 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 +}