Passed
Pull Request — master (#140)
by
unknown
04:07 queued 01:40
created

HasDecodableBody::getDecodedBody()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 1
dl 0
loc 5
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Ddomanskyi\LaravelGmail\Traits;
4
5
trait HasDecodableBody
6
{
7
8
	/**
9
	 * @param $content
10
	 *
11
	 * @return string
12
	 */
13
	public function getDecodedBody($content)
14
	{
15
		$content = str_replace('_', '/', str_replace('-', '+', $content));
16
17
		return base64_decode($content);
18
	}
19
20
}
21