Wallogit.com
2017 © Pedro Peláez
MyBB 2.0 Coding Standard
This repository contains the coding standard for MyBB 2.0. These files are supposed to be used as a standard for PHP_CodeSniffer and are run automatically against all repositories related to MyBB 2.0., (*1)
PHP code must follow the PSR-2 coding style guide. PHP CodeSniffer will be ran against all contributions to ensure that code follows this standard., (*2)
In addition to the PSR-2 standard, we have other standards and best practices that must be ahered to:, (*3)
Interface. (e.g. ForumInterface).Abstract (e.g. AbstractForum).Repository (e.g. ForumRepository).Factory (e.g. ForumFactory).Interface suffix MUST take priority over other suffixes. (e.g. ForumRepositoryInterface, ForumFactoryInterface.protected or private visibility./**
* @property string magic
*/
class Foo
{
/**
* @var string
*/
protected $bar;
/**
* @return string;
*/
public function getBar()
{
return $this->bar;
}
/**
* @param string $bar
*/
public function setBar($bar)
{
$this->bar = $bar;
}
/**
* @param string $name
*/
public function __get($name)
{
return 'magic';
}
}
@var tag denoting their type.@property tag.