<commit_before><?php namespace ohmy\Auth1\Leg;

/*
 * Copyright (c) 2014, Yahoo! Inc. All rights reserved.
 * Copyrights licensed under the New BSD License.
 * See the accompanying LICENSE file for terms.
 */

use ohmy\Auth1\Leg;

class UserLeg extends Leg {

    public function __construct(
        $url,
        Array $oauth_params=array(),
        Array $params=array(),
        Array $headers=array(),
        $callback=null
    ) {
        $this->url = $url;
        $this->oauth_params = $oauth_params;
        $this->params = $params;
        $this->headers = $headers;
    }

    public function run() {
        $location = sprintf(
            'Location: %s?oauth_token=%s',
            $this->url,
            $this->oauth_params['oauth_token']
        );
        header($location);
    }
}<commit_msg>added exit() to prevent code from executing after location header is set<commit_after><?php namespace ohmy\Auth1\Leg;

/*
 * Copyright (c) 2014, Yahoo! Inc. All rights reserved.
 * Copyrights licensed under the New BSD License.
 * See the accompanying LICENSE file for terms.
 */

use ohmy\Auth1\Leg;

class UserLeg extends Leg {

    public function __construct(
        $url,
        Array $oauth_params=array(),
        Array $params=array(),
        Array $headers=array(),
        $callback=null
    ) {
        $this->url = $url;
        $this->oauth_params = $oauth_params;
        $this->params = $params;
        $this->headers = $headers;
    }

    public function run() {
        $location = sprintf(
            'Location: %s?oauth_token=%s',
            $this->url,
            $this->oauth_params['oauth_token']
        );
        header($location);
        exit();
    }
}
{'fraction_non_alphanumeric': 0.12874779541446207, 'fraction_numerical': 0.007054673721340388, 'mean_word_length': 2.217391304347826, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 15, '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': '338457', 'n_tokens_mistral': 516, 'n_tokens_neox': 503, 'n_words': 132}