Skip to content

Convert imp from global $conf to ImpConfig #114

Description

@ralflang

This is a low hanging fruit.

Old Pattern: global

Pattern a:

global $conf;
if (empty($conf['holidays']['enable'])) { // whatever}

Pattern b:

if (empty($GLOBALS['conf'][holidays]['enable'])) { // whatever}

New Pattern: ImpConfig

At the top of file:

use Horde\Imp\ImpConfig;

At the place where you found the pattern:
$config = $injector->get('ImpConfig');
if (empty($config->get('holidays.enable'))) { // whatever}

PRs for individual or few conversions are accepted, you don't need to submit a large bulk transformation PR.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions