<commit_before>// The MIT License (MIT)
//
// Copyright (c) 2015 <NAME> (github.com/kean).

import Foundation

// MARK: - ImageManaging

public protocol ImageManaging {
    func taskWithRequest(request: ImageRequest) -> ImageTask
    func invalidateAndCancel()
    func removeAllCachedImages()
}

// MARK: - ImagePreheating

public protocol ImagePreheating {
    func startPreheatingImages(requests: [ImageRequest])
    func stopPreheatingImages(requests: [ImageRequest])
    func stopPreheatingImages()
}

// MARK: - ImageManaging (Convenience)

public extension ImageManaging {
    func taskWithURL(URL: NSURL, completion: ImageTaskCompletion? = nil) -> ImageTask {
        let task = self.taskWithURL(URL)
        if completion != nil { task.completion(completion!) }
        return task
    }
    
    func taskWithRequest(request: ImageRequest, completion: ImageTaskCompletion? = nil) -> ImageTask {
        let task = self.taskWithRequest(request)
        if completion != nil { task.completion(completion!) }
        return task
    }
}<commit_msg>Fix convenience ImageManaging taskWithURL method<commit_after>// The MIT License (MIT)
//
// Copyright (c) 2015 <NAME> (github.com/kean).

import Foundation

// MARK: - ImageManaging

public protocol ImageManaging {
    func taskWithRequest(request: ImageRequest) -> ImageTask
    func invalidateAndCancel()
    func removeAllCachedImages()
}

// MARK: - ImagePreheating

public protocol ImagePreheating {
    func startPreheatingImages(requests: [ImageRequest])
    func stopPreheatingImages(requests: [ImageRequest])
    func stopPreheatingImages()
}

// MARK: - ImageManaging (Convenience)

public extension ImageManaging {
    func taskWithURL(URL: NSURL, completion: ImageTaskCompletion? = nil) -> ImageTask {
        return self.taskWithRequest(ImageRequest(URL: URL), completion: completion)
    }
    
    func taskWithRequest(request: ImageRequest, completion: ImageTaskCompletion? = nil) -> ImageTask {
        let task = self.taskWithRequest(request)
        if completion != nil { task.completion(completion!) }
        return task
    }
}
{'fraction_non_alphanumeric': 0.09971509971509972, 'fraction_numerical': 0.003798670465337132, 'mean_word_length': 3.766968325791855, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4536527', 'n_tokens_mistral': 606, 'n_tokens_neox': 574, 'n_words': 152}