1
1
mirror of https://github.com/namibia/awesome-cheatsheets.git synced 2024-12-18 08:34:06 +00:00

PHP: improve formating

This commit is contained in:
Julien Le Coupanec 2018-02-11 19:39:44 +01:00
parent 16619f2e28
commit 9a6984369d

View File

@ -6,9 +6,10 @@
*/ */
class NormalClass extends AbstractClassName implements InterfaceName class NormalClass extends AbstractClassName implements InterfaceName
{ {
use TraitName; use TraitName;
// Property types // --> PROPERTY TYPES <--
/** /**
* Public property, everyone can access this property. * Public property, everyone can access this property.
@ -34,7 +35,7 @@ class NormalClass extends AbstractClassName implements InterfaceName
*/ */
static $property; static $property;
// Function Types // --> FUNCTION TYPES <--
/** /**
* Public function, everyone can access this function. * Public function, everyone can access this function.
@ -43,7 +44,6 @@ class NormalClass extends AbstractClassName implements InterfaceName
*/ */
public function publicFunction(Type $var = null): Type public function publicFunction(Type $var = null): Type
{ {
# code...
} }
/** /**
@ -53,7 +53,6 @@ class NormalClass extends AbstractClassName implements InterfaceName
*/ */
private function privateFunction(Type $var = null): Type private function privateFunction(Type $var = null): Type
{ {
# code...
} }
/** /**
@ -63,7 +62,6 @@ class NormalClass extends AbstractClassName implements InterfaceName
*/ */
protected function protectedFunction(Type $var = null): Type protected function protectedFunction(Type $var = null): Type
{ {
# code...
} }
/** /**
@ -73,10 +71,9 @@ class NormalClass extends AbstractClassName implements InterfaceName
*/ */
public static function staticFunction(Type $var = null): Type public static function staticFunction(Type $var = null): Type
{ {
# code...
} }
// Magic methods // --> MAGIC METHODS <--
/** /**
* Gets triggered on creating a new class instance * Gets triggered on creating a new class instance
@ -86,7 +83,6 @@ class NormalClass extends AbstractClassName implements InterfaceName
*/ */
public function __construct(Type $var = null) public function __construct(Type $var = null)
{ {
# code...
} }
/** /**
@ -96,7 +92,6 @@ class NormalClass extends AbstractClassName implements InterfaceName
*/ */
public function __destruct() public function __destruct()
{ {
# code...
} }
/** /**
@ -108,7 +103,6 @@ class NormalClass extends AbstractClassName implements InterfaceName
*/ */
public function __set(string $name , mixed $value) public function __set(string $name , mixed $value)
{ {
# code...
} }
/** /**
@ -119,7 +113,6 @@ class NormalClass extends AbstractClassName implements InterfaceName
*/ */
public function __get(string $name) public function __get(string $name)
{ {
# code...
} }
/** /**
@ -130,7 +123,6 @@ class NormalClass extends AbstractClassName implements InterfaceName
*/ */
public function __isset(string $name) public function __isset(string $name)
{ {
# code...
} }
/** /**
@ -141,7 +133,6 @@ class NormalClass extends AbstractClassName implements InterfaceName
*/ */
public function __unset(string $name) public function __unset(string $name)
{ {
# code...
} }
/** /**
@ -153,7 +144,6 @@ class NormalClass extends AbstractClassName implements InterfaceName
*/ */
public function __call(string $name, array $arguments) public function __call(string $name, array $arguments)
{ {
# code...
} }
/** /**
@ -165,7 +155,6 @@ class NormalClass extends AbstractClassName implements InterfaceName
*/ */
public static function __callStatic(string $name, array $arguments) public static function __callStatic(string $name, array $arguments)
{ {
# code...
} }
/** /**
@ -174,7 +163,6 @@ class NormalClass extends AbstractClassName implements InterfaceName
*/ */
public function __sleep() public function __sleep()
{ {
# code...
} }
/** /**
@ -183,7 +171,6 @@ class NormalClass extends AbstractClassName implements InterfaceName
*/ */
public function __wakeup() public function __wakeup()
{ {
# code...
} }
/** /**
@ -192,7 +179,6 @@ class NormalClass extends AbstractClassName implements InterfaceName
*/ */
public function __toString() public function __toString()
{ {
# code...
} }
/** /**
@ -202,7 +188,6 @@ class NormalClass extends AbstractClassName implements InterfaceName
*/ */
public function __invoke(Type $var = null) public function __invoke(Type $var = null)
{ {
# code...
} }
/** /**
@ -212,7 +197,6 @@ class NormalClass extends AbstractClassName implements InterfaceName
*/ */
public static function __set_state(array $properties) public static function __set_state(array $properties)
{ {
# code...
} }
/** /**
@ -221,7 +205,6 @@ class NormalClass extends AbstractClassName implements InterfaceName
*/ */
public function __debugInfo() public function __debugInfo()
{ {
# code...
} }
} }