false, 'FoundPropertyForDeprecatedSniff' => false, ); /** * Don't use. * * @deprecated 2.2.0 * * @return array */ public function getGroups() { $groups = parent::getGroups(); return array( 'timezone_change' => $groups['timezone_change'] ); } /** * Don't use. * * @since 2.2.0 Added to allow for throwing the deprecation notices. * @deprecated 2.2.0 * * @param int $stackPtr The position of the current token in the stack. * * @return void|int */ public function process_token( $stackPtr ) { if ( false === $this->thrown['DeprecatedSniff'] ) { $this->thrown['DeprecatedSniff'] = $this->phpcsFile->addWarning( 'The "WordPress.WP.TimezoneChange" sniff has been deprecated. Use the "WordPress.DateTime.RestrictedFunctions" sniff instead. Please update your custom ruleset.', 0, 'DeprecatedSniff' ); } if ( ! empty( $this->exclude ) && false === $this->thrown['FoundPropertyForDeprecatedSniff'] ) { $this->thrown['FoundPropertyForDeprecatedSniff'] = $this->phpcsFile->addWarning( 'The "WordPress.WP.TimezoneChange" sniff has been deprecated. Use the "WordPress.DateTime.RestrictedFunctions" sniff instead. "exclude" property setting found. Please update your custom ruleset.', 0, 'FoundPropertyForDeprecatedSniff' ); } return parent::process_token( $stackPtr ); } }