Add public keyword to methods
[MAILPOET-2413]
This commit is contained in:
@@ -8,15 +8,15 @@ use MailPoetVendor\Symfony\Component\DependencyInjection\Reference;
|
||||
|
||||
class ContainerConfigurator implements IContainerConfigurator {
|
||||
|
||||
function getDumpNamespace() {
|
||||
public function getDumpNamespace() {
|
||||
return 'MailPoetGenerated';
|
||||
}
|
||||
|
||||
function getDumpClassname() {
|
||||
public function getDumpClassname() {
|
||||
return 'FreeCachedContainer';
|
||||
}
|
||||
|
||||
function configure(ContainerBuilder $container) {
|
||||
public function configure(ContainerBuilder $container) {
|
||||
// Every service must be registered
|
||||
// Strict mode disables magical loading services by looking for an instance within other services
|
||||
// see https://symfonycasts.com/screencast/symfony4-upgrade/service-deprecations#strict-autowiring-mode
|
||||
@@ -272,7 +272,7 @@ class ContainerConfigurator implements IContainerConfigurator {
|
||||
]);
|
||||
}
|
||||
|
||||
static function getPremiumService($id, ContainerInterface $container = null) {
|
||||
public static function getPremiumService($id, ContainerInterface $container = null) {
|
||||
if (!$container->has(IContainerConfigurator::PREMIUM_CONTAINER_SERVICE_SLUG)) {
|
||||
return null;
|
||||
}
|
||||
|
@@ -25,7 +25,7 @@ class ContainerFactory {
|
||||
/**
|
||||
* @return Container
|
||||
*/
|
||||
function getContainer() {
|
||||
public function getContainer() {
|
||||
$dump_class = '\\' . $this->configurator->getDumpNamespace() . '\\' . $this->configurator->getDumpClassname();
|
||||
if (!$this->debug && class_exists($dump_class)) {
|
||||
$container = new $dump_class();
|
||||
@@ -36,7 +36,7 @@ class ContainerFactory {
|
||||
return $container;
|
||||
}
|
||||
|
||||
function getConfiguredContainer() {
|
||||
public function getConfiguredContainer() {
|
||||
return $this->configurator->configure(new ContainerBuilder());
|
||||
}
|
||||
}
|
||||
|
@@ -22,7 +22,7 @@ class ContainerWrapper implements ContainerInterface {
|
||||
$this->premium_container = $premium_container;
|
||||
}
|
||||
|
||||
function get($id) {
|
||||
public function get($id) {
|
||||
try {
|
||||
return $this->free_container->get($id);
|
||||
} catch (NotFoundExceptionInterface $e) {
|
||||
@@ -33,21 +33,21 @@ class ContainerWrapper implements ContainerInterface {
|
||||
}
|
||||
}
|
||||
|
||||
function has($id) {
|
||||
public function has($id) {
|
||||
return $this->free_container->has($id) || ($this->premium_container && $this->premium_container->has($id));
|
||||
}
|
||||
|
||||
/**
|
||||
* @return ContainerInterface|null
|
||||
*/
|
||||
function getPremiumContainer() {
|
||||
public function getPremiumContainer() {
|
||||
if (!$this->premium_container && class_exists(\MailPoet\Premium\DI\ContainerConfigurator::class)) {
|
||||
$this->premium_container = self::createPremiumContainer($this->free_container);
|
||||
}
|
||||
return $this->premium_container;
|
||||
}
|
||||
|
||||
static function getInstance($debug = false) {
|
||||
public static function getInstance($debug = false) {
|
||||
if (self::$instance) {
|
||||
return self::$instance;
|
||||
}
|
||||
|
@@ -8,7 +8,7 @@ interface IContainerConfigurator {
|
||||
const FREE_CONTAINER_SERVICE_SLUG = 'free_container';
|
||||
const PREMIUM_CONTAINER_SERVICE_SLUG = 'premium_container';
|
||||
|
||||
function configure(ContainerBuilder $container);
|
||||
function getDumpNamespace();
|
||||
function getDumpClassname();
|
||||
public function configure(ContainerBuilder $container);
|
||||
public function getDumpNamespace();
|
||||
public function getDumpClassname();
|
||||
}
|
||||
|
Reference in New Issue
Block a user