Completed
Push — master ( 8f57d3...e59148 )
by Nikolai
03:08
created

Project   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getInfo() 0 5 1
A delete() 0 5 1
1
<?php
2
/**
3
 * Crowdin API implementation in PHP.
4
 *
5
 * @copyright  Copyright (C) 2016 Nikolai Plath (elkuku)
6
 * @license    GNU General Public License version 2 or later
7
 */
8
9
namespace ElKuKu\Crowdin\Package;
10
11
use ElKuKu\Crowdin\Package;
12
13
/**
14
 * Class Project
15
 *
16
 * @since  1.0.5
17
 */
18
Class Project extends Package
19
{
20
	/**
21
	 * Get Crowdin Project details.
22
	 *
23
	 * @since 1.0.5
24
	 * @see   https://crowdin.com/page/api/info
25
	 *
26
	 * @return \Psr\Http\Message\ResponseInterface
27
	 */
28
	public function getInfo()
29
	{
30
		return $this->getHttpClient()
31
			->post($this->getBasePath('info'));
32
	}
33
34
	/**
35
	 * Delete Crowdin project with all translations.
36
	 *
37
	 * @since 1.0.5
38
	 * @see   https://crowdin.com/page/api/delete-project
39
	 *
40
	 * @return \Psr\Http\Message\ResponseInterface
41
	 */
42
	public function delete()
43
	{
44
		return $this->getHttpClient()
45
			->get($this->getBasePath('delete-project'));
46
	}
47
}
48