Completed
Push — master ( 9c2b09...5e7564 )
by Francis
01:33
created

libraries/RESTAuth.php (1 issue)

1
<?php
2
defined('BASEPATH') OR exit('No direct script access allowed');
3
4
class RESTAuth {
5
  /**
6
   * [BasicAuth description]
7
   * @var string
8
   */
9
  const BASIC   = "Basic";
10
  /**
11
   * [API_KEY description]
12
   * @var string
13
   */
14
  const API_KEY = "ApiKey";
15
  /**
16
   * [BEARER description]
17
   * @var string
18
   */
19
  const BEARER  = "Bearer";
20
  /**
21
   * [OAUTH2 description]
22
   * @var string
23
   */
24
  const OAUTH2  = "OAUTH2";
25
  /**
26
   * [IP description]
27
   * @var string
28
   */
29
  const IP      = "IP";
30
  /**
31
   * [CUSTOM description]
32
   * @param  string $header [description]
33
   * @return string         [description]
34
   */
35
  public static function CUSTOM(string $header):string {
36
    return 'HTTP_'.str_replace('-', '_', $header);
37
  }
38
}
39
?>
0 ignored issues
show
It is not recommended to use PHP's closing tag ?> in files other than templates.

Using a closing tag in PHP files that only contain PHP code is not recommended as you might accidentally add whitespace after the closing tag which would then be output by PHP. This can cause severe problems, for example headers cannot be sent anymore.

A simple precaution is to leave off the closing tag as it is not required, and it also has no negative effects whatsoever.

Loading history...
40