*/ protected $parts = []; /** * @param string $part */ public function addPart($part) { $this->parts[] = $part; return $this; } /** * @return string */ public function build() { $parts = ['Mockery', static::$mockCounter++]; foreach ($this->parts as $part) { $parts[] = str_replace('\\', '_', $part); } return implode('_', $parts); } }