Completed
Push — master ( 1ce70a...0adf65 )
by Litera
11:25 queued 21s
created

EventService::insertParticipant()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 11
Code Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 8
nc 1
nop 4
dl 0
loc 11
rs 9.4285
c 1
b 0
f 0
1
<?php
2
3
namespace App\Services\SkautIS;
4
5
/**
6
 * User service
7
 */
8
class EventService extends SkautisService
9
{
10
11
	/**
12
	 * @param   void
13
	 * @return  stdClass
14
	 *
15
	 * @throws Skautis\Wsdl\WsdlException
16
	 */
17
	public function insertParticipant($loginId, $personId, $educationEventId, $educationEventCourseId)
18
	{
19
		return $this->getSkautis()
20
			->event
21
			->participantEducationInsert(([
22
				'ID_EventEducation'       => $educationEventId,
23
				'ID_Person'               => $personId,
24
				'ID_EventEducationCourse' => $educationEventCourseId,
25
				'ID_Login'                => $loginId,
26
			]));
27
	}
28
29
	/**
30
	 * @param  int    $loginId
31
	 * @param  int    $educationEventCourseId
32
	 * @param  string $phone
33
	 * @return stdClass
34
	 *
35
	 * @throws Skautis\Wsdl\WsdlException
36
	 */
37
	public function insertEnroll($loginId, $educationEventCourseId, $phone)
38
	{
39
		return $this->getSkautis()
40
			->event
41
			->participantEducationInsertEnroll(([
42
				'ID_EventEducationCourse' => $educationEventCourseId,
43
				'ID_Login'                => $loginId,
44
				'Phone'                   => $phone,
45
				'Acknownledgement'        => true,
46
				'Affirmation'             => true,
47
			]));
48
	}
49
50
}
51