<?php

/*
 * Copyright (C) 2017 Manuela v.d.Decken <manuela@isteam.de>
 *
 * DO NOT ALTER OR REMOVE COPYRIGHT OR THIS HEADER
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, version 2 of the License.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License 2 for more details.
 *
 * You should have received a copy of the GNU General Public License 2
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
/**
 * Description of FtanTrait
 *
 * @package      Vendor_Phplib
 * @copyright    Manuela v.d.Decken <manuela@isteam.de>
 * @author       Manuela v.d.Decken <manuela@isteam.de>
 * @license      GNU General Public License 2.0
 * @version      0.0.1
 * @revision     $Id: FtanTrait.php 28 2017-11-11 16:48:31Z Manuela $
 * @since        File available since 11.11.2017
 * @deprecated   no / since 0000/00/00
 * @description  xxx
 */
//declare(strict_types = 1);
//declare(encoding = 'UTF-8');

/**
 * short description of trait
 */
trait FtanTrait
{
    public function set_ftan($aFtan)
    {
        $aResult = [
            'FTAN_NAME'  => $aFtan['name'],
            'FTAN_VALUE' => $aFtan['value']
        ];
        if (isset($aFtan['remain'])) { $aResult['FTAN_REMAIN'] = $aFtan['remain']; }
        if (isset($aFtan['previous'])) { $aResult['FTAN_PREVIOUS'] = $aFtan['previous']; }
        $this->set_var($aResult);
    }
}
