Sha256: 8e2e5a7c3fff3039ddf5bef1703aee29b3169233af318fbca5b79eb280bf3c41

Contents?: true

Size: 462 Bytes

Versions: 26

Compression:

Stored size: 462 Bytes

Contents

<?php

declare(strict_types=1);

namespace Dependabot\Composer;

use Composer\Factory;

class Hasher
{
    public static function getContentHash(array $args): ?string
    {
        [$workingDirectory] = $args;

        $io = new ExceptionIO();
        $composer = Factory::create($io, $workingDirectory . '/composer.json');
        $locker = $composer->getLocker();

        return $locker->getContentHash(file_get_contents(Factory::getComposerFile()));
    }
}

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
dependabot-composer-0.112.5 helpers/src/Hasher.php
dependabot-composer-0.112.4 helpers/src/Hasher.php
dependabot-composer-0.112.3 helpers/src/Hasher.php
dependabot-composer-0.112.2 helpers/src/Hasher.php
dependabot-composer-0.112.1 helpers/src/Hasher.php
dependabot-composer-0.112.0 helpers/src/Hasher.php
dependabot-composer-0.111.59 helpers/src/Hasher.php
dependabot-composer-0.111.58 helpers/src/Hasher.php
dependabot-composer-0.111.57 helpers/src/Hasher.php
dependabot-composer-0.111.56 helpers/src/Hasher.php
dependabot-composer-0.111.55 helpers/src/Hasher.php
dependabot-composer-0.111.54 helpers/src/Hasher.php
dependabot-composer-0.111.53 helpers/src/Hasher.php
dependabot-composer-0.111.52 helpers/src/Hasher.php
dependabot-composer-0.111.51 helpers/src/Hasher.php
dependabot-composer-0.111.50 helpers/src/Hasher.php
dependabot-composer-0.111.49 helpers/src/Hasher.php
dependabot-composer-0.111.48 helpers/src/Hasher.php
dependabot-composer-0.111.47 helpers/src/Hasher.php
dependabot-composer-0.111.46 helpers/src/Hasher.php