for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace codenixsv\Patterns\Creational\Builder;
/**
* Class PizzaBuilder
* @package codenixsv\Patterns\Creational\Builder
*/
class PizzaBuilder
{
* @var bool
public $peperoni = false;
public $tomato = false;
public $anchovy = false;
public $mozzarella = false;
public $salami = false;
* @return $this
public function addPeperoni()
$this->peperoni = true;
return $this;
}
public function addTomato()
$this->tomato = true;
public function addAnchovy()
$this->anchovy = true;
public function addMozzarella()
$this->mozzarella = true;
public function addSalami()
$this->salami = true;
* @return Pizza
public function build()
return new Pizza($this);