Skip to content

Commit edc9374

Browse files
authored
Merge pull request #1601 from samsonasik/cleanup-config-service
clean up \Config\Services in Common.php
2 parents 9ca2e65 + 81a8033 commit edc9374

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

system/Common.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969
*/
7070
function cache(string $key = null)
7171
{
72-
$cache = \Config\Services::cache();
72+
$cache = Services::cache();
7373

7474
// No params - return cache object
7575
if (is_null($key))
@@ -298,7 +298,7 @@ function esc($data, $context = 'html', $encoding = null)
298298
*/
299299
function session($val = null)
300300
{
301-
$session = \Config\Services::session();
301+
$session = Services::session();
302302

303303
// Returning a single item?
304304
if (is_string($val))
@@ -325,7 +325,7 @@ function session($val = null)
325325
*/
326326
function timer(string $name = null)
327327
{
328-
$timer = \Config\Services::timer();
328+
$timer = Services::timer();
329329

330330
if (empty($name))
331331
{
@@ -692,7 +692,7 @@ function csrf_hash()
692692
*/
693693
function csrf_field(string $id = null)
694694
{
695-
return '<input type="hidden"' . (!empty($id) ? ' id="' . esc($id, 'attr') . '"' : '') . ' name="' . csrf_token() . '" value="' . csrf_hash() . '" />';
695+
return '<input type="hidden"' . (! empty($id) ? ' id="' . esc($id, 'attr') . '"' : '') . ' name="' . csrf_token() . '" value="' . csrf_hash() . '" />';
696696
}
697697
}
698698

0 commit comments

Comments
 (0)