# Coding Styles

PhpMongoAdmin implements the PSR-2 coding standard and the PSR-4 autoloading standard.


# PHP Doc

Below is a sample guideline used by Laravel, We're also happy to use https://pear.php.net/package/PHP_CodeSniffer/. Here is a good source for PHP coding guidelines https://phptherightway.com/


 * Register a binding with the container.
 * @param  string|array  $abstract
 * @param  \Closure|string|null  $concrete
 * @param  bool  $shared
 * @return void
 * @throws \Exception
public function bind($abstract, $concrete = null, $shared = false)


This is a sample of our script copyright header. These should be placed at the start of each page. Please adjust the content to reflect your 'contributor' details:

 * PhpMongoAdmin (www.phpmongoadmin.com) by Masterforms Mobile & Web (MFMAW)
 * @version      MongoConnection.php 1001 6/8/20, 1:00 am  Gilbert Rehling $
 * @package      PhpMongoAdmin\App
 * @subpackage   Classes
 * @link         https://github.com/php-mongo/admin PHP MongoDB Admin
 * @copyright    Copyright (c) 2020. Gilbert Rehling of MMFAW. All rights reserved. (www.mfmaw.com)
 * @licence      PhpMongoAdmin is an Open Source Project released under the GNU GPLv3 license model.
 * @author       Gilbert Rehling:  This email address is being protected from spambots. You need JavaScript enabled to view it. (www.gilbert-rehling.com)
 *  php-mongo-admin - License conditions:
 *  Contributions via our suggestion box are welcome. https://phpmongotools.com/suggestions
 *  This web application is available as Free Software and has no implied warranty or guarantee of usability.
 *  See licesce.txt for the complete licensing outline.
* See https://www.gnu.org/licenses/license-list.html for information on GNU General Public License v3.0 * See COPYRIGHT.php for copyright notices and further details. */


# Vue Doc

Please apply the same copyright header to all resource content. The format will however be slightly different. Please use an existing header and a skeleton for your need.

As a general guide, the following doc block styles are quite acceptable:

 * Language and translation provider service
 * ToDo: implement the locale value once we have more languages to load
 * @param locale
 * @returns {function(*, *): *}
export default function makeTrans( locale ) {
    *   Implement the translations loaded via /js/lang.js
    let language;
    store.dispatch('commitLanguage', locale)
        .then(r => {
            language = store.getters.getLanguageArray;

    *   Returns the text language string
    return function trans( context, key ) {
        return language[context][key];

     * Import the Event bus
    import { EventBus } from '../../../event-bus.js';

    * Defines the computed properties on the component.
    computed: {
        *   Collections count
        getCollectionCount: function() {
            if (this.stats) {
                return this.stats['collections'];


# Code of Conduct

Because PhpMongoAdmin is build on Laravel code, it makes sense to follow their implementation and derivation of the Ruby code of conduct. Any violations of the code of conduct may be reported to Gilbert Rehling (This email address is being protected from spambots. You need JavaScript enabled to view it.):

  • Participants will be tolerant of opposing views.
  • Participants must ensure that their language and actions are free of personal attacks and disparaging personal remarks.
  • When interpreting the words and actions of others, participants should always assume good intentions.
  • Behavior that can be reasonably considered harassment will not be tolerated.


Please also consider subscribing and contributing to our forum: PHP Mongo Tools


Go To Top