for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace App;
/**
* Class Singleton.
*/
abstract class Singleton
{
* Create and return a User instance.
*
* @return $this
public static function getInstance()
static $instance = null;
if ($instance === null) {
$instance = new static();
}
return $instance;