Skip to content

Commit

Permalink
Fix php doc-blocks. Closes #39.
Browse files Browse the repository at this point in the history
  • Loading branch information
alek13 committed Mar 18, 2020
1 parent 55e52b2 commit dcb9186
Show file tree
Hide file tree
Showing 20 changed files with 88 additions and 85 deletions.
2 changes: 1 addition & 1 deletion src/Block.php
Expand Up @@ -44,7 +44,7 @@ public function getBlockId()
*
* @param string $blockId
*
* @return Block
* @return $this
*/
public function setBlockId($blockId)
{
Expand Down
6 changes: 3 additions & 3 deletions src/Block/ElementsBlock.php
Expand Up @@ -55,7 +55,7 @@ public function getElementsAsArrays()
*
* @param array $elements
*
* @return ElementsBlock
* @return $this
*
* @throws \InvalidArgumentException
*/
Expand All @@ -73,7 +73,7 @@ public function setElements(array $elements)
/**
* Remove all elements from the block.
*
* @return ElementsBlock
* @return $this
*/
public function clearElements()
{
Expand All @@ -87,7 +87,7 @@ public function clearElements()
*
* @param array|BlockElement $element
*
* @return ElementsBlock
* @return $this
*
* @throws \InvalidArgumentException
*/
Expand Down
8 changes: 4 additions & 4 deletions src/Block/Input.php
Expand Up @@ -70,7 +70,7 @@ public function getLabel()
*
* @param mixed
*
* @return Input
* @return $this
*/
public function setLabel($label)
{
Expand All @@ -94,7 +94,7 @@ public function getElement()
*
* @param mixed
*
* @return Input
* @return $this
*
* @throws \InvalidArgumentException
*/
Expand Down Expand Up @@ -126,7 +126,7 @@ public function getHint()
*
* @param mixed
*
* @return Input
* @return $this
*/
public function setHint($hint)
{
Expand All @@ -150,7 +150,7 @@ public function getOptional()
*
* @param bool
*
* @return Input
* @return $this
*/
public function setOptional($optional)
{
Expand Down
8 changes: 4 additions & 4 deletions src/Block/Section.php
Expand Up @@ -61,7 +61,7 @@ class Section extends Block
/**
* Get the section text.
*
* @return string
* @return \Maknz\Slack\BlockElement\Text
*/
public function getText()
{
Expand All @@ -73,7 +73,7 @@ public function getText()
*
* @param mixed $text
*
* @return Section
* @return $this
*
* @throws \InvalidArgumentException
*/
Expand All @@ -89,7 +89,7 @@ public function setText($text)
*
* @param mixed $field
*
* @return Section
* @return $this
*
* @throws \InvalidArgumentException
*/
Expand Down Expand Up @@ -117,7 +117,7 @@ public function getAccessory()
*
* @param mixed $accessory
*
* @return Section
* @return $this
*
* @throws \InvalidArgumentException
*/
Expand Down
22 changes: 11 additions & 11 deletions src/BlockElement/AbstractSelect.php
Expand Up @@ -9,21 +9,21 @@ abstract class AbstractSelect extends Options
/**
* Select placeholder.
*
* @var Maknz\Slack\BlockElement\Text
* @var \Maknz\Slack\BlockElement\Text
*/
protected $placeholder;

/**
* Select option groups.
*
* @var Maknz\Slack\Object\OptionGroup[]
* @var \Maknz\Slack\Object\OptionGroup[]
*/
protected $option_groups = [];

/**
* Get the placeholder.
*
* @return Maknz\Slack\BlockElement\Text
* @return \Maknz\Slack\BlockElement\Text
*/
public function getPlaceholder()
{
Expand All @@ -35,7 +35,7 @@ public function getPlaceholder()
*
* @param mixed $placeholder
*
* @return AbstractSelect
* @return $this
*
* @throws \InvalidArgumentException
*/
Expand All @@ -51,7 +51,7 @@ public function setPlaceholder($placeholder)
*
* @param array $options
*
* @return AbstractSelect
* @return $this
*
* @throws \InvalidArgumentException
*/
Expand All @@ -67,7 +67,7 @@ public function setOptions(array $options)
*
* @param mixed $option
*
* @return AbstractSelect
* @return $this
*
* @throws \InvalidArgumentException
*/
Expand All @@ -82,7 +82,7 @@ public function addOption($option)
/**
* Get the option groups.
*
* @return Maknz\Slack\Object\OptionGroup[]
* @return \Maknz\Slack\Object\OptionGroup[]
*/
public function getOptionGroups()
{
Expand Down Expand Up @@ -110,7 +110,7 @@ public function getOptionGroupsAsArrays()
*
* @param array $groups
*
* @return AbstractSelect
* @return $this
*
* @throws \InvalidArgumentException
*/
Expand All @@ -129,7 +129,7 @@ public function setOptionGroups(array $groups)
/**
* Clear option groups in the block.
*
* @return AbstractSelect
* @return $this
*/
public function clearOptionGroups()
{
Expand All @@ -141,7 +141,7 @@ public function clearOptionGroups()
/**
* Clear options and option groups.
*
* @return AbstractSelect
* @return $this
*/
public function clearAllOptions()
{
Expand All @@ -156,7 +156,7 @@ public function clearAllOptions()
*
* @param mixed $group
*
* @return AbstractSelect
* @return $this
*
* @throws \InvalidArgumentException
*/
Expand Down
14 changes: 7 additions & 7 deletions src/BlockElement/Button.php
Expand Up @@ -17,7 +17,7 @@ class Button extends Confirmable
/**
* Button text.
*
* @var Maknz\Slack\BlockElement\Text
* @var \Maknz\Slack\BlockElement\Text
*/
protected $text;

Expand Down Expand Up @@ -66,7 +66,7 @@ class Button extends Confirmable
/**
* Get the button text.
*
* @return Maknz\Slack\BlockElement\Text
* @return \Maknz\Slack\BlockElement\Text
*/
public function getText()
{
Expand All @@ -78,7 +78,7 @@ public function getText()
*
* @param mixed $text
*
* @return Button
* @return $this
*
* @throws \InvalidArgumentException
*/
Expand All @@ -104,7 +104,7 @@ public function getActionId()
*
* @param string $actionId
*
* @return Button
* @return $this
*/
public function setActionId($actionId)
{
Expand All @@ -128,7 +128,7 @@ public function getUrl()
*
* @param string $url
*
* @return Button
* @return $this
*/
public function setUrl($url)
{
Expand All @@ -152,7 +152,7 @@ public function getValue()
*
* @param string $value
*
* @return Button
* @return $this
*/
public function setValue($value)
{
Expand All @@ -176,7 +176,7 @@ public function getStyle()
*
* @param string $style
*
* @return Button
* @return $this
*/
public function setStyle($style)
{
Expand Down
2 changes: 1 addition & 1 deletion src/BlockElement/Checkboxes.php
Expand Up @@ -26,7 +26,7 @@ class Checkboxes extends Options
/**
* Get the intially selected options.
*
* @return Maknz\Slack\Object\Option[]
* @return \Maknz\Slack\Object\Option[]
*/
public function getInitialOptions()
{
Expand Down
2 changes: 1 addition & 1 deletion src/BlockElement/Confirmable.php
Expand Up @@ -29,7 +29,7 @@ public function getConfirm()
*
* @param mixed $confirm
*
* @return Confirmable
* @return $this
*
* @throws \InvalidArgumentException
*/
Expand Down
6 changes: 3 additions & 3 deletions src/BlockElement/DatePicker.php
Expand Up @@ -60,7 +60,7 @@ public function getActionId()
*
* @param string $actionId
*
* @return DatePicker
* @return $this
*/
public function setActionId($actionId)
{
Expand All @@ -84,7 +84,7 @@ public function getPlaceholder()
*
* @param mixed $placeholder
*
* @return DatePicker
* @return $this
*
* @throws \InvalidArgumentException
*/
Expand All @@ -110,7 +110,7 @@ public function getInitialDate()
*
* @param \DateTime $initialDate
*
* @return DatePicker
* @return $this
*/
public function setInitialDate(DateTime $initialDate)
{
Expand Down
2 changes: 1 addition & 1 deletion src/BlockElement/MultiSelect.php
Expand Up @@ -29,7 +29,7 @@ class MultiSelect extends AbstractSelect
/**
* Get the intially selected options.
*
* @return Maknz\Slack\Object\Option[]
* @return \Maknz\Slack\Object\Option[]
*/
public function getInitialOptions()
{
Expand Down
2 changes: 1 addition & 1 deletion src/BlockElement/Options.php
Expand Up @@ -29,7 +29,7 @@ public function getActionId()
*
* @param string $actionId
*
* @return Options
* @return $this
*/
public function setActionId($actionId)
{
Expand Down
8 changes: 5 additions & 3 deletions src/BlockElement/RadioButtons.php
Expand Up @@ -34,7 +34,7 @@ class RadioButtons extends Options
/**
* Get the intially selected option.
*
* @return Maknz\Slack\Object\Option
* @return \Maknz\Slack\Object\Option|null
*/
public function getInitialOption()
{
Expand All @@ -43,14 +43,16 @@ public function getInitialOption()
return $option;
}
}

return null;
}

/**
* Add an option to the radio buttons.
*
* @param mixed $option
*
* @return RadioButtons
* @return $this
*
* @throws \InvalidArgumentException
*/
Expand All @@ -72,7 +74,7 @@ public function addOption($option)
/**
* Clear options available.
*
* @return RadioButtons
* @return $this
*/
public function clearOptions()
{
Expand Down

0 comments on commit dcb9186

Please sign in to comment.