mirror of
https://github.com/DesignPatternsPHP/DesignPatternsPHP.git
synced 2025-08-09 00:16:32 +02:00
All public methods of abstract classes should be final. Enforce API encapsulation in an inheritance architecture. If you want to override a method, use the Template method pattern.
13 lines
186 B
PHP
13 lines
186 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace DesignPatterns\Creational\Builder\Parts;
|
|
|
|
abstract class Vehicle
|
|
{
|
|
final public function setPart(string $key, object $value)
|
|
{
|
|
}
|
|
}
|