From becce6b7520912257c3d72697a3aefec9923a467 Mon Sep 17 00:00:00 2001 From: Sean Molenaar Date: Thu, 29 Nov 2018 20:59:46 +0100 Subject: Define an official codestyle and adhere to it. --- lib/Command/Updater/AfterUpdate.php | 7 +++---- lib/Command/Updater/AllFeeds.php | 8 +++----- lib/Command/Updater/BeforeUpdate.php | 7 +++---- lib/Command/Updater/UpdateFeed.php | 8 +++----- 4 files changed, 12 insertions(+), 18 deletions(-) (limited to 'lib/Command') diff --git a/lib/Command/Updater/AfterUpdate.php b/lib/Command/Updater/AfterUpdate.php index a9becf543..c80913fab 100644 --- a/lib/Command/Updater/AfterUpdate.php +++ b/lib/Command/Updater/AfterUpdate.php @@ -23,13 +23,13 @@ class AfterUpdate extends Command { private $updater; - public function __construct(Updater $updater) + public function __construct(Updater $updater) { parent::__construct(); $this->updater = $updater; } - protected function configure() + protected function configure() { $this->setName('news:updater:after-update') ->setDescription( @@ -38,9 +38,8 @@ class AfterUpdate extends Command ); } - protected function execute(InputInterface $input, OutputInterface $output) + protected function execute(InputInterface $input, OutputInterface $output) { $this->updater->afterUpdate(); } - } diff --git a/lib/Command/Updater/AllFeeds.php b/lib/Command/Updater/AllFeeds.php index 8947c714e..21471379d 100644 --- a/lib/Command/Updater/AllFeeds.php +++ b/lib/Command/Updater/AllFeeds.php @@ -19,18 +19,17 @@ use Symfony\Component\Console\Output\OutputInterface; use OCA\News\Service\FeedService; - class AllFeeds extends Command { private $feedService; - public function __construct(FeedService $feedService) + public function __construct(FeedService $feedService) { parent::__construct(); $this->feedService = $feedService; } - protected function configure() + protected function configure() { $json = '{"feeds": [{"id": 39, "userId": "john"}, // etc ]}'; @@ -41,7 +40,7 @@ class AllFeeds extends Command ); } - protected function execute(InputInterface $input, OutputInterface $output) + protected function execute(InputInterface $input, OutputInterface $output) { $feeds = $this->feedService->findAllFromAllUsers(); $result = ['feeds' => []]; @@ -55,5 +54,4 @@ class AllFeeds extends Command print(json_encode($result)); } - } diff --git a/lib/Command/Updater/BeforeUpdate.php b/lib/Command/Updater/BeforeUpdate.php index 9d562d010..3a0b1ca72 100644 --- a/lib/Command/Updater/BeforeUpdate.php +++ b/lib/Command/Updater/BeforeUpdate.php @@ -23,13 +23,13 @@ class BeforeUpdate extends Command { private $updater; - public function __construct(Updater $updater) + public function __construct(Updater $updater) { parent::__construct(); $this->updater = $updater; } - protected function configure() + protected function configure() { $this->setName('news:updater:before-update') ->setDescription( @@ -39,9 +39,8 @@ class BeforeUpdate extends Command ); } - protected function execute(InputInterface $input, OutputInterface $output) + protected function execute(InputInterface $input, OutputInterface $output) { $this->updater->beforeUpdate(); } - } diff --git a/lib/Command/Updater/UpdateFeed.php b/lib/Command/Updater/UpdateFeed.php index b07cc3e4a..f5cda22ad 100644 --- a/lib/Command/Updater/UpdateFeed.php +++ b/lib/Command/Updater/UpdateFeed.php @@ -20,18 +20,17 @@ use Symfony\Component\Console\Output\OutputInterface; use OCA\News\Service\FeedService; - class UpdateFeed extends Command { private $feedService; - public function __construct(FeedService $feedService) + public function __construct(FeedService $feedService) { parent::__construct(); $this->feedService = $feedService; } - protected function configure() + protected function configure() { $this->setName('news:updater:update-feed') ->addArgument( @@ -47,7 +46,7 @@ class UpdateFeed extends Command ->setDescription('Console API for updating a single user\'s feed'); } - protected function execute(InputInterface $input, OutputInterface $output) + protected function execute(InputInterface $input, OutputInterface $output) { $feedId = $input->getArgument('feed-id'); $userId = $input->getArgument('user-id'); @@ -61,5 +60,4 @@ class UpdateFeed extends Command ); } } - } -- cgit v1.2.3