<commit_before><?php
declare(strict_types=1);

namespace Lookyman\Rundeck\Api\Endpoints\Scheduler;

use GuzzleHttp\Promise\PromiseInterface;
use Lookyman\Rundeck\Api\Client;
use GuzzleHttp\Psr7\Request;

class Scheduler
{
	/**
	 * @var Client
	 */
	private $client;

	/**
	 * @param Client $client
	 */
	public function __construct(Client $client)
	{
		$this->client = $client;
	}

	/**
	 * @param array $params
	 * @return PromiseInterface
	 */
	public function takeover(array $params): PromiseInterface
	{
		return $this->client->getConfiguration()->getGuzzle()->sendAsync(
			new Request('PUT', $this->client->getConfiguration()->getBaseUri() . '/scheduler/takeover', [], $this->client->getConfiguration()->getFormat()->formatParams($params))
		);
	}

	/**
	 * @return Server
	 */
	public function server(): Server
	{
		return new Server($this->client);
	}

	/**
	 * @return PromiseInterface
	 */<commit_msg>takeover default param value<commit_after><?php
declare(strict_types=1);

namespace Lookyman\Rundeck\Api\Endpoints\Scheduler;

use GuzzleHttp\Promise\PromiseInterface;
use Lookyman\Rundeck\Api\Client;
use GuzzleHttp\Psr7\Request;

class Scheduler
{
	/**
	 * @var Client
	 */
	private $client;

	/**
	 * @param Client $client
	 */
	public function __construct(Client $client)
	{
		$this->client = $client;
	}

	/**
	 * @param array $params
	 * @return PromiseInterface
	 */
	public function takeover(array $params = []): PromiseInterface
	{
		return $this->client->getConfiguration()->getGuzzle()->sendAsync(
			new Request('PUT', $this->client->getConfiguration()->getBaseUri() . '/scheduler/takeover', [], $this->client->getConfiguration()->getFormat()->formatParams($params))
		);
	}

	/**
	 * @return Server
	 */
	public function server(): Server
	{
		return new Server($this->client);
	}

	/**
	 * @return PromiseInterface
	 */
{'fraction_non_alphanumeric': 0.16558089033659065, 'fraction_numerical': 0.002171552660152009, 'mean_word_length': 4.295977011494253, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 29, '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': '5815526', 'n_tokens_mistral': 619, 'n_tokens_neox': 564, 'n_words': 109}