A repository of common files shared by Pho stack PHP projects.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github
.vs
.gitignore
CONTRIBUTING.md
LICENSE
README.md
composer.json

README.md

Graph

commons-php

A repository of common files shared by Pho stack PHP projects.

Coding Standards

  • Use logging.
  • info for debugging, warning for serious issues.
  • PSR-1 and PSR-2
  • _ prefix for in-class helper methods
  • __ prefix for duplicate method names imported from traits.
  • "hy" prefix for "hydrated" methods.

Directory Structure

Project Structure

Pre-commit Procedures

  • Make sure you have unit tests in regards to your contribution.
  • Run vendor/bin/phpunit to make sure the code passes all tests.
  • Use vendor/bin/phpcs src to check for coding standards.
  • Run vendor/bin/phpcs --report=diff src for a more detailed look.
  • Use vendor/bin/phpcbf src to fix non-standard coding.
  • Run vendor/bin/phpunit again to avoid any potential problems with php_codesniffer.

Links