zilbam/oss-rendu1-gitmoji

List all git accepted gitmojis

1.0.0 2023-07-03 14:50 UTC

This package is auto-updated.

Last update: 2024-11-03 17:56:34 UTC


README

Last version

Installation

composer require zilbam/oss-rendu1-gitmoji

Install the dependencies:

composer install

How to use ?

    use Zilbam\OssRendu1Gitmoji\GitmojisService;
    ...
    
    // Initialize the service
    $gitmojisService = new GitmojisService();
    
    // Get all the gitmojis
    $gitmojis = $gitmojisService->getGitmojis();
    
    // Get a gitmoji by its name
    $bug = $gitmojisService['bug'];
    
    // Display the gitmoji
    echo $bug;
    
    // Echo the gitmoji's description
    echo $bug->description;
    
    // Get the gitmoji's name
    $gitmojiName = $bug->name;
    
    // Get the gitmoji's code
    $gitmojiCode = $bug->code;

Tests and linters:

php vendor/bin/phpstan analyse src --level=max
php vendor/bin/php-cs-fixer fix src --rules=@PSR12
php vendor/bin/phpunit tests