protected function execute(InputInterface $input, OutputInterface $output) { $greeting = $this->generateGreeting(); if ($this->hasLogged()) { $output->writeln("<info>Sir! You have already timed in today, sir! ( ̄^ ̄)ゞ</info>"); exit; } if (!$this->inTheOffice()) { throw Tantrum::overtime(); } (new Skype())->send($greeting); $this->cacheTimeIn(); }
protected function execute(InputInterface $input, OutputInterface $output) { if (!$this->inTheOffice()) { throw Tantrum::overtime(); } $start = new DateTime(); $output->writeln("<comment>Break time!</comment>"); (new Skype())->send('brb'); $this->prompt($input, $output, "Press enter when you're back! "); (new Skype())->send('back!'); $end = new DateTime(); $minutes = $end->diff($start)->format('%i'); $output->writeln("You took a break for {$minutes} minutes"); }
protected function execute(InputInterface $input, OutputInterface $output) { $project = new Project(['id' => getenv('PROJECT_ID')]); if (($hours = $project->remainingHours()) > 0) { throw Table::out("You have {$hours} hour/s remaining dammit! LOG IT! (╯°□°)╯︵ ┻━┻"); } if ($this->hasLogged()) { $output->writeln("<info>You're already out! ( ̄﹃ ̄)</info>"); exit; } if (!$this->inTheOffice()) { throw Tantrum::overtime(); } $output->writeln("<info>Peace out! (╯°□°)╯︵ ┻━┻</info>"); (new Skype())->send('out'); $this->cacheTimeOut(); }