/** * Set PHP version to test against. * * This is the highest PHP version for which compliance should be checked. * * @return string */ public static function getPhpTargetVersion() { if (!isset(self::$phpTargetVersion)) { // if not set try config version or fallback to current PHP version self::$phpTargetVersion = PHP_CodeSniffer::getConfigData('phpTargetVersion'); if (!isset(self::$phpTargetVersion)) { self::$phpTargetVersion = PHP_VERSION; } } return self::$phpTargetVersion; }