Skip to content

Instantly share code, notes, and snippets.

@mayronceccon
Created January 17, 2020 17:01
Show Gist options
  • Select an option

  • Save mayronceccon/2cc0efe7371b0839a1d5a133b14aa487 to your computer and use it in GitHub Desktop.

Select an option

Save mayronceccon/2cc0efe7371b0839a1d5a133b14aa487 to your computer and use it in GitHub Desktop.
Tratamento de pronunciamentos do governo Bolsonaro
<?php
use \Random\Apologies;
use \Random\Minister;
use \Random\Crisis;
use \Minister\Pronouncement;
class Pronouncement
{
private $minister;
private $pronouncement;
public function __construct(Minister &$minister, Pronouncement $pronouncement)
{
$this->minister = $minister;
$this->pronouncement = $pronouncement;
}
public function send()
{
try {
$this->pronouncement->show();
if ($this->gaveShit()) {
throw new Error();
}
throw new Exception();
} catch (Exception $e) {
new Crisis();
} catch (Error $e) {
new Crisis();
$this->minister = new Minister();
} finally {
new Apologies();
}
}
private function gaveShit()
{
return $this->pronouncement->repercussion();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment