PHPackages                             mybb/standards - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [PSR &amp; Standards](/categories/psr-standards)
4. /
5. mybb/standards

ActiveLibrary[PSR &amp; Standards](/categories/psr-standards)

mybb/standards
==============

MyBB 2.0 Coding Standard

38[4 issues](https://github.com/mybb/standards/issues)PHP

Since May 9Pushed 11y ago22 watchersCompare

[ Source](https://github.com/mybb/standards)[ Packagist](https://packagist.org/packages/mybb/standards)[ RSS](/packages/mybb-standards/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

MyBB 2.0 Coding Standard
========================

[](#mybb-20-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](https://github.com/squizlabs/PHP_CodeSniffer) and are run automatically against all repositories related to MyBB 2.0.

Standard
--------

[](#standard)

PHP code must follow the [PSR-2](http://www.php-fig.org/psr/psr-2/) coding style guide. [PHP CodeSniffer](https://github.com/squizlabs/PHP_CodeSniffer) will be ran against all contributions to ensure that code follows this standard.

In addition to the PSR-2 standard, we have other standards and best practices that must be ahered to:

- All interface names MUST be suffixed with `Interface`. (e.g. `ForumInterface`).
- All abstract class names MUST be prefixed with `Abstract` (e.g. `AbstractForum`).
- All repository class names MUST be suffixed with `Repository` (e.g. `ForumRepository`).
- All factory class names MUST be suffixed with `Factory` (e.g. `ForumFactory`).
- The `Interface` suffix MUST take priority over other suffixes. (e.g. `ForumRepositoryInterface`, `ForumFactoryInterface`.
- Getters MUST be used when retrieving the property of a non-Eloquent object.
- Setters MUST be used when manipulating the property of a non-Eloquent object.
- Properties on an object SHOULD have `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';
    }
}
```

- Methods with a return value and/or arguments MUST have a document block.
- Object properties MUST have a document block with `@var` tag denoting their type.
- Magic properties on an object MUST be declared in a doc block at the top of the class using the `@property` tag.
- Method arguments that are required MUST NOT have a default value.

###  Health Score

17

—

LowBetter than 6% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 70% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/2957bf948ef8d8b4542d93dc43b640eae1187e733e423483ab857b510a72590b?d=identicon)[euantorano](/maintainers/euantorano)

![](https://www.gravatar.com/avatar/662f0493303b33636b15c6921b0cb6e798758e9f16b002e2e6eb8bc11d1161af?d=identicon)[Jones](/maintainers/Jones)

---

Top Contributors

[![JN-Jones](https://avatars.githubusercontent.com/u/1917879?v=4)](https://github.com/JN-Jones "JN-Jones (7 commits)")[![wpillar](https://avatars.githubusercontent.com/u/188514?v=4)](https://github.com/wpillar "wpillar (3 commits)")

### Embed Badge

![Health badge](/badges/mybb-standards/health.svg)

```
[![Health](https://phpackages.com/badges/mybb-standards/health.svg)](https://phpackages.com/packages/mybb-standards)
```

###  Alternatives

[league/container

A fast and intuitive dependency injection container.

86787.8M343](/packages/league-container)[stella-maris/clock

A pre-release of the proposed PSR-20 Clock-Interface

7947.5M2](/packages/stella-maris-clock)[wptrt/wpthemereview

PHP\_CodeSniffer rules (sniffs) to verify theme compliance with the rules for theme hosting on wordpress.org

217736.5k29](/packages/wptrt-wpthemereview)[inpsyde/modularity

Modular PSR-11 implementation for WordPress plugins, themes or libraries.

54383.3k3](/packages/inpsyde-modularity)[php-standard-library/phpstan-extension

PHPStan PSL extension

201.2M13](/packages/php-standard-library-phpstan-extension)[elie29/zend-phpdi-config

PSR-11 PHP-DI autowire container configurator for Laminas, Mezzio, ZF2, ZF3 and Zend Expressive applications

20238.6k7](/packages/elie29-zend-phpdi-config)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
