* @ingroup Maintenance
*/
+use Wikimedia\AtEase\AtEase;
+
/**
* Manage foreign resources registered with ResourceLoader.
*
/** @return string|false */
private function cacheGet( $key ) {
- return Wikimedia\quietCall( 'file_get_contents', "{$this->cacheDir}/$key.data" );
+ return AtEase::quietCall( 'file_get_contents', "{$this->cacheDir}/$key.data" );
}
private function cacheSet( $key, $data ) {
if ( $integrity === $actualIntegrity ) {
$this->verbose( "... passed integrity check for {$src}\n" );
$this->cacheSet( $key, $data );
+ } elseif ( $this->action === 'make-sri' ) {
+ $this->output( "Integrity for {$src}\n\tintegrity: ${actualIntegrity}\n" );
} else {
- if ( $this->action === 'make-sri' ) {
- $this->output( "Integrity for {$src}\n\tintegrity: ${actualIntegrity}\n" );
- } else {
- throw new Exception( "Integrity check failed for {$src}\n" .
- "\tExpected: {$integrity}\n" .
- "\tActual: {$actualIntegrity}"
- );
- }
+ throw new Exception( "Integrity check failed for {$src}\n" .
+ "\tExpected: {$integrity}\n" .
+ "\tActual: {$actualIntegrity}"
+ );
}
return $data;
}