GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Passed
Push — master ( 3e7df4...ae93cb )
by Jared
03:36
created

Option   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 4
c 1
b 0
f 0
lcom 0
cbo 0
dl 0
loc 31
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A isAllowPrint() 0 13 4
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: jaredchu
5
 * Date: 12/1/16
6
 * Time: 5:37 PM
7
 */
8
9
namespace JCFirebase;
10
11
12
class Option {
13
	const __default = null;
14
15
	const OPTION_SHALLOW = 'shallow';
16
	const SHALLOW_TRUE = 'true';
17
	const SHALLOW_FALSE = 'false';
18
19
	const OPTION_PRINT = 'print';
20
	const PRINT_PRETTY = 'pretty';
21
	const PRINT_SILENT = 'silent';
22
23
	const REQ_TYPE_GET = 0;
24
	const REQ_TYPE_PUT = 1;
25
	const REQ_TYPE_POST = 2;
26
	const REQ_TYPE_PATCH = 3;
27
	const REQ_TYPE_DELETE = 4;
28
29
	public static function isAllowPrint( $reqType = self::REQ_TYPE_GET, $pType = self::PRINT_PRETTY ) {
30
		if ( $pType == self::PRINT_PRETTY ) {
31
			return true;
32
		}
33
34
		if ( $pType == self::PRINT_SILENT ) {
35
			if ( $reqType == self::REQ_TYPE_DELETE ) {
36
				return false;
37
			}
38
		}
39
40
		return true;
41
	}
42
}