Code Duplication    Length = 9-9 lines in 2 locations

includes/filerepo/file/File.php 1 location

@@ 2059-2067 (lines=9) @@
2056
			return $cache->getWithSetCallback(
2057
				$key,
2058
				$this->repo->descriptionCacheExpiry ?: $cache::TTL_UNCACHEABLE,
2059
				function ( $oldValue, &$ttl, array &$setOpts ) use ( $renderUrl ) {
2060
					wfDebug( "Fetching shared description from $renderUrl\n" );
2061
					$res = Http::get( $renderUrl, [], __METHOD__ );
2062
					if ( !$res ) {
2063
						$ttl = WANObjectCache::TTL_UNCACHEABLE;
2064
					}
2065
2066
					return $res;
2067
				}
2068
			);
2069
		}
2070

includes/filerepo/file/ForeignDBFile.php 1 location

@@ 162-170 (lines=9) @@
159
				$touched
160
			),
161
			$this->repo->descriptionCacheExpiry ?: $cache::TTL_UNCACHEABLE,
162
			function ( $oldValue, &$ttl, array &$setOpts ) use ( $renderUrl ) {
163
				wfDebug( "Fetching shared description from $renderUrl\n" );
164
				$res = Http::get( $renderUrl, [], __METHOD__ );
165
				if ( !$res ) {
166
					$ttl = WANObjectCache::TTL_UNCACHEABLE;
167
				}
168
169
				return $res;
170
			}
171
		);
172
	}
173