for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php declare(strict_types=1);
namespace PeeHaa\AsyncTwitter\Api\Request\Post\Account;
use PeeHaa\AsyncTwitter\Api\Request\BaseRequest;
/**
* @link https://dev.twitter.com/rest/reference/post/account/settings
*/
class Settings extends BaseRequest
{
const METHOD = 'POST';
This check looks for improperly formatted assignments.
Every assignment must have exactly one space before and one space after the equals operator.
To illustrate:
$a = "a"; $ab = "ab"; $abc = "abc";
will have no issues, while
will report issues in lines 1 and 2.
const ENDPOINT = '/account/remove_profile_banner.json';
public function __construct()
parent::__construct(self::METHOD, self::ENDPOINT);
}
public function enableSleepTime(): Settings
$this->parameters['sleep_time_enabled'] = 'true';
return $this;
public function disableSleepTime(): Settings
$this->parameters['sleep_time_enabled'] = 'false';
public function sleepTimeStart(int $hour): Settings
$this->parameters['start_sleep_time'] = str_pad((string) $hour, 2, '0', STR_PAD_LEFT);
public function sleepTimeEnd(int $hour): Settings
$this->parameters['end_sleep_time'] = str_pad((string) $hour, 2, '0', STR_PAD_LEFT);
public function timeZone(string $timeZone): Settings
$this->parameters['time_zone'] = $timeZone;
public function trendLocationWoeId(int $woeId): Settings
$this->parameters['trend_location_woeid'] = (string) $woeId;
public function language(string $language): Settings
$this->parameters['lang'] = $language;
This check looks for improperly formatted assignments.
Every assignment must have exactly one space before and one space after the equals operator.
To illustrate:
will have no issues, while
will report issues in lines 1 and 2.