Skip to content

Instantly share code, notes, and snippets.

@anvodev
Created June 4, 2020 02:28
Show Gist options
  • Save anvodev/4b52c77e9d008f3c1fd1517b17535e2f to your computer and use it in GitHub Desktop.
Save anvodev/4b52c77e9d008f3c1fd1517b17535e2f to your computer and use it in GitHub Desktop.
<?php
//SweeterCoffee.php
class SweeterCoffee implements CoffeeInterface
{
private $coffee;
public function __construct(CoffeeInterface $coffee)
{
$this->coffee = $coffee;
}
public function drink()
{
echo 'It feel sweeter..!' . PHP_EOL;
return $this->coffee->drink();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment