Autofix long scalar typehints to short ones
[MAILPOET-2715]
This commit is contained in:
committed by
Jack Kitterhing
parent
56286bfd11
commit
153c72cd77
@ -37,7 +37,7 @@ class Analytics {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @return boolean */
|
/** @return bool */
|
||||||
public function isEnabled() {
|
public function isEnabled() {
|
||||||
$analyticsSettings = $this->settings->get('analytics', []);
|
$analyticsSettings = $this->settings->get('analytics', []);
|
||||||
return !empty($analyticsSettings['enabled']) === true;
|
return !empty($analyticsSettings['enabled']) === true;
|
||||||
@ -69,7 +69,7 @@ class Analytics {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns true if a the public_id was added and update new_public_id to false
|
* Returns true if a the public_id was added and update new_public_id to false
|
||||||
* @return boolean
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public function isPublicIdNew() {
|
public function isPublicIdNew() {
|
||||||
$newPublicId = $this->settings->get('new_public_id');
|
$newPublicId = $this->settings->get('new_public_id');
|
||||||
|
@ -89,7 +89,7 @@ class MP2Migrator {
|
|||||||
/**
|
/**
|
||||||
* Test if the migration is already started but is not completed
|
* Test if the migration is already started but is not completed
|
||||||
*
|
*
|
||||||
* @return boolean
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public function isMigrationStartedAndNotCompleted() {
|
public function isMigrationStartedAndNotCompleted() {
|
||||||
return $this->settings->get(self::MIGRATION_STARTED_SETTING_KEY, false)
|
return $this->settings->get(self::MIGRATION_STARTED_SETTING_KEY, false)
|
||||||
@ -99,7 +99,7 @@ class MP2Migrator {
|
|||||||
/**
|
/**
|
||||||
* Test if the migration is needed
|
* Test if the migration is needed
|
||||||
*
|
*
|
||||||
* @return boolean
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public function isMigrationNeeded() {
|
public function isMigrationNeeded() {
|
||||||
if ($this->settings->get(self::MIGRATION_COMPLETE_SETTING_KEY)) {
|
if ($this->settings->get(self::MIGRATION_COMPLETE_SETTING_KEY)) {
|
||||||
@ -121,7 +121,7 @@ class MP2Migrator {
|
|||||||
* Test if a table exists
|
* Test if a table exists
|
||||||
*
|
*
|
||||||
* @param string $table Table name
|
* @param string $table Table name
|
||||||
* @return boolean
|
* @return bool
|
||||||
*/
|
*/
|
||||||
private function tableExists($table) {
|
private function tableExists($table) {
|
||||||
global $wpdb;
|
global $wpdb;
|
||||||
@ -269,7 +269,7 @@ class MP2Migrator {
|
|||||||
/**
|
/**
|
||||||
* Test if the import must stop
|
* Test if the import must stop
|
||||||
*
|
*
|
||||||
* @return boolean Import must stop or not
|
* @return bool Import must stop or not
|
||||||
*/
|
*/
|
||||||
private function importStopped() {
|
private function importStopped() {
|
||||||
return $this->settings->get('import_stopped', false);
|
return $this->settings->get('import_stopped', false);
|
||||||
|
@ -133,7 +133,7 @@ class CronHelper {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return boolean|null
|
* @return bool|null
|
||||||
*/
|
*/
|
||||||
public function isDaemonAccessible() {
|
public function isDaemonAccessible() {
|
||||||
$daemon = $this->getDaemon();
|
$daemon = $this->getDaemon();
|
||||||
|
@ -127,7 +127,7 @@ class DaemonHttpRunner {
|
|||||||
/**
|
/**
|
||||||
* @param array|null $settingsDaemonData
|
* @param array|null $settingsDaemonData
|
||||||
*
|
*
|
||||||
* @return boolean
|
* @return bool
|
||||||
*/
|
*/
|
||||||
private function shouldTerminateExecution(array $settingsDaemonData = null) {
|
private function shouldTerminateExecution(array $settingsDaemonData = null) {
|
||||||
return !$settingsDaemonData ||
|
return !$settingsDaemonData ||
|
||||||
|
@ -13,7 +13,7 @@ class Saver {
|
|||||||
/**
|
/**
|
||||||
* @param DynamicSegment $segment
|
* @param DynamicSegment $segment
|
||||||
*
|
*
|
||||||
* @return integer
|
* @return int
|
||||||
* @throws ErrorSavingException
|
* @throws ErrorSavingException
|
||||||
*/
|
*/
|
||||||
public function save(DynamicSegment $segment) {
|
public function save(DynamicSegment $segment) {
|
||||||
|
@ -160,7 +160,7 @@ class Model extends \MailPoetVendor\Sudzy\ValidModel {
|
|||||||
* given, it's used to transform `$data` before creating the new row.
|
* given, it's used to transform `$data` before creating the new row.
|
||||||
*
|
*
|
||||||
* @param array $data
|
* @param array $data
|
||||||
* @param array|boolean $keys
|
* @param array|bool $keys
|
||||||
* @param callable|bool $onCreate
|
* @param callable|bool $onCreate
|
||||||
* @return self
|
* @return self
|
||||||
*/
|
*/
|
||||||
|
@ -22,7 +22,7 @@ use function MailPoetVendor\array_column;
|
|||||||
* @property int $id
|
* @property int $id
|
||||||
* @property int $parentId
|
* @property int $parentId
|
||||||
* @property string $type
|
* @property string $type
|
||||||
* @property object|array|boolean $queue
|
* @property object|array|bool $queue
|
||||||
* @property string $hash
|
* @property string $hash
|
||||||
* @property string $senderAddress
|
* @property string $senderAddress
|
||||||
* @property string $status
|
* @property string $status
|
||||||
@ -39,7 +39,7 @@ use function MailPoetVendor\array_column;
|
|||||||
* @property string $preheader
|
* @property string $preheader
|
||||||
* @property string $body
|
* @property string $body
|
||||||
* @property string|null $schedule
|
* @property string|null $schedule
|
||||||
* @property boolean|null $isScheduled
|
* @property bool|null $isScheduled
|
||||||
* @property string|null $scheduledAt
|
* @property string|null $scheduledAt
|
||||||
* @property string $gaCampaign
|
* @property string $gaCampaign
|
||||||
*/
|
*/
|
||||||
|
@ -15,7 +15,7 @@ use MailPoetVendor\Idiorm\ORM;
|
|||||||
* @property string|null $type
|
* @property string|null $type
|
||||||
* @property int $priority
|
* @property int $priority
|
||||||
* @property string|null $scheduledAt
|
* @property string|null $scheduledAt
|
||||||
* @property boolean|null $inProgress
|
* @property bool|null $inProgress
|
||||||
* @property int $rescheduleCount
|
* @property int $rescheduleCount
|
||||||
* @property string|array|null $meta
|
* @property string|array|null $meta
|
||||||
*/
|
*/
|
||||||
|
@ -26,7 +26,7 @@ class InactiveSubscribersController {
|
|||||||
/**
|
/**
|
||||||
* @param int $daysToInactive
|
* @param int $daysToInactive
|
||||||
* @param int $batchSize
|
* @param int $batchSize
|
||||||
* @return int|boolean
|
* @return int|bool
|
||||||
*/
|
*/
|
||||||
public function markInactiveSubscribers($daysToInactive, $batchSize, $startId = null) {
|
public function markInactiveSubscribers($daysToInactive, $batchSize, $startId = null) {
|
||||||
$thresholdDate = $this->getThresholdDate($daysToInactive);
|
$thresholdDate = $this->getThresholdDate($daysToInactive);
|
||||||
@ -66,7 +66,7 @@ class InactiveSubscribersController {
|
|||||||
/**
|
/**
|
||||||
* @param Carbon $thresholdDate
|
* @param Carbon $thresholdDate
|
||||||
* @param int $batchSize
|
* @param int $batchSize
|
||||||
* @return int|boolean
|
* @return int|bool
|
||||||
*/
|
*/
|
||||||
private function deactivateSubscribers(Carbon $thresholdDate, $batchSize, $startId = null) {
|
private function deactivateSubscribers(Carbon $thresholdDate, $batchSize, $startId = null) {
|
||||||
$subscribersTable = Subscriber::$_table;
|
$subscribersTable = Subscriber::$_table;
|
||||||
|
@ -47,7 +47,7 @@ class Functions {
|
|||||||
* @param callable $functionToAdd
|
* @param callable $functionToAdd
|
||||||
* @param int $priority
|
* @param int $priority
|
||||||
* @param int $acceptedArgs
|
* @param int $acceptedArgs
|
||||||
* @return boolean
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public function addAction($tag, $functionToAdd, $priority = 10, $acceptedArgs = 1) {
|
public function addAction($tag, $functionToAdd, $priority = 10, $acceptedArgs = 1) {
|
||||||
return call_user_func_array('add_action', func_get_args());
|
return call_user_func_array('add_action', func_get_args());
|
||||||
|
@ -37,7 +37,7 @@ class ControlSignatureSniff extends \PHP_CodeSniffer\Sniffs\AbstractPatternSniff
|
|||||||
/**
|
/**
|
||||||
* If true, comments will be ignored if they are found in the code.
|
* If true, comments will be ignored if they are found in the code.
|
||||||
*
|
*
|
||||||
* @var boolean
|
* @var bool
|
||||||
*/
|
*/
|
||||||
public $ignoreComments = true;
|
public $ignoreComments = true;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user