Skip to content

Multiline description block, properties that starts by _#29

Open
flashios09 wants to merge 5 commits intophproberto:masterfrom
flashios09:master
Open

Multiline description block, properties that starts by _#29
flashios09 wants to merge 5 commits intophproberto:masterfrom
flashios09:master

Conversation

@flashios09
Copy link

Fix multiline getter/setter description block:

Example:

/**
* The layout for the View, `'default'` by default.
*
* ### Pattern
* `src/Template/Layout/{$_layoutPath}/{$_layout}.ctp`
*
* @var string
*/
protected $layout = 'default';

Before:

/**
* Get `src/Template/Layout/{$_layoutPath}/{$_layout}.ctp`
*
* @return string
*/
public function getLayout()
{
    return $this->layout;
}

After:

/**
* Get the layout for the View, `'default'` by default.
*
* ### Pattern
* `src/Template/Layout/{$_layoutPath}/{$_layout}.ctp`
*
* @return string
*/
public function getLayout()
{
    return $this->layout;
}

Fix generatedMethodName for properties that starts by _

Example:

/**
* The layout for the View, `'default'` by default.
*
* ### Pattern
* `src/Template/Layout/{$_layoutPath}/{$_layout}.ctp`
*
* @var string
*/
protected $_layout = 'default';

Before:

/**
* Get `src/Template/Layout/{$_layoutPath}/{$_layout}.ctp`
*
* @return string
*/
public function get_layout()
{
    return $this->_layout;
}

After:

/**
* Get the layout for the View, `'default'` by default.
*
* ### Pattern
* `src/Template/Layout/{$_layoutPath}/{$_layout}.ctp`
*
* @return string
*/
public function getLayout()
{
    return $this->_layout;
}

Fix setter argument name for properties that starts by _

Example:

/**
* The layout for the View, `'default'` by default.
*
* ### Pattern
* `src/Template/Layout/{$_layoutPath}/{$_layout}.ctp`
*
* @var string
*/
protected $_layout = 'default';

Before:

/**
* Set the layout for the View, `'default'` by default.
*
* ### Pattern
* `src/Template/Layout/{$_layoutPath}/{$_layout}.ctp`
*
* @param string $_layout The layout for the View, `'default'` by default.
* @return self
*/
public function setLayout(string $_layout)
{
    $this->_layout = $_layout;

    return $this;
}

After:

/**
* Set the layout for the View, `'default'` by default.
*
* ### Pattern
* `src/Template/Layout/{$_layoutPath}/{$_layout}.ctp`
*
* @param string $layout The layout for the View, `'default'` by default.
* @return self
*/
public function setLayout(string $layout)
{
    $this->_layout = $layout;

    return $this;
}

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.

1 participant