Last active
December 1, 2021 15:45
-
-
Save gabrielfroes/390263ccf6817c083ad89945c03cacd5 to your computer and use it in GitHub Desktop.
Recipe for Developer Daily Capuccino
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Recipe for Developer Daily Capuccino | |
* | |
* @author Gabriel Froes & Vanessa Weber <contato@codigofonte.com.br> | |
* @version 1.0 | |
* @copyright GPL © 2018, youtube.com/codigofontetv | |
* @access public | |
* @package CDFTV\Recipes | |
* @example Classe CapuccinoDev. | |
* @video https://youtu.be/UcXpOcF-T6k | |
*/ | |
class CapuccinoDev extends Recipes { | |
public function index() { | |
// Load ingredients | |
$Ingredients[] = $this->ingredients->load('powdered milk', 400, 'grams'); | |
$Ingredients[] = $this->ingredients->load('sugar', 400, 'grams'); | |
$Ingredients[] = $this->ingredients->load('chocolate powder', 5, 'soup spoon'); | |
$Ingredients[] = $this->ingredients->load('instant coffee', 100, 'grams'); | |
$Ingredients[] = $this->ingredients->load('cinnamon powder', 1, 'teaspoon'); | |
$Ingredients[] = $this->ingredients->load('baking soda', 1, 'teaspoon'); | |
// Mix the ingredients | |
$CapuccinoPowder = $this->actions->mix($Ingredients[]); | |
// Fill Cup of Coffee or Mug | |
$HotWater = $this->ingredients->load('hot water', 400, 'milliliters'); | |
$Mug = $this->recipients->get('mug', 1); | |
$this->actions->fill($Mug, $HotWater); | |
$this->actions->fill($Mug, $this->ingredients->load($CapuccinoPowder, 3, 'soup spoon')); | |
// Mix the Beverage | |
$this->actions->mix($Mug->content); | |
// Done, let's drink! | |
$this->actions->scream('The capuccino is ready!!! Devs, let\'s drink!!!'); | |
while ($this->recipients->isEmpty($Mug) == false) { | |
$this->actions->drink($Mug->content); | |
} | |
return true; | |
} | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Bacana mesmo! Sou professor e recentemente divulguei um livro com analogias entre programação e cozinha. Acho que curtirão: https://carlosbazilio.gitbooks.io/programando-na-cozinha/content/pt-br/