Aerendir/bundle-features

View on GitHub
src/Model/Feature/AbstractFeature.php

Summary

Maintainability
A
0 mins
Test Coverage
<?php

declare(strict_types=1);

/*
 * This file is part of the Serendipity HQ Features Bundle.
 *
 * Copyright (c) Adamo Aerendir Crespi <aerendir@serendipityhq.com>.
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace SerendipityHQ\Bundle\FeaturesBundle\Model\Feature;

abstract class AbstractFeature implements FeatureInterface
{
    private string $name;
    private string $type;

    public function __construct(string $name, array $details = [])
    {
        $this->name = $name;
        $this->type = $details[self::FIELD_TYPE];
    }

    public function getName(): string
    {
        return $this->name;
    }

    public function getType(): string
    {
        return $this->type;
    }
}