src/Cronner/Tasks/Parameters.php
public static function parseParameters(Method $method) : array
	{
		$taskName = NULL;
		if ($method->hasAnnotation(Parameters::TASK)) {
			$className = $method->getDeclaringClass()->getName();
			$methodName = $method->getName();
			$taskName = $className . ' - ' . $methodName;
		}

		$taskAnnotation = $method->getAnnotation(Parameters::TASK);

		$parameters = [
			static::TASK => is_string($taskAnnotation)
				? Parser::parseName($taskAnnotation)
				: $taskName,
			static::PERIOD => $method->hasAnnotation(Parameters::PERIOD)
				? Parser::parsePeriod((string) $method->getAnnotation(Parameters::PERIOD))
				: NULL,
			static::DAYS => $method->hasAnnotation(Parameters::DAYS)
				? Parser::parseDays((string) $method->getAnnotation(Parameters::DAYS))
				: NULL,
			static::TIME => $method->hasAnnotation(Parameters::TIME)
				? Parser::parseTimes((string) $method->getAnnotation(Parameters::TIME))
				: NULL,
		];

		return $parameters;
	}
public static function parseParameters(Method $method) : array
	{
		$taskName = NULL;
		if ($method->hasAnnotation(Parameters::TASK)) {
			$className = $method->getDeclaringClass()->getName();
			$methodName = $method->getName();
			$taskName = $className . ' - ' . $methodName;
		}

		$taskAnnotation = $method->getAnnotation(Parameters::TASK);

		$parameters = [
			static::TASK => is_string($taskAnnotation)
				? Parser::parseName($taskAnnotation)
				: $taskName,
			static::PERIOD => $method->hasAnnotation(Parameters::PERIOD)
				? Parser::parsePeriod((string) $method->getAnnotation(Parameters::PERIOD))
				: NULL,
			static::DAYS => $method->hasAnnotation(Parameters::DAYS)
				? Parser::parseDays((string) $method->getAnnotation(Parameters::DAYS))
				: NULL,
			static::TIME => $method->hasAnnotation(Parameters::TIME)
				? Parser::parseTimes((string) $method->getAnnotation(Parameters::TIME))
				: NULL,
		];

		return $parameters;
	}
public static function parseParameters ( Method $ method ) : array { $ taskName = NULL ; if ( $ method -> hasAnnotation ( Parameters :: TASK ) ) { $ className = $ method -> getDeclaringClass ( ) -> getName ( ) ; $ methodName = $ method -> getName ( ) ; $ taskName = $ className . ' - ' . $ methodName ; } $ taskAnnotation = $ method -> getAnnotation ( Parameters :: TASK ) ; $ parameters = [ static :: TASK => is_string ( $ taskAnnotation ) ? Parser :: parseName ( $ taskAnnotation ) : $ taskName , static :: PERIOD => $ method -> hasAnnotation ( Parameters :: PERIOD ) ? Parser :: parsePeriod ( ( string ) $ method -> getAnnotation ( Parameters :: PERIOD ) ) : NULL , static :: DAYS => $ method -> hasAnnotation ( Parameters :: DAYS ) ? Parser :: parseDays ( ( string ) $ method -> getAnnotation ( Parameters :: DAYS ) ) : NULL , static :: TIME => $ method -> hasAnnotation ( Parameters :: TIME ) ? Parser :: parseTimes ( ( string ) $ method -> getAnnotation ( Parameters :: TIME ) ) : NULL , ] ; return $ parameters ; }
Parse cronner values from annotations.
Parse cronner values from annotations .