Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiline description block, properties that starts by _ #29

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

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