Accepting suggestions.
-
-
Save defaultpage/e1baeefd599951deb8afdae20f69e36c to your computer and use it in GitHub Desktop.
PHP convention for the order in a class.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php namespace Vendor\Library; | |
use Another\Vendor\Library\ClassName; | |
abstract class ClassName extends AnotherClass implements Countable, Serializable | |
{ | |
const CONSTANTS = 'top'; | |
use someTrait, anotherTrait { | |
anotherTrait::traitMethod insteadof someTrait; | |
someTrait::anotherTraitMethod insteadof anotherTrait; | |
someTrait::traitMethod as duplicate; | |
}; | |
public static $properties; | |
protected static $properties; | |
private static $properties; | |
public static function methods() {} | |
protected static function methods() {} | |
private static function methods() {} | |
public $properties; | |
protected $properties; | |
private $properties; | |
public function __construct() {} | |
public function __destruct() {} | |
public function __get() {} | |
public function __set() {} | |
public function getters() {} | |
public function setters() {} | |
public function methods() {} | |
final public function methods() {} | |
protected function methods() {} | |
final protected function methods() {} | |
private function methods() {} | |
abstract public function methods(); | |
abstract protected function methods(); | |
abstract private function methods(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment