Sha256: 5319770ddd1e390208c68a0253c4b32dd3b5eb180e42078b39f63e63f3829daa
Contents?: true
Size: 681 Bytes
Versions: 43
Compression:
Stored size: 681 Bytes
Contents
<?php declare(strict_types=1); namespace Dependabot\Composer; use Composer\Package\Locker; class Hasher { /** * @param array $args * * @throws \RuntimeException * * @return string */ public static function getContentHash(array $args): string { [$workingDirectory] = $args; $config = $workingDirectory . '/composer.json'; $contents = file_get_contents($config); if (!is_string($contents)) { throw new \RuntimeException(sprintf( 'Failed to load contents of "%s".', $config )); } return Locker::getContentHash($contents); } }
Version data entries
43 entries across 43 versions & 1 rubygems