<commit_before><?php
/**
 * Copyright (c) 2014, PIXNET Digital Media Corporation
 * All rights reserved.
 */

class Pix_Friend_SubscriptionGroups extends PixAPI
{
    public function __construct($client)
    {
        $this->client = $client;
    }

    public function search($group_id = '')
    {
        if ('' != $group_id) {
            $parameters = $this->mergeParameters(
                array(),
                $options,
                array(),
                array()
            );

            $response = $this->query('friend/subscription_groups/' . $group_id, $parameters, 'GET');
            return $response;
        }
        $parameters = $this->mergeParameters(
            array(),
            $options,
            array(),
            array()
        );

        $response = $this->query('friend/subscription_groups', $parameters, 'GET');
        return $response;
    }

    public function create($name)
    {
        if ('' == $name) {
            throw new PixAPIException('Required parameters missing', PixAPIException::REQUIRE_PARAMETERS_MISSING);
        }
        $parameters = $this->mergeParameters(
            array('name' => $name),
            $options,
            array(),
            array()
        );
        $response = $this->query('friend/subscription_groups', $parameters, 'POST');
        return $response;
    }

    public function update($group_id, $name)
    {
        if ('' == $group_id or '' == $name) {
            throw new PixAPIException('Required parameters missing', PixAPIException::REQUIRE_PARAMETERS_MISSING);
        }
        $parameters = $this->mergeParameters(
            array('name' => $name),
            $options,
            array(),
            array()
        );
        $response = $this->query('friend/subscription_groups/' . $group_id, $parameters, 'POST');
        return $response;
    }

    public function delete($group_id)
    {
        if ('' == $group_id) {
            throw new PixAPIException('Required parameters missing', PixAPIException::REQUIRE_PARAMETERS_MISSING);
        }
        $response = $this->query('friend/subscription_groups/' . $group_id, $parameters = '', 'DELETE');
        return $response;
    }

    public function position($group_ids)
    {
        if ('' == $group_ids) {
            throw new PixAPIException('Required parameters missing', PixAPIException::REQUIRE_PARAMETERS_MISSING);
        }
        $parameters = $this->mergeParameters(
            array('ids' => $group_ids),
            $options,
            array(),
            array()
        );
        $response = $this->query('friend/subscription_groups/position', $parameters, 'POST');
        return $response;
    }
}
<commit_msg>fix 'need to give parameters as array' error<commit_after><?php
/**
 * Copyright (c) 2014, PIXNET Digital Media Corporation
 * All rights reserved.
 */

class Pix_Friend_SubscriptionGroups extends PixAPI
{
    public function __construct($client)
    {
        $this->client = $client;
    }

    public function search($group_id = '')
    {
        if ('' != $group_id) {
            $parameters = $this->mergeParameters(
                array(),
                $options,
                array(),
                array()
            );

            $response = $this->query('friend/subscription_groups/' . $group_id, $parameters, 'GET');
            return $response;
        }
        $parameters = $this->mergeParameters(
            array(),
            $options,
            array(),
            array()
        );

        $response = $this->query('friend/subscription_groups', $parameters, 'GET');
        return $response;
    }

    public function create($name)
    {
        if ('' == $name) {
            throw new PixAPIException('Required parameters missing', PixAPIException::REQUIRE_PARAMETERS_MISSING);
        }
        $parameters = $this->mergeParameters(
            array('name' => $name),
            $options,
            array(),
            array()
        );
        $response = $this->query('friend/subscription_groups', $parameters, 'POST');
        return $response;
    }

    public function update($group_id, $name)
    {
        if ('' == $group_id or '' == $name) {
            throw new PixAPIException('Required parameters missing', PixAPIException::REQUIRE_PARAMETERS_MISSING);
        }
        $parameters = $this->mergeParameters(
            array('name' => $name),
            $options,
            array(),
            array()
        );
        $response = $this->query('friend/subscription_groups/' . $group_id, $parameters, 'POST');
        return $response;
    }

    public function delete($group_id)
    {
        if ('' == $group_id) {
            throw new PixAPIException('Required parameters missing', PixAPIException::REQUIRE_PARAMETERS_MISSING);
        }
        $parameters = $this->mergeParameters(
            array(),
            $options,
            array(),
            array()
        );
        $response = $this->query('friend/subscription_groups/' . $group_id, $parameters, 'DELETE');
        return $response;
    }

    public function position($group_ids)
    {
        if ('' == $group_ids) {
            throw new PixAPIException('Required parameters missing', PixAPIException::REQUIRE_PARAMETERS_MISSING);
        }
        $parameters = $this->mergeParameters(
            array('ids' => $group_ids),
            $options,
            array(),
            array()
        );
        $response = $this->query('friend/subscription_groups/position', $parameters, 'POST');
        return $response;
    }
}

{'fraction_non_alphanumeric': 0.13427498659038084, 'fraction_numerical': 0.0014303593777936707, 'mean_word_length': 1.958223162347964, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 34, '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': '4431294', 'n_tokens_mistral': 1496, 'n_tokens_neox': 1469, 'n_words': 301}