app/SurnameTradition.php
public static function create($name): SurnameTraditionInterface
    {
        switch ($name) {
            case 'paternal':
                return new PaternalSurnameTradition();
            case 'patrilineal':
                return new PatrilinealSurnameTradition();
            case 'matrilineal':
                return new MatrilinealSurnameTradition();
            case 'portuguese':
                return new PortugueseSurnameTradition();
            case 'spanish':
                return new SpanishSurnameTradition();
            case 'polish':
                return new PolishSurnameTradition();
            case 'lithuanian':
                return new LithuanianSurnameTradition();
            case 'icelandic':
                return new IcelandicSurnameTradition();
            default:
                return new DefaultSurnameTradition();
        }
    }
public static function create($name): SurnameTraditionInterface
    {
        switch ($name) {
            case 'paternal':
                return new PaternalSurnameTradition();
            case 'patrilineal':
                return new PatrilinealSurnameTradition();
            case 'matrilineal':
                return new MatrilinealSurnameTradition();
            case 'portuguese':
                return new PortugueseSurnameTradition();
            case 'spanish':
                return new SpanishSurnameTradition();
            case 'polish':
                return new PolishSurnameTradition();
            case 'lithuanian':
                return new LithuanianSurnameTradition();
            case 'icelandic':
                return new IcelandicSurnameTradition();
            default:
                return new DefaultSurnameTradition();
        }
    }
public static function create ( $ name ) : SurnameTraditionInterface { switch ( $ name ) { case 'paternal' : return new PaternalSurnameTradition ( ) ; case 'patrilineal' : return new PatrilinealSurnameTradition ( ) ; case 'matrilineal' : return new MatrilinealSurnameTradition ( ) ; case 'portuguese' : return new PortugueseSurnameTradition ( ) ; case 'spanish' : return new SpanishSurnameTradition ( ) ; case 'polish' : return new PolishSurnameTradition ( ) ; case 'lithuanian' : return new LithuanianSurnameTradition ( ) ; case 'icelandic' : return new IcelandicSurnameTradition ( ) ; default : return new DefaultSurnameTradition ( ) ; } }
Create a surname tradition object for a given surname tradition name.

@param string $name Internal name of the surname tradition

@return SurnameTraditionInterface
Create a surname tradition object for a given surname tradition name .