Completed
Push — master ( 49679a...617b2a )
by Sudar
02:03
created

License::is_valid()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 0
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php namespace EmailLog\License;
2
3
defined( 'ABSPATH' ) || exit; // Exit if accessed directly.
4
5
/**
6
 * EmailLog License.
7
 *
8
 * @since 2.0.0
9
 */
10
class License extends BaseLicense {
11
12
	/**
13
	 * Is the license activated and valid?
14
	 *
15
	 * @return bool True if license is active, False otherwise.
16
	 */
17
	public function is_valid() {
18
		// TODO: Implement is_valid() method.
19
		return false;
20
	}
21
22
	/**
23
	 * Get the license key.
24
	 *
25
	 * @return string License Key.
26
	 */
27
	public function get_license_key() {
28
		return $this->license_key;
29
	}
30
31
	/**
32
	 * Get the download url for the add-on.
33
	 *
34
	 * @return string Download url.
35
	 */
36
	public function get_download_url() {
37
		try {
38
			$response = $this->get_version();
39
		} catch ( \Exception $e ) {
40
			return '';
41
		}
42
43
		return $response->download_link;
44
	}
45
}
46