X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=Civi%2FCore%2FResolver.php;h=b1e54684a627629d4004068b9e83330177c76f38;hb=67755a31f744198c7fd8ae4f3be3cdf7e4d93a90;hp=0d71d185e7fd70e0bd9df207fe430e30ef3b83b7;hpb=90ed84f44ab3956228f1e448dc52b8c3f89e477d;p=civicrm-core.git diff --git a/Civi/Core/Resolver.php b/Civi/Core/Resolver.php index 0d71d185e7..b1e54684a6 100644 --- a/Civi/Core/Resolver.php +++ b/Civi/Core/Resolver.php @@ -77,7 +77,7 @@ class Resolver { case 'call': // Callback: Object/method in container. $obj = \Civi::service($url['host']); - return array($obj, ltrim($url['path'], '/')); + return [$obj, ltrim($url['path'], '/')]; case 'api3': // Callback: API. @@ -91,7 +91,7 @@ class Resolver { throw new \RuntimeException("Unsupported callback scheme: " . $url['scheme']); } } - elseif (in_array($id, array('0', '1'))) { + elseif (in_array($id, ['0', '1'])) { // Callback: Constant value. return new ResolverConstantCallback((int) $id); } @@ -184,7 +184,7 @@ class ResolverApi { * Fire an API call. */ public function __invoke() { - $apiParams = array(); + $apiParams = []; if (isset($this->url['query'])) { parse_str($this->url['query'], $apiParams); } @@ -212,7 +212,7 @@ class ResolverApi { * (e.g. "@1" => "firstValue"). */ protected function createPlaceholders($prefix, $args) { - $result = array(); + $result = []; foreach ($args as $offset => $arg) { $result[$prefix . (1 + $offset)] = $arg; } @@ -250,7 +250,8 @@ class ResolverApi { } class ResolverGlobalCallback { - private $mode, $path; + private $mode; + private $path; /** * Class constructor.