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.
Test Setup Failed
Push — master ( 859c79...16ec0a )
by Igor
12:08 queued 05:53
created
src/Route4Me/V5/ResultResponse.php 1 patch
Indentation   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -11,23 +11,23 @@
 block discarded – undo
11 11
  */
12 12
 class ResultResponse extends \Route4Me\Common
13 13
 {
14
-    /** Status  (true/false)
15
-     * @var boolean $status
16
-     */
17
-    public $status;
14
+	/** Status  (true/false)
15
+	 * @var boolean $status
16
+	 */
17
+	public $status;
18 18
 
19
-    /** Status code
20
-     * @var integer $code
21
-     */
22
-    public $code;
19
+	/** Status code
20
+	 * @var integer $code
21
+	 */
22
+	public $code;
23 23
 
24
-    /** Exit code
25
-     * @var integer $exit_code
26
-     */
27
-    public $exit_code;
24
+	/** Exit code
25
+	 * @var integer $exit_code
26
+	 */
27
+	public $exit_code;
28 28
 
29
-    /** An array of the error messages.
30
-     * @var Array $messages
31
-     */
32
-    public $messages;
29
+	/** An array of the error messages.
30
+	 * @var Array $messages
31
+	 */
32
+	public $messages;
33 33
 }
Please login to merge, or discard this patch.
src/Route4Me/Tracking/MemberData.php 1 patch
Indentation   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -4,30 +4,30 @@
 block discarded – undo
4 4
 
5 5
 class MemberData extends \Route4Me\Common
6 6
 {
7
-    /** @var int $account_type_id */
8
-    public $account_type_id;
7
+	/** @var int $account_type_id */
8
+	public $account_type_id;
9 9
 
10
-    /** @var string $member_email */
11
-    public $member_email;
10
+	/** @var string $member_email */
11
+	public $member_email;
12 12
 
13
-    /** @var string $member_first_name */
14
-    public $member_first_name;
13
+	/** @var string $member_first_name */
14
+	public $member_first_name;
15 15
 
16
-    /** @var int $member_id */
17
-    public $member_id;
16
+	/** @var int $member_id */
17
+	public $member_id;
18 18
 
19
-    /** @var string $member_last_name */
20
-    public $member_last_name;
19
+	/** @var string $member_last_name */
20
+	public $member_last_name;
21 21
 
22
-    /** @var string $member_type */
23
-    public $member_type;
22
+	/** @var string $member_type */
23
+	public $member_type;
24 24
 
25
-    /** @var string $phone_number */
26
-    public $phone_number;
25
+	/** @var string $phone_number */
26
+	public $phone_number;
27 27
 
28
-    /** @var boolean $readonly_user */
29
-    public $readonly_user;
28
+	/** @var boolean $readonly_user */
29
+	public $readonly_user;
30 30
 
31
-    /** @var boolean $show_superuser_addresses */
32
-    public $show_superuser_addresses;
31
+	/** @var boolean $show_superuser_addresses */
32
+	public $show_superuser_addresses;
33 33
 }
Please login to merge, or discard this patch.
src/Route4Me/Tracking/UserTracking.php 1 patch
Indentation   +54 added lines, -54 removed lines patch added patch discarded remove patch
@@ -4,84 +4,84 @@
 block discarded – undo
4 4
 
5 5
 class UserTracking extends \Route4Me\Common
6 6
 {
7
-    /** @var string $route_id */
8
-    public $route_id;
7
+	/** @var string $route_id */
8
+	public $route_id;
9 9
 
10
-    /** @var string $device_id */
11
-    public $device_id;
10
+	/** @var string $device_id */
11
+	public $device_id;
12 12
 
13
-    /** @var long $activity_timestamp */
14
-    public $activity_timestamp;
13
+	/** @var long $activity_timestamp */
14
+	public $activity_timestamp;
15 15
 
16
-    /** @var string $activity_timestamp */
17
-    public $device_timestamp;
16
+	/** @var string $activity_timestamp */
17
+	public $device_timestamp;
18 18
 
19
-    /** @var int $device_type */
20
-    public $device_type;
19
+	/** @var int $device_type */
20
+	public $device_type;
21 21
 
22
-    /** @var int $member_id */
23
-    public $member_id;
22
+	/** @var int $member_id */
23
+	public $member_id;
24 24
 
25
-    /** @var int $root_member_id */
26
-    public $root_member_id;
25
+	/** @var int $root_member_id */
26
+	public $root_member_id;
27 27
 
28
-    /** @var string $vehicle_id */
29
-    public $vehicle_id;
28
+	/** @var string $vehicle_id */
29
+	public $vehicle_id;
30 30
 
31
-    /** @var int $direction */
32
-    public $direction;
31
+	/** @var int $direction */
32
+	public $direction;
33 33
 
34
-    /** @var int $speed */
35
-    public $speed;
34
+	/** @var int $speed */
35
+	public $speed;
36 36
 
37
-    /** @var string $calculated_speed */
38
-    public $calculated_speed;
37
+	/** @var string $calculated_speed */
38
+	public $calculated_speed;
39 39
 
40
-    /** @var string $speed_accuracy */
41
-    public $speed_accuracy;
40
+	/** @var string $speed_accuracy */
41
+	public $speed_accuracy;
42 42
 
43
-    /** @var string $speed_unit */
44
-    public $speed_unit;
43
+	/** @var string $speed_unit */
44
+	public $speed_unit;
45 45
 
46
-    /** @var int $bearing */
47
-    public $bearing;
46
+	/** @var int $bearing */
47
+	public $bearing;
48 48
 
49
-    /** @var string $bearing_accuracy */
50
-    public $bearing_accuracy;
49
+	/** @var string $bearing_accuracy */
50
+	public $bearing_accuracy;
51 51
 
52
-    /** @var string $accuracy */
53
-    public $accuracy;
52
+	/** @var string $accuracy */
53
+	public $accuracy;
54 54
 
55
-    /** @var int $day_id */
56
-    public $day_id;
55
+	/** @var int $day_id */
56
+	public $day_id;
57 57
 
58
-    /** @var double $position_lat */
59
-    public $position_lat;
58
+	/** @var double $position_lat */
59
+	public $position_lat;
60 60
 
61
-    /** @var double $position_lng */
62
-    public $position_lng;
61
+	/** @var double $position_lng */
62
+	public $position_lng;
63 63
 
64
-    /** @var int $altitude */
65
-    public $altitude;
64
+	/** @var int $altitude */
65
+	public $altitude;
66 66
 
67
-    /** @var int $footsteps */
68
-    public $footsteps;
67
+	/** @var int $footsteps */
68
+	public $footsteps;
69 69
 
70
-    /** @var string $data_source_name */
71
-    public $data_source_name;
70
+	/** @var string $data_source_name */
71
+	public $data_source_name;
72 72
 
73
-    /** @var string $custom_data */
74
-    public $custom_data;
73
+	/** @var string $custom_data */
74
+	public $custom_data;
75 75
 
76
-    /** @var string $device_timezone */
77
-    public $device_timezone;
76
+	/** @var string $device_timezone */
77
+	public $device_timezone;
78 78
 
79
-    /** @var int $device_timezone_offset */
80
-    public $device_timezone_offset;
79
+	/** @var int $device_timezone_offset */
80
+	public $device_timezone_offset;
81 81
 
82
-    /** @var string $activity_timestamp_friendly */
83
-    public $activity_timestamp_friendly;
82
+	/** @var string $activity_timestamp_friendly */
83
+	public $activity_timestamp_friendly;
84 84
 
85
-    /** @var long $LAST_KNOWN */
86
-    public $LAST_KNOWN;
85
+	/** @var long $LAST_KNOWN */
86
+	public $LAST_KNOWN;
87 87
 }
Please login to merge, or discard this patch.
src/Route4Me/Tracking/SetGpsResponse.php 1 patch
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -4,13 +4,13 @@
 block discarded – undo
4 4
 
5 5
 class SetGpsResponse extends \Route4Me\Common
6 6
 {
7
-    /** @var boolean  $status
8
-     * Status of the GPS setting request process.
9
-     */
10
-    public $status;
7
+	/** @var boolean  $status
8
+	 * Status of the GPS setting request process.
9
+	 */
10
+	public $status;
11 11
 
12
-    /** @var string $tx_id
13
-     * Unique ID of the GPS points group.
14
-     */
15
-    public $tx_id;
12
+	/** @var string $tx_id
13
+	 * Unique ID of the GPS points group.
14
+	 */
15
+	public $tx_id;
16 16
 }
Please login to merge, or discard this patch.
src/Route4Me/Tracking/FindAssetResponse.php 1 patch
Indentation   +137 added lines, -137 removed lines patch added patch discarded remove patch
@@ -8,141 +8,141 @@
 block discarded – undo
8 8
  */
9 9
 class FindAssetResponse extends \Route4Me\Common
10 10
 {
11
-    /**
12
-    * Tracking number
13
-    * @var type string
14
-    */
15
-    public $tracking_number;
16
-    
17
-    /**
18
-    * A link to a large logo
19
-    * @var type string
20
-    */
21
-    public $large_logo_uri;
22
-    
23
-    /**
24
-    * A link to a large logo (2x)
25
-    * @var type string
26
-    */
27
-    public $large_logo_uri_2x;
28
-    
29
-    /**
30
-    * A link to a mobile logo
31
-    * @var type string
32
-    */
33
-    public $mobile_logo_uri;
34
-    
35
-    /**
36
-    * A link to a mobile logo (2x)
37
-    * @var type string
38
-    */
39
-    public $mobile_logo_uri_2x;
40
-    
41
-    /**
42
-    * The asset color on a map
43
-    * @var type string
44
-    */
45
-    public $map_color;
46
-    
47
-    /**
48
-    * An alignment of a large logo
49
-    * @var type string
50
-    */
51
-    public $large_logo_alignment;
52
-    
53
-    /**
54
-    * An alignment of a mobile logo
55
-    * @var type string
56
-    */
57
-    public $mobile_logo_alignment;
58
-    
59
-    /**
60
-    * Show map zoom controls
61
-    * @var type Boolean
62
-    */
63
-    public $show_map_zoom_controls;
64
-    
65
-    /**
66
-    * Customer service phone
67
-    * @var type string
68
-    */
69
-    public $customer_service_phone;
70
-    
71
-    /**
72
-    * If true, Covid19 warning hidden
73
-    * @var type
74
-    */
75
-    public $hide_covid19_warning;
76
-    
77
-    /**
78
-    * Driver phone number
79
-    * @var type string
80
-    */
81
-    public $driver_phone;
82
-    
83
-    /**
84
-    * If true, the route started
85
-    * @var type Boolean
86
-    */
87
-    public $route_started;
88
-    
89
-    /**
90
-    * Driver name
91
-    * @var type string
92
-    */
93
-    public $driver_name;
94
-    
95
-    /**
96
-    * A link to a driver picture file
97
-    * @var type string
98
-    */
99
-    public $driver_picture;
100
-    
101
-    /**
102
-    * A sub-headline of a tracking page
103
-    * @var type string
104
-    */
105
-    public $tracking_page_subheadline;
106
-    
107
-    /**
108
-    * A first destination address
109
-    * @var type string
110
-    */
111
-    public $destination_address_1;
112
-    
113
-    /**
114
-    * A second destination address
115
-    * @var type string
116
-    */
117
-    public $destination_address_2;
118
-    
119
-    /**
120
-    * True if the asset was delivered
121
-    * @var type Boolean
122
-    */
123
-    public $delivered;
124
-    
125
-    /**
126
-     * Asset status history
127
-     * @var type array
128
-     */
129
-    public $status_history = [];
130
-    
131
-    /**
132
-     * An array of the asset locations
133
-     * @var type array
134
-     */
135
-    public $locations = [];
136
-    
137
-    /**
138
-     * Custom data
139
-     * @var type array
140
-     */
141
-    public $custom_data;
142
-    
143
-    /**
144
-     * An array of the asset arrival times
145
-     * @var type array
146
-     */
147
-    public $arrival = [];
11
+	/**
12
+	 * Tracking number
13
+	 * @var type string
14
+	 */
15
+	public $tracking_number;
16
+    
17
+	/**
18
+	 * A link to a large logo
19
+	 * @var type string
20
+	 */
21
+	public $large_logo_uri;
22
+    
23
+	/**
24
+	 * A link to a large logo (2x)
25
+	 * @var type string
26
+	 */
27
+	public $large_logo_uri_2x;
28
+    
29
+	/**
30
+	 * A link to a mobile logo
31
+	 * @var type string
32
+	 */
33
+	public $mobile_logo_uri;
34
+    
35
+	/**
36
+	 * A link to a mobile logo (2x)
37
+	 * @var type string
38
+	 */
39
+	public $mobile_logo_uri_2x;
40
+    
41
+	/**
42
+	 * The asset color on a map
43
+	 * @var type string
44
+	 */
45
+	public $map_color;
46
+    
47
+	/**
48
+	 * An alignment of a large logo
49
+	 * @var type string
50
+	 */
51
+	public $large_logo_alignment;
52
+    
53
+	/**
54
+	 * An alignment of a mobile logo
55
+	 * @var type string
56
+	 */
57
+	public $mobile_logo_alignment;
58
+    
59
+	/**
60
+	 * Show map zoom controls
61
+	 * @var type Boolean
62
+	 */
63
+	public $show_map_zoom_controls;
64
+    
65
+	/**
66
+	 * Customer service phone
67
+	 * @var type string
68
+	 */
69
+	public $customer_service_phone;
70
+    
71
+	/**
72
+	 * If true, Covid19 warning hidden
73
+	 * @var type
74
+	 */
75
+	public $hide_covid19_warning;
76
+    
77
+	/**
78
+	 * Driver phone number
79
+	 * @var type string
80
+	 */
81
+	public $driver_phone;
82
+    
83
+	/**
84
+	 * If true, the route started
85
+	 * @var type Boolean
86
+	 */
87
+	public $route_started;
88
+    
89
+	/**
90
+	 * Driver name
91
+	 * @var type string
92
+	 */
93
+	public $driver_name;
94
+    
95
+	/**
96
+	 * A link to a driver picture file
97
+	 * @var type string
98
+	 */
99
+	public $driver_picture;
100
+    
101
+	/**
102
+	 * A sub-headline of a tracking page
103
+	 * @var type string
104
+	 */
105
+	public $tracking_page_subheadline;
106
+    
107
+	/**
108
+	 * A first destination address
109
+	 * @var type string
110
+	 */
111
+	public $destination_address_1;
112
+    
113
+	/**
114
+	 * A second destination address
115
+	 * @var type string
116
+	 */
117
+	public $destination_address_2;
118
+    
119
+	/**
120
+	 * True if the asset was delivered
121
+	 * @var type Boolean
122
+	 */
123
+	public $delivered;
124
+    
125
+	/**
126
+	 * Asset status history
127
+	 * @var type array
128
+	 */
129
+	public $status_history = [];
130
+    
131
+	/**
132
+	 * An array of the asset locations
133
+	 * @var type array
134
+	 */
135
+	public $locations = [];
136
+    
137
+	/**
138
+	 * Custom data
139
+	 * @var type array
140
+	 */
141
+	public $custom_data;
142
+    
143
+	/**
144
+	 * An array of the asset arrival times
145
+	 * @var type array
146
+	 */
147
+	public $arrival = [];
148 148
 }
Please login to merge, or discard this patch.
src/Route4Me/Tracking/UserLocation.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -9,12 +9,12 @@
 block discarded – undo
9 9
  */
10 10
 class UserLocation extends \Route4Me\Common
11 11
 {
12
-    /** @var MemberData[] $member_data */
13
-    public $member_data=[];
12
+	/** @var MemberData[] $member_data */
13
+	public $member_data=[];
14 14
 
15
-    /** @var UserTracking[] $tracking */
16
-    public $tracking = [];
15
+	/** @var UserTracking[] $tracking */
16
+	public $tracking = [];
17 17
 
18
-    /** @var boolean $from_cache*/
19
-    public $from_cache;
18
+	/** @var boolean $from_cache*/
19
+	public $from_cache;
20 20
 }
Please login to merge, or discard this patch.
src/Route4Me/RapidAddressSearchResponse.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@
 block discarded – undo
6 6
 
7 7
 class RapidAddressSearchResponse extends Common
8 8
 {
9
-    public $zipcode;
10
-    public $street_name;
11
-    public $county_no;
9
+	public $zipcode;
10
+	public $street_name;
11
+	public $county_no;
12 12
 }
Please login to merge, or discard this patch.
src/Route4Me/DirectionLocation.php 1 patch
Indentation   +41 added lines, -41 removed lines patch added patch discarded remove patch
@@ -11,45 +11,45 @@
 block discarded – undo
11 11
  */
12 12
 class DirectionLocation extends Common
13 13
 {
14
-    /**
15
-     * Direction name
16
-     * @var string
17
-     */
18
-    public $name;
19
-
20
-    /**
21
-     * Required time for passing the segment (seconds)
22
-     * @var integer
23
-     */
24
-    public $time;
25
-
26
-    /**
27
-     * Segment distance
28
-     * @var double
29
-     */
30
-    public $segment_distance;
31
-
32
-    /**
33
-     * Start Location
34
-     * @var string
35
-     */
36
-    public $start_location;
37
-
38
-    /**
39
-     * End Location
40
-     * @var string
41
-     */
42
-    public $end_location;
43
-
44
-    /**
45
-     * Directions Error
46
-     * @var string
47
-     */
48
-    public $directions_error;
49
-
50
-    /**
51
-     * Error Code
52
-     * @var integer
53
-     */
54
-    public $error_code;
14
+	/**
15
+	 * Direction name
16
+	 * @var string
17
+	 */
18
+	public $name;
19
+
20
+	/**
21
+	 * Required time for passing the segment (seconds)
22
+	 * @var integer
23
+	 */
24
+	public $time;
25
+
26
+	/**
27
+	 * Segment distance
28
+	 * @var double
29
+	 */
30
+	public $segment_distance;
31
+
32
+	/**
33
+	 * Start Location
34
+	 * @var string
35
+	 */
36
+	public $start_location;
37
+
38
+	/**
39
+	 * End Location
40
+	 * @var string
41
+	 */
42
+	public $end_location;
43
+
44
+	/**
45
+	 * Directions Error
46
+	 * @var string
47
+	 */
48
+	public $directions_error;
49
+
50
+	/**
51
+	 * Error Code
52
+	 * @var integer
53
+	 */
54
+	public $error_code;
55 55
 }
Please login to merge, or discard this patch.
src/Route4Me/AddressNote.php 1 patch
Indentation   +218 added lines, -218 removed lines patch added patch discarded remove patch
@@ -11,222 +11,222 @@
 block discarded – undo
11 11
  */
12 12
 class AddressNote extends Common
13 13
 {
14
-    /**
15
-     * An unique ID of a note
16
-     * @var integer
17
-     */
18
-    public $note_id;
19
-
20
-    /**
21
-     * The route ID
22
-     * @var string
23
-     */
24
-    public $route_id;
25
-
26
-    /**
27
-     * The route destination ID
28
-     * @var integer
29
-     */
30
-    public $route_destination_id;
31
-
32
-    /**
33
-     * An unique ID of an uploaded file
34
-     * @var string
35
-     */
36
-    public $upload_id;
37
-
38
-    /**
39
-     * When the note was added
40
-     * @var integer
41
-     */
42
-    public $ts_added;
43
-
44
-    /**
45
-     * The position latitude where the address note was added
46
-     * @var double
47
-     */
48
-    public $lat;
49
-
50
-    /**
51
-     * The position longitude where the address note was added
52
-     * @var double
53
-     */
54
-    public $lng;
55
-
56
-    /**
57
-     * The activity type
58
-     * @var string
59
-     */
60
-    public $activity_type;
61
-
62
-    /**
63
-     * The note text contents
64
-     * @var string
65
-     */
66
-    public $contents;
67
-
68
-    /**
69
-     * An upload type of the note
70
-     * @var string
71
-     */
72
-    public $upload_type;
73
-
74
-    /**
75
-     * An upload url - where a file-note was uploaded.
76
-     * @var string
77
-     */
78
-    public $upload_url;
79
-
80
-    /**
81
-     * An extension of the uploaded file.
82
-     * @var string
83
-     */
84
-    public $upload_extension;
85
-
86
-    /**
87
-     * The device a note was uploaded from.
88
-     * @var string
89
-     */
90
-    public $device_type;
91
-
92
-    /**
93
-     * Array of the custom type notes.
94
-     * @var CustomNoteType[]
95
-     */
96
-    public $custom_types;
97
-
98
-    public function __construct()
99
-    {
100
-    }
101
-
102
-    /**
103
-     * Get notes from the specified route destination.<br>
104
-     * Returns an address object with notes, if an address exists, otherwise - return null.
105
-     */
106
-    public static function GetAddressesNotes($noteParams)
107
-    {
108
-        $address = Route4Me::makeRequst([
109
-            'url'       => Endpoint::ADDRESS_V4,
110
-            'method'    => 'GET',
111
-            'query'     => [
112
-                'route_id'              => isset($noteParams['route_id']) ? $noteParams['route_id'] : null,
113
-                'route_destination_id'  => isset($noteParams['route_destination_id'])
114
-                    ? $noteParams['route_destination_id'] : null,
115
-                'notes' => 1,
116
-            ],
117
-        ]);
118
-
119
-        return $address;
120
-    }
121
-
122
-    public function createCustomNoteType($params)
123
-    {
124
-        $allBodyFields = ['type', 'values'];
125
-
126
-        $result = Route4Me::makeRequst([
127
-            'url'       => Endpoint::NOTE_CUSTOM_TYPES_V4,
128
-            'method'    => 'POST',
129
-            'body'      => Route4Me::generateRequestParameters($allBodyFields, $params),
130
-        ]);
131
-
132
-        return $result;
133
-    }
134
-
135
-    public function removeCustomNoteType($params)
136
-    {
137
-        $result = Route4Me::makeRequst([
138
-            'url'       => Endpoint::NOTE_CUSTOM_TYPES_V4,
139
-            'method'    => 'DELETE',
140
-            'body'      => [
141
-                'id' => isset($params['id']) ? $params['id'] : null,
142
-            ],
143
-        ]);
144
-
145
-        return $result;
146
-    }
147
-
148
-    public function getAllCustomNoteTypes()
149
-    {
150
-        $result = Route4Me::makeRequst([
151
-            'url'       => Endpoint::NOTE_CUSTOM_TYPES_V4,
152
-            'method'    => 'GET',
153
-        ]);
154
-
155
-        return $result;
156
-    }
157
-
158
-    public function getCustomNoteTypeByKey($params)
159
-    {
160
-        $result = Route4Me::makeRequst([
161
-            'url'       => Endpoint::NOTE_CUSTOM_TYPES_V4,
162
-            'method'    => 'GET',
163
-        ]);
164
-
165
-        if (is_null($result) || !is_array($result)) return null;
166
-
167
-        foreach ($result as $custNoteType) {
168
-            if (isset($custNoteType["note_custom_type"]) && $custNoteType["note_custom_type"] == $params) {
169
-                return $custNoteType;
170
-            }
171
-        }
172
-    }
173
-
174
-    public function AddAddressNote($params)
175
-    {
176
-        $allQueryFields = ['route_id', 'address_id', 'dev_lat', 'dev_lng', 'device_type'];
177
-        $allBodyFields = ['strNoteContents', 'strUpdateType'];
178
-
179
-        $result = Route4Me::makeRequst([
180
-            'url'           => Endpoint::ROUTE_NOTES_ADD,
181
-            'method'        => 'POST',
182
-            'query'         => Route4Me::generateRequestParameters($allQueryFields, $params),
183
-            'body'          => Route4Me::generateRequestParameters($allBodyFields, $params),
184
-            'HTTPHEADER'    => 'Content-Type: multipart/form-data',
185
-        ]);
186
-
187
-        return $result;
188
-    }
189
-
190
-    public function AddNoteFile($params)
191
-    {
192
-        $fname = isset($params['strFilename']) ? $params['strFilename'] : null;
193
-
194
-        $allQueryFields = ['route_id', 'address_id', 'dev_lat', 'dev_lng', 'device_type'];
195
-        $allBodyFields = ['strFilename', 'strUpdateType', 'strNoteContents'];
196
-
197
-        $result = Route4Me::makeRequst([
198
-            'url'           => Endpoint::ROUTE_NOTES_ADD,
199
-            'method'        => 'POST',
200
-            'query'         => Route4Me::generateRequestParameters($allQueryFields, $params),
201
-            'body'          => Route4Me::generateRequestParameters($allBodyFields, $params),
202
-            'FILE'          => $fname,
203
-            'HTTPHEADER'    => 'Content-Type: multipart/form-data'
204
-        ]);
205
-
206
-        return $result;
207
-    }
208
-
209
-    public function addCustomNoteToRoute($params)
210
-    {
211
-        $customArray = [];
212
-
213
-        foreach ($params as $key => $value) {
214
-            if (false !== strpos($key, 'custom_note_type')) {
215
-                $customArray[$key] = $value;
216
-            }
217
-        }
218
-
219
-        $allQueryFields = ['route_id', 'address_id', 'format', 'dev_lat', 'dev_lng'];
220
-        $allBodyFields = ['strUpdateType', 'strUpdateType', 'strNoteContents'];
221
-
222
-        $result = Route4Me::makeRequst([
223
-            'url'           => Endpoint::ROUTE_NOTES_ADD,
224
-            'method'        => 'POST',
225
-            'query'         => Route4Me::generateRequestParameters($allQueryFields, $params),
226
-            'body'          => array_merge(Route4Me::generateRequestParameters($allBodyFields, $params), $customArray),
227
-            'HTTPHEADER'    => 'Content-Type: multipart/form-data',
228
-        ]);
229
-
230
-        return $result;
231
-    }
14
+	/**
15
+	 * An unique ID of a note
16
+	 * @var integer
17
+	 */
18
+	public $note_id;
19
+
20
+	/**
21
+	 * The route ID
22
+	 * @var string
23
+	 */
24
+	public $route_id;
25
+
26
+	/**
27
+	 * The route destination ID
28
+	 * @var integer
29
+	 */
30
+	public $route_destination_id;
31
+
32
+	/**
33
+	 * An unique ID of an uploaded file
34
+	 * @var string
35
+	 */
36
+	public $upload_id;
37
+
38
+	/**
39
+	 * When the note was added
40
+	 * @var integer
41
+	 */
42
+	public $ts_added;
43
+
44
+	/**
45
+	 * The position latitude where the address note was added
46
+	 * @var double
47
+	 */
48
+	public $lat;
49
+
50
+	/**
51
+	 * The position longitude where the address note was added
52
+	 * @var double
53
+	 */
54
+	public $lng;
55
+
56
+	/**
57
+	 * The activity type
58
+	 * @var string
59
+	 */
60
+	public $activity_type;
61
+
62
+	/**
63
+	 * The note text contents
64
+	 * @var string
65
+	 */
66
+	public $contents;
67
+
68
+	/**
69
+	 * An upload type of the note
70
+	 * @var string
71
+	 */
72
+	public $upload_type;
73
+
74
+	/**
75
+	 * An upload url - where a file-note was uploaded.
76
+	 * @var string
77
+	 */
78
+	public $upload_url;
79
+
80
+	/**
81
+	 * An extension of the uploaded file.
82
+	 * @var string
83
+	 */
84
+	public $upload_extension;
85
+
86
+	/**
87
+	 * The device a note was uploaded from.
88
+	 * @var string
89
+	 */
90
+	public $device_type;
91
+
92
+	/**
93
+	 * Array of the custom type notes.
94
+	 * @var CustomNoteType[]
95
+	 */
96
+	public $custom_types;
97
+
98
+	public function __construct()
99
+	{
100
+	}
101
+
102
+	/**
103
+	 * Get notes from the specified route destination.<br>
104
+	 * Returns an address object with notes, if an address exists, otherwise - return null.
105
+	 */
106
+	public static function GetAddressesNotes($noteParams)
107
+	{
108
+		$address = Route4Me::makeRequst([
109
+			'url'       => Endpoint::ADDRESS_V4,
110
+			'method'    => 'GET',
111
+			'query'     => [
112
+				'route_id'              => isset($noteParams['route_id']) ? $noteParams['route_id'] : null,
113
+				'route_destination_id'  => isset($noteParams['route_destination_id'])
114
+					? $noteParams['route_destination_id'] : null,
115
+				'notes' => 1,
116
+			],
117
+		]);
118
+
119
+		return $address;
120
+	}
121
+
122
+	public function createCustomNoteType($params)
123
+	{
124
+		$allBodyFields = ['type', 'values'];
125
+
126
+		$result = Route4Me::makeRequst([
127
+			'url'       => Endpoint::NOTE_CUSTOM_TYPES_V4,
128
+			'method'    => 'POST',
129
+			'body'      => Route4Me::generateRequestParameters($allBodyFields, $params),
130
+		]);
131
+
132
+		return $result;
133
+	}
134
+
135
+	public function removeCustomNoteType($params)
136
+	{
137
+		$result = Route4Me::makeRequst([
138
+			'url'       => Endpoint::NOTE_CUSTOM_TYPES_V4,
139
+			'method'    => 'DELETE',
140
+			'body'      => [
141
+				'id' => isset($params['id']) ? $params['id'] : null,
142
+			],
143
+		]);
144
+
145
+		return $result;
146
+	}
147
+
148
+	public function getAllCustomNoteTypes()
149
+	{
150
+		$result = Route4Me::makeRequst([
151
+			'url'       => Endpoint::NOTE_CUSTOM_TYPES_V4,
152
+			'method'    => 'GET',
153
+		]);
154
+
155
+		return $result;
156
+	}
157
+
158
+	public function getCustomNoteTypeByKey($params)
159
+	{
160
+		$result = Route4Me::makeRequst([
161
+			'url'       => Endpoint::NOTE_CUSTOM_TYPES_V4,
162
+			'method'    => 'GET',
163
+		]);
164
+
165
+		if (is_null($result) || !is_array($result)) return null;
166
+
167
+		foreach ($result as $custNoteType) {
168
+			if (isset($custNoteType["note_custom_type"]) && $custNoteType["note_custom_type"] == $params) {
169
+				return $custNoteType;
170
+			}
171
+		}
172
+	}
173
+
174
+	public function AddAddressNote($params)
175
+	{
176
+		$allQueryFields = ['route_id', 'address_id', 'dev_lat', 'dev_lng', 'device_type'];
177
+		$allBodyFields = ['strNoteContents', 'strUpdateType'];
178
+
179
+		$result = Route4Me::makeRequst([
180
+			'url'           => Endpoint::ROUTE_NOTES_ADD,
181
+			'method'        => 'POST',
182
+			'query'         => Route4Me::generateRequestParameters($allQueryFields, $params),
183
+			'body'          => Route4Me::generateRequestParameters($allBodyFields, $params),
184
+			'HTTPHEADER'    => 'Content-Type: multipart/form-data',
185
+		]);
186
+
187
+		return $result;
188
+	}
189
+
190
+	public function AddNoteFile($params)
191
+	{
192
+		$fname = isset($params['strFilename']) ? $params['strFilename'] : null;
193
+
194
+		$allQueryFields = ['route_id', 'address_id', 'dev_lat', 'dev_lng', 'device_type'];
195
+		$allBodyFields = ['strFilename', 'strUpdateType', 'strNoteContents'];
196
+
197
+		$result = Route4Me::makeRequst([
198
+			'url'           => Endpoint::ROUTE_NOTES_ADD,
199
+			'method'        => 'POST',
200
+			'query'         => Route4Me::generateRequestParameters($allQueryFields, $params),
201
+			'body'          => Route4Me::generateRequestParameters($allBodyFields, $params),
202
+			'FILE'          => $fname,
203
+			'HTTPHEADER'    => 'Content-Type: multipart/form-data'
204
+		]);
205
+
206
+		return $result;
207
+	}
208
+
209
+	public function addCustomNoteToRoute($params)
210
+	{
211
+		$customArray = [];
212
+
213
+		foreach ($params as $key => $value) {
214
+			if (false !== strpos($key, 'custom_note_type')) {
215
+				$customArray[$key] = $value;
216
+			}
217
+		}
218
+
219
+		$allQueryFields = ['route_id', 'address_id', 'format', 'dev_lat', 'dev_lng'];
220
+		$allBodyFields = ['strUpdateType', 'strUpdateType', 'strNoteContents'];
221
+
222
+		$result = Route4Me::makeRequst([
223
+			'url'           => Endpoint::ROUTE_NOTES_ADD,
224
+			'method'        => 'POST',
225
+			'query'         => Route4Me::generateRequestParameters($allQueryFields, $params),
226
+			'body'          => array_merge(Route4Me::generateRequestParameters($allBodyFields, $params), $customArray),
227
+			'HTTPHEADER'    => 'Content-Type: multipart/form-data',
228
+		]);
229
+
230
+		return $result;
231
+	}
232 232
 }
Please login to merge, or discard this patch.