<commit_before><?php
/**
 * This file is part of the Zimbra API in PHP library.
 *
 * © <NAME> <<EMAIL>>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Zimbra\Account\Request;

use Zimbra\Enum\GalSearchType as SearchType;

/**
 * AutoCompleteGal request class
 * Perform an autocomplete for a name against the Global Address List.
 *
 * @package    Zimbra
 * @subpackage Account
 * @category   Request
 * @author     <NAME> - <EMAIL>
 * @copyright  Copyright © 2013 by <NAME>.
 */
class AutoCompleteGal extends Base
{
    /**
     * Constructor method for AutoCompleteGal
     * @param  string $name The name to test for autocompletion
     * @param  bool   $needExp Flag whether the {exp} flag is needed in the response for group entries.
     * @param  string $type Type of addresses to auto-complete on
     * @param  string $galAcctId GAL Account ID
     * @param  int    $limit An integer specifying the maximum number of results to return
     * @return self
     */
    public function __construct(
        $name,
        $needExp = null,
        SearchType $type = null,
        $galAcctId = null,
        $limit = null)
    {
        parent::__construct();
        $this->property('name', trim($name));
        if(null !== $needExp)
        {
            $this->property('needExp', (bool) $needExp);
        }
        if($type instanceof SearchType)
        {
            $this->property('type', $type);
        }
        if(null !== $galAcctId)
        {
            $this->property('galAcctId', trim($galAcctId));
        }
        if(null !== $limit)
        {
            $this->property('limit', (int) $limit);
        }
    }

    /**
     * Gets or sets name
     *
     * @param  string $name
     * @return string|self
     */
    public function name($name = null)
    {
        if(null === $name)
        {
            return $this->property('name');
        }
        return $this->property('name', trim($name));
    }

    /**
     * Gets or sets needExp
     *
     * @param  bool $needExp
     * @return bool|self
     */
    public function needExp($needExp = null)
    {
        if(null === $needExp)
        {
            return $this->property('needExp');
        }
        return $this->property('needExp', (bool) $needExp);
    }

    /**
     * Gets or sets type
     *
     * @param  SearchType $type
     * @return SearchType|self
     */
    public function type(SearchType $type = null)
    {
        if(null === $type)
        {
            return $this->property('type');
        }
        return $this->property('type', $type);
    }

    /**
     * Gets or sets galAcctId
     *
     * @param  string $galAcctId
     * @return string|self
     */
    public function galAcctId($galAcctId = null)
    {
        if(null === $galAcctId)
        {
            return $this->property('galAcctId');
        }
        return $this->property('galAcctId', trim($galAcctId));
    }

    /**
     * Gets or sets int
     *
     * @param  int $limit
     * @return int|self
     */
    public function limit($limit = null)
    {
        if(null === $limit)
        {
            return $this->property('limit');
        }
        return $this->property('limit', (int) $limit);
    }
}
<commit_msg>Re-order statements<commit_after><?php
/**
 * This file is part of the Zimbra API in PHP library.
 *
 * © <NAME> <<EMAIL>>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Zimbra\Account\Request;

use Zimbra\Enum\GalSearchType as SearchType;

/**
 * AutoCompleteGal request class
 * Perform an autocomplete for a name against the Global Address List.
 *
 * @package    Zimbra
 * @subpackage Account
 * @category   Request
 * @author     <NAME> - <EMAIL>
 * @copyright  Copyright © 2013 by <NAME>.
 */
class AutoCompleteGal extends Base
{
    /**
     * Constructor method for AutoCompleteGal
     * @param  string $name The name to test for autocompletion
     * @param  bool   $needExp Flag whether the {exp} flag is needed in the response for group entries.
     * @param  string $type Type of addresses to auto-complete on
     * @param  string $galAcctId GAL Account ID
     * @param  int    $limit An integer specifying the maximum number of results to return
     * @return self
     */
    public function __construct(
        $name,
        $needExp = null,
        SearchType $type = null,
        $galAcctId = null,
        $limit = null)
    {
        parent::__construct();
        if(null !== $needExp)
        {
            $this->property('needExp', (bool) $needExp);
        }
        $this->property('name', trim($name));
        if($type instanceof SearchType)
        {
            $this->property('type', $type);
        }
        if(null !== $galAcctId)
        {
            $this->property('galAcctId', trim($galAcctId));
        }
        if(null !== $limit)
        {
            $this->property('limit', (int) $limit);
        }
    }

    /**
     * Gets or sets name
     *
     * @param  string $name
     * @return string|self
     */
    public function name($name = null)
    {
        if(null === $name)
        {
            return $this->property('name');
        }
        return $this->property('name', trim($name));
    }

    /**
     * Gets or sets needExp
     *
     * @param  bool $needExp
     * @return bool|self
     */
    public function needExp($needExp = null)
    {
        if(null === $needExp)
        {
            return $this->property('needExp');
        }
        return $this->property('needExp', (bool) $needExp);
    }

    /**
     * Gets or sets type
     *
     * @param  SearchType $type
     * @return SearchType|self
     */
    public function type(SearchType $type = null)
    {
        if(null === $type)
        {
            return $this->property('type');
        }
        return $this->property('type', $type);
    }

    /**
     * Gets or sets galAcctId
     *
     * @param  string $galAcctId
     * @return string|self
     */
    public function galAcctId($galAcctId = null)
    {
        if(null === $galAcctId)
        {
            return $this->property('galAcctId');
        }
        return $this->property('galAcctId', trim($galAcctId));
    }

    /**
     * Gets or sets int
     *
     * @param  int $limit
     * @return int|self
     */
    public function limit($limit = null)
    {
        if(null === $limit)
        {
            return $this->property('limit');
        }
        return $this->property('limit', (int) $limit);
    }
}

{'fraction_non_alphanumeric': 0.12977443609022557, 'fraction_numerical': 0.0012030075187969924, 'mean_word_length': 1.8904823989569752, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 45, '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': '5992642', 'n_tokens_mistral': 1994, 'n_tokens_neox': 1965, 'n_words': 541}