* @inheritDoc
* @since 28.0.0
*/
- public function visitProvider($provider): string {
+ public function visitProvider(ILanguageModelProvider $provider): string {
return $provider->prompt($this->getInput());
}
* @inheritDoc
* @since 28.0.0
*/
- public function canUseProvider($provider): bool {
+ public function canUseProvider(ILanguageModelProvider $provider): bool {
return true;
}
* @inheritDoc
* @since 28.0.0
*/
- public function visitProvider($provider): string {
+ public function visitProvider(ILanguageModelProvider $provider): string {
if (!$this->canUseProvider($provider)) {
throw new \RuntimeException('HeadlineTask#visitProvider expects IHeadlineProvider');
}
* @inheritDoc
* @since 28.0.0
*/
- public function canUseProvider($provider): bool {
+ public function canUseProvider(ILanguageModelProvider $provider): bool {
return $provider instanceof IHeadlineProvider;
}
];
/**
- * @param T $provider
+ * @psalm-param T $provider
+ * @param ILanguageModelProvider $provider
* @return string
* @since 28.0.0
*/
- public function visitProvider($provider): string;
+ public function visitProvider(ILanguageModelProvider $provider): string;
/**
- * @param T $provider
+ * @psalm-param T $provider
+ * @param ILanguageModelProvider $provider
* @return bool
* @since 28.0.0
*/
- public function canUseProvider($provider): bool;
+ public function canUseProvider(ILanguageModelProvider $provider): bool;
/**
* @inheritDoc
* @since 28.0.0
*/
- public function visitProvider($provider): string {
+ public function visitProvider(ILanguageModelProvider $provider): string {
if (!$this->canUseProvider($provider)) {
throw new \RuntimeException('SummaryTask#visitProvider expects ISummaryProvider');
}
* @inheritDoc
* @since 28.0.0
*/
- public function canUseProvider($provider): bool {
+ public function canUseProvider(ILanguageModelProvider $provider): bool {
return $provider instanceof ISummaryProvider;
}
* @inheritDoc
* @since 28.0.0
*/
- public function visitProvider($provider): string {
+ public function visitProvider(ILanguageModelProvider $provider): string {
if (!$this->canUseProvider($provider)) {
throw new \RuntimeException('TopicsTask#visitProvider expects ITopicsProvider');
}
* @inheritDoc
* @since 28.0.0
*/
- public function canUseProvider($provider): bool {
+ public function canUseProvider(ILanguageModelProvider $provider): bool {
return $provider instanceof ITopicsProvider;
}