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.

Attachment::__call()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 0 Features 1
Metric Value
c 2
b 0
f 1
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 2
1
<?php namespace Camelcased\Postmark\Inbound;
2
3
class Attachment {
4
	/**
5
	 * @var array
6
	 */
7
	protected $attachment;
8
9
	public function __construct(array $attachment)
10
	{
11
		$this->attachment = $attachment;
12
	}
13
14
	/**
15
	 * Maps any undefined functions to the correct field within the attachment
16
	 *
17
	 * @return mixed
18
	 */
19
	public function __call($name, $arguments)
20
	{
21
		return $this->attachment[$name];
22
	}
23
24
	/**
25
	 * Returns the attachments MIME type. Ex: image/jpeg
26
	 *
27
	 * @return string
28
	 */
29
	public function Type()
30
	{
31
		return $this->attachment['MIME'];
32
	}
33
34
	/**
35
	 * Returns the content of the attachment in all of it's raw glory
36
	 *
37
	 * @return string
38
	 */
39
	public function DecodedContent()
40
	{
41
		return base64_decode($this->attachment['Content']);
42
	}
43
}
44