ongr-archive / ongr-strict-standard

[NOT MAINTAINED] Strict PHPCS standard for PSR-2 code based on Squiz standards
MIT License
13 stars 14 forks source link

comment required for __toString #109

Closed trylika closed 9 years ago

trylika commented 9 years ago

Standard requires comment on toString function, if comment for construct is not required, neither should it be in here. Applies for 2.* version.

    /**
     * @return string
     */
    public function __toString()
    {
        return 'aa';
    }
tautrimas commented 9 years ago

In ongr-strict-stanard v1, required comments for such magic methods were removed. Must migrate these exceptions to v2.

Alternatively simply write:


    /**
     * {@inheritdoc}
     */
    public function __toString()
    {
        return $this->name;
    }