Skip to content

Conversation

@sofia-g-per
Copy link

Pin notes

* @param bool|null $isPinned
* @return NoteModel
*/
public function setIsPinned(?bool $isPinned): NoteModel

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Мб self?

Comment on lines +216 to +222
public function pin(NoteModel $model): void
{
try {
$this->request->post(sprintf('%s/%d/pin', $this->getMethod(), $model->getId()));
} catch (AmoCRMApiNoContentException $exception) {
}
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Из того, что я вижу в библиотеке, подобные методы обычно возвращали bool в случае, если падал AmoCRMApiNoContentException. \AmoCRM\EntitiesServices\Traits\LinkMethodsTrait::unlink в пример. Давай не будем изобретать что-то новое и поддержим подобную логику

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants