<commit_before><?php namespace Thujohn\Share;

class Share {
	protected $link;
	protected $text;
	protected $media;

	public function load($link, $text = '', $media = ''){
		$this->link = urlencode($link);
		$this->text = urlencode($text);
		$this->media = urlencode($media);

		return $this;
	}

	public function services(){
		$services = func_get_args();

		$return = array();

		if ($services){
			foreach ($services as $service){
				if (method_exists('Thujohn\Share\Share', $service)){
					$return[$service] = $this->$service();
				}
			}
		}

		return $return;
	}

	public function delicious(){
		return 'https://delicious.com/post?url='.$this->link.(($this->text) ? '&title='.$this->text : '');
	}
<commit_msg>Possibility to return an object from services()<commit_after><?php namespace Thujohn\Share;

class Share {
	protected $link;
	protected $text;
	protected $media;

	public function load($link, $text = '', $media = ''){
		$this->link = urlencode($link);
		$this->text = urlencode($text);
		$this->media = urlencode($media);

		return $this;
	}

	public function services(){
		$services = func_get_args();

		$object = false;
		if (end($services) === true)
		{
			$object = true;
			array_pop($services);
		}

		$return = array();

		if ($services){
			foreach ($services as $service){
				if (method_exists('Thujohn\Share\Share', $service)){
					$return[$service] = $this->$service();
				}
			}
		}

		if ($object)
		{
			return (object) $return;
		}

		return $return;
	}

	public function delicious(){
		return 'https://delicious.com/post?url='.$this->link.(($this->text) ? '&title='.$this->text : '');
	}

{'fraction_non_alphanumeric': 0.19606637984019668, 'fraction_numerical': 0.0, 'mean_word_length': 3.8165680473372783, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 17, 'https://': 2, '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': '6409383', 'n_tokens_mistral': 623, 'n_tokens_neox': 546, 'n_words': 119}