PHP code example of aide-travaux / habiter-mieux-serenite

1. Go to this page and download the library: Download aide-travaux/habiter-mieux-serenite library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

aide-travaux / habiter-mieux-serenite example snippets




use AideTravaux\Anah\HabiterMieuxSerenite\Model\DataInterface;
use AideTravaux\Anah\HabiterMieuxSerenite\Model\ConditionInterface;
use AideTravaux\Anah\HabiterMieuxSerenite\HabiterMieuxSerenite;

class Data implements DataInterface, ConditionInterface
{
    public function getCategorieAnah(): string
    {
        return 'Modeste';
    }

    public function getCoutTTC(): float
    {
        return (float) 12000;
    }

    public function getTypeLogement(): string
    {
        return 'Maison individuelle';
    }

    public function getStatutOccupantLogement(): string
    {
        return 'Propriétaire occupant';
    }

    public function getAgeLogement(): int
    {
        return 30;
    }
}

$data = new Data();

HabiterMieuxSerenite::get($data);
HabiterMieuxSerenite::resolveConditions($data);