lsx_to_has_team_member()   C
last analyzed

Complexity

Conditions 16
Paths 31

Size

Total Lines 32
Code Lines 20

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
cc 16
eloc 20
c 2
b 0
f 0
nc 31
nop 0
dl 0
loc 32
rs 5.5666

How to fix   Complexity   

Long Method

Small methods make your code easier to understand, in particular if combined with a good name. Besides, if your method is small, finding a good name is usually much easier.

For example, if you find yourself adding comments to a method's body, this is usually a good sign to extract the commented part to a new method, and use the comment as a starting point when coming up with a good name for this new method.

Commonly applied refactorings include:

1
<?php
2
/**
3
 * Template Tags
4
 *
5
 * @package   to-team
6
 * @author    LightSpeed
7
 * @license   {license}
8
 * @link
9
 * @copyright 2016 LightSpeedDevelopment
10
 */
11
12
/**
0 ignored issues
show
Coding Style Documentation introduced by
Doc comment for parameter "$slug" missing
Loading history...
Coding Style Documentation introduced by
Doc comment for parameter "$name" missing
Loading history...
13
 * Find the content part in the plugin
14
 *
15
 * @package 	to-team
0 ignored issues
show
introduced by
Spaces must be used for mid-line alignment; tabs are not allowed
Loading history...
16
 * @subpackage	template-tag
0 ignored issues
show
introduced by
Spaces must be used for mid-line alignment; tabs are not allowed
Loading history...
17
 * @category 	content
0 ignored issues
show
introduced by
Spaces must be used for mid-line alignment; tabs are not allowed
Loading history...
18
 */
19
function lsx_to_team_content( $slug, $name = null ) {
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines before function; 1 found
Loading history...
20
	do_action( 'lsx_to_team_content',$slug, $name );
21
}
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
22
23
/**
0 ignored issues
show
Coding Style Documentation introduced by
Doc comment for parameter "$before" missing
Loading history...
Coding Style Documentation introduced by
Doc comment for parameter "$after" missing
Loading history...
Coding Style Documentation introduced by
Doc comment for parameter "$echo" missing
Loading history...
24
 * Outputs the current team members role, must be used in a loop.
25
 *
26
 * @param		$before	| string
0 ignored issues
show
Documentation Bug introduced by
The doc comment | string at position 0 could not be parsed: Unknown type name '|' at position 0 in | string.
Loading history...
Coding Style introduced by
Missing parameter name
Loading history...
introduced by
Spaces must be used for mid-line alignment; tabs are not allowed
Loading history...
27
 * @param		$after	| string
0 ignored issues
show
Coding Style introduced by
Missing parameter name
Loading history...
introduced by
Spaces must be used for mid-line alignment; tabs are not allowed
Loading history...
28
 * @param		$echo	| boolean
0 ignored issues
show
Coding Style introduced by
Missing parameter name
Loading history...
introduced by
Spaces must be used for mid-line alignment; tabs are not allowed
Loading history...
29
 * @return		string
0 ignored issues
show
Coding Style introduced by
Function return type is not void, but function has no return statement
Loading history...
introduced by
Spaces must be used for mid-line alignment; tabs are not allowed
Loading history...
30
 *
31
 * @package 	to-team
0 ignored issues
show
introduced by
Spaces must be used for mid-line alignment; tabs are not allowed
Loading history...
32
 * @subpackage	template-tags
0 ignored issues
show
introduced by
Spaces must be used for mid-line alignment; tabs are not allowed
Loading history...
33
 */
34
function lsx_to_team_role( $before = '', $after = '', $echo = true ) {
35
	lsx_to_custom_field_query( 'role',$before,$after,$echo );
36
}
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
37
38
/**
0 ignored issues
show
Coding Style Documentation introduced by
Doc comment for parameter "$before" missing
Loading history...
Coding Style Documentation introduced by
Doc comment for parameter "$after" missing
Loading history...
Coding Style Documentation introduced by
Doc comment for parameter "$echo" missing
Loading history...
39
 * Outputs the current team members role, must be used in a loop.
40
 *
41
 * @param		$before	| string
0 ignored issues
show
Documentation Bug introduced by
The doc comment | string at position 0 could not be parsed: Unknown type name '|' at position 0 in | string.
Loading history...
Coding Style introduced by
Missing parameter name
Loading history...
introduced by
Spaces must be used for mid-line alignment; tabs are not allowed
Loading history...
42
 * @param		$after	| string
0 ignored issues
show
Coding Style introduced by
Missing parameter name
Loading history...
introduced by
Spaces must be used for mid-line alignment; tabs are not allowed
Loading history...
43
 * @param		$echo	| boolean
0 ignored issues
show
Coding Style introduced by
Missing parameter name
Loading history...
introduced by
Spaces must be used for mid-line alignment; tabs are not allowed
Loading history...
44
 * @return		string
0 ignored issues
show
introduced by
Spaces must be used for mid-line alignment; tabs are not allowed
Loading history...
45
 *
46
 * @package 	to-team
0 ignored issues
show
introduced by
Spaces must be used for mid-line alignment; tabs are not allowed
Loading history...
47
 * @subpackage	template-tags
0 ignored issues
show
introduced by
Spaces must be used for mid-line alignment; tabs are not allowed
Loading history...
48
 */
49
function lsx_to_team_contact_number( $before = '', $after = '', $echo = true ) {
50
	$contact_number = get_post_meta( get_the_ID(), 'contact_number', true );
0 ignored issues
show
Bug introduced by
It seems like get_the_ID() can also be of type false; however, parameter $post_id of get_post_meta() does only seem to accept integer, maybe add an additional type check? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-type  annotation

50
	$contact_number = get_post_meta( /** @scrutinizer ignore-type */ get_the_ID(), 'contact_number', true );
Loading history...
51
52
	if ( false !== $contact_number && '' !== $contact_number ) {
0 ignored issues
show
Coding Style introduced by
Expected 0 spaces after opening bracket; 1 found
Loading history...
Coding Style introduced by
Expected 0 spaces before closing bracket; 1 found
Loading history...
53
		$contact_html = $before . '<a href="tel:+' . $contact_number . '">' . $contact_number . '</a>' . $after;
54
55
		if ( $echo ) {
0 ignored issues
show
Coding Style introduced by
Expected 0 spaces after opening bracket; 1 found
Loading history...
Coding Style introduced by
Expected 0 spaces before closing bracket; 1 found
Loading history...
56
			echo wp_kses_post( $contact_html );
57
		} else {
58
			return $contact_html;
59
		}
60
	}
61
}
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
62
63
/**
0 ignored issues
show
Coding Style Documentation introduced by
Doc comment for parameter "$before" missing
Loading history...
Coding Style Documentation introduced by
Doc comment for parameter "$after" missing
Loading history...
Coding Style Documentation introduced by
Doc comment for parameter "$echo" missing
Loading history...
64
 * Outputs the current team members role, must be used in a loop.
65
 *
66
 * @param		$before	| string
0 ignored issues
show
Documentation Bug introduced by
The doc comment | string at position 0 could not be parsed: Unknown type name '|' at position 0 in | string.
Loading history...
Coding Style introduced by
Missing parameter name
Loading history...
introduced by
Spaces must be used for mid-line alignment; tabs are not allowed
Loading history...
67
 * @param		$after	| string
0 ignored issues
show
Coding Style introduced by
Missing parameter name
Loading history...
introduced by
Spaces must be used for mid-line alignment; tabs are not allowed
Loading history...
68
 * @param		$echo	| boolean
0 ignored issues
show
Coding Style introduced by
Missing parameter name
Loading history...
introduced by
Spaces must be used for mid-line alignment; tabs are not allowed
Loading history...
69
 * @return		string
0 ignored issues
show
introduced by
Spaces must be used for mid-line alignment; tabs are not allowed
Loading history...
70
 *
71
 * @package 	to-team
0 ignored issues
show
introduced by
Spaces must be used for mid-line alignment; tabs are not allowed
Loading history...
72
 * @subpackage	template-tags
0 ignored issues
show
introduced by
Spaces must be used for mid-line alignment; tabs are not allowed
Loading history...
73
 */
74
function lsx_to_team_contact_email( $before = '', $after = '', $echo = true ) {
75
	$contact_email = get_post_meta( get_the_ID(), 'contact_email', true );
0 ignored issues
show
Bug introduced by
It seems like get_the_ID() can also be of type false; however, parameter $post_id of get_post_meta() does only seem to accept integer, maybe add an additional type check? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-type  annotation

75
	$contact_email = get_post_meta( /** @scrutinizer ignore-type */ get_the_ID(), 'contact_email', true );
Loading history...
76
77
	if ( false !== $contact_email && '' !== $contact_email ) {
0 ignored issues
show
Coding Style introduced by
Expected 0 spaces after opening bracket; 1 found
Loading history...
Coding Style introduced by
Expected 0 spaces before closing bracket; 1 found
Loading history...
78
		$contact_html = $before . '<a href="mailto:' . $contact_email . '">' . $contact_email . '</a>' . $after;
79
80
		if ( $echo ) {
0 ignored issues
show
Coding Style introduced by
Expected 0 spaces after opening bracket; 1 found
Loading history...
Coding Style introduced by
Expected 0 spaces before closing bracket; 1 found
Loading history...
81
			echo wp_kses_post( $contact_html );
82
		} else {
83
			return $contact_html;
84
		}
85
	}
86
}
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
87
88
/**
0 ignored issues
show
Coding Style Documentation introduced by
Doc comment for parameter "$before" missing
Loading history...
Coding Style Documentation introduced by
Doc comment for parameter "$after" missing
Loading history...
Coding Style Documentation introduced by
Doc comment for parameter "$echo" missing
Loading history...
89
 * Outputs the current team members Skype, must be used in a loop.
90
 *
91
 * @param		$before	| string
0 ignored issues
show
Documentation Bug introduced by
The doc comment | string at position 0 could not be parsed: Unknown type name '|' at position 0 in | string.
Loading history...
Coding Style introduced by
Missing parameter name
Loading history...
introduced by
Spaces must be used for mid-line alignment; tabs are not allowed
Loading history...
92
 * @param		$after	| string
0 ignored issues
show
Coding Style introduced by
Missing parameter name
Loading history...
introduced by
Spaces must be used for mid-line alignment; tabs are not allowed
Loading history...
93
 * @param		$echo	| boolean
0 ignored issues
show
Coding Style introduced by
Missing parameter name
Loading history...
introduced by
Spaces must be used for mid-line alignment; tabs are not allowed
Loading history...
94
 * @return		string
0 ignored issues
show
introduced by
Spaces must be used for mid-line alignment; tabs are not allowed
Loading history...
95
 *
96
 * @package 	to-team
0 ignored issues
show
introduced by
Spaces must be used for mid-line alignment; tabs are not allowed
Loading history...
97
 * @subpackage	template-tags
0 ignored issues
show
introduced by
Spaces must be used for mid-line alignment; tabs are not allowed
Loading history...
98
 */
99
function lsx_to_team_contact_skype( $before = '', $after = '', $echo = true ) {
100
	$contact_skype = get_post_meta( get_the_ID(), 'skype', true );
0 ignored issues
show
Bug introduced by
It seems like get_the_ID() can also be of type false; however, parameter $post_id of get_post_meta() does only seem to accept integer, maybe add an additional type check? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-type  annotation

100
	$contact_skype = get_post_meta( /** @scrutinizer ignore-type */ get_the_ID(), 'skype', true );
Loading history...
101
102
	if ( false !== $contact_skype && '' !== $contact_skype ) {
0 ignored issues
show
Coding Style introduced by
Expected 0 spaces after opening bracket; 1 found
Loading history...
Coding Style introduced by
Expected 0 spaces before closing bracket; 1 found
Loading history...
103
		$contact_html = $before . '<span>' . $contact_skype . '</span>' . $after;
104
105
		if ( $echo ) {
0 ignored issues
show
Coding Style introduced by
Expected 0 spaces after opening bracket; 1 found
Loading history...
Coding Style introduced by
Expected 0 spaces before closing bracket; 1 found
Loading history...
106
			echo wp_kses_post( $contact_html );
107
		} else {
108
			return $contact_html;
109
		}
110
	}
111
}
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
112
113
/**
0 ignored issues
show
Coding Style Documentation introduced by
Doc comment for parameter "$before" missing
Loading history...
Coding Style Documentation introduced by
Doc comment for parameter "$after" missing
Loading history...
Coding Style Documentation introduced by
Doc comment for parameter "$echo" missing
Loading history...
114
 * Outputs the current team members social profiles, must be used in a loop.
115
 *
116
 * @param		$before	| string
0 ignored issues
show
Documentation Bug introduced by
The doc comment | string at position 0 could not be parsed: Unknown type name '|' at position 0 in | string.
Loading history...
Coding Style introduced by
Missing parameter name
Loading history...
introduced by
Spaces must be used for mid-line alignment; tabs are not allowed
Loading history...
117
 * @param		$after	| string
0 ignored issues
show
Coding Style introduced by
Missing parameter name
Loading history...
introduced by
Spaces must be used for mid-line alignment; tabs are not allowed
Loading history...
118
 * @param		$echo	| boolean
0 ignored issues
show
Coding Style introduced by
Missing parameter name
Loading history...
introduced by
Spaces must be used for mid-line alignment; tabs are not allowed
Loading history...
119
 * @return		string
0 ignored issues
show
introduced by
Spaces must be used for mid-line alignment; tabs are not allowed
Loading history...
120
 *
121
 * @package 	to-team
0 ignored issues
show
introduced by
Spaces must be used for mid-line alignment; tabs are not allowed
Loading history...
122
 * @subpackage	template-tags
0 ignored issues
show
introduced by
Spaces must be used for mid-line alignment; tabs are not allowed
Loading history...
123
 */
124
function lsx_to_team_social_profiles( $before = '', $after = '', $echo = true ) {
125
	$social_profiles = array( 'facebook', 'twitter', 'googleplus', 'linkedin', 'pinterest' );
0 ignored issues
show
Coding Style introduced by
Equals sign not aligned with surrounding assignments; expected 5 spaces but found 1 space

This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.

To visualize

$a = "a";
$ab = "ab";
$abc = "abc";

will produce issues in the first and second line, while this second example

$a   = "a";
$ab  = "ab";
$abc = "abc";

will produce no issues.

Loading history...
126
	$social_profile_html = false;
127
128
	foreach ( $social_profiles as $meta_key ) {
0 ignored issues
show
Coding Style introduced by
Expected 0 spaces after opening bracket; 1 found
Loading history...
Coding Style introduced by
Expected 0 spaces before closing bracket; 1 found
Loading history...
129
		$meta_value = get_post_meta( get_the_ID(),$meta_key,true );
0 ignored issues
show
Bug introduced by
It seems like get_the_ID() can also be of type false; however, parameter $post_id of get_post_meta() does only seem to accept integer, maybe add an additional type check? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-type  annotation

129
		$meta_value = get_post_meta( /** @scrutinizer ignore-type */ get_the_ID(),$meta_key,true );
Loading history...
130
131
		if ( false !== $meta_value && '' !== $meta_value ) {
0 ignored issues
show
Coding Style introduced by
Expected 0 spaces after opening bracket; 1 found
Loading history...
Coding Style introduced by
Expected 0 spaces before closing bracket; 1 found
Loading history...
132
			$icon_class = '';
133
134
			switch ( $meta_key ) {
0 ignored issues
show
Coding Style introduced by
Expected 0 spaces after opening bracket; 1 found
Loading history...
Coding Style introduced by
Expected 0 spaces before closing bracket; 1 found
Loading history...
135
				case 'facebook':
136
					$icon_class = 'facebook';
137
				break;
138
139
				case 'twitter':
140
					$icon_class = 'twitter';
141
				break;
142
143
				case 'googleplus':
144
					$icon_class = 'google-plus';
145
				break;
146
147
				case 'linkedin':
148
					$icon_class = 'linkedin';
149
				break;
150
151
				case 'pinterest':
0 ignored issues
show
Coding Style introduced by
There must be a comment when fall-through is intentional in a non-empty case body
Loading history...
152
					$icon_class = 'pinterest-p';
153
154
				default:
155
				break;
156
			}
157
158
			$social_profile_html .= '<a target="_blank" rel="noopener noreferrer" href="' . $meta_value . '"><i class="fa fa-' . $icon_class . '" aria-hidden="true"></i></a>';
159
		}
160
	}
161
162
	if ( false !== $social_profile_html && '' !== $social_profile_html ) {
0 ignored issues
show
Coding Style introduced by
Expected 0 spaces after opening bracket; 1 found
Loading history...
Coding Style introduced by
Expected 0 spaces before closing bracket; 1 found
Loading history...
163
		$social_profile_html = $before . $social_profile_html . $after;
164
165
		if ( $echo ) {
0 ignored issues
show
Coding Style introduced by
Expected 0 spaces after opening bracket; 1 found
Loading history...
Coding Style introduced by
Expected 0 spaces before closing bracket; 1 found
Loading history...
166
			echo wp_kses_post( $social_profile_html );
167
		} else {
168
			return $social_profile_html;
169
		}
170
	}
171
}
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
172
173
/**
0 ignored issues
show
Coding Style Documentation introduced by
Doc comment for parameter "$before" missing
Loading history...
Coding Style Documentation introduced by
Doc comment for parameter "$after" missing
Loading history...
Coding Style Documentation introduced by
Doc comment for parameter "$echo" missing
Loading history...
174
 * Gets the current teams tagline
175
 *
176
 * @param		$before	| string
0 ignored issues
show
Documentation Bug introduced by
The doc comment | string at position 0 could not be parsed: Unknown type name '|' at position 0 in | string.
Loading history...
Coding Style introduced by
Missing parameter name
Loading history...
introduced by
Spaces must be used for mid-line alignment; tabs are not allowed
Loading history...
177
 * @param		$after	| string
0 ignored issues
show
Coding Style introduced by
Missing parameter name
Loading history...
introduced by
Spaces must be used for mid-line alignment; tabs are not allowed
Loading history...
178
 * @param		$echo	| boolean
0 ignored issues
show
Coding Style introduced by
Missing parameter name
Loading history...
introduced by
Spaces must be used for mid-line alignment; tabs are not allowed
Loading history...
179
 * @return		string
0 ignored issues
show
Coding Style introduced by
Function return type is not void, but function has no return statement
Loading history...
introduced by
Spaces must be used for mid-line alignment; tabs are not allowed
Loading history...
180
 *
181
 * @package 	to-team
0 ignored issues
show
introduced by
Spaces must be used for mid-line alignment; tabs are not allowed
Loading history...
182
 * @subpackage	template-tags
0 ignored issues
show
introduced by
Spaces must be used for mid-line alignment; tabs are not allowed
Loading history...
183
 */
184
function lsx_to_team_tagline( $before = '', $after = '', $echo = true ) {
185
	lsx_to_tagline( $before,$after,$echo );
186
}
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
187
188
/**
189
 * Gets the current connected team member panel
190
 * @return		string
0 ignored issues
show
Coding Style introduced by
There must be exactly one blank line before the tags in a doc comment
Loading history...
introduced by
Spaces must be used for mid-line alignment; tabs are not allowed
Loading history...
191
 *
192
 * @package 	tour-operator
0 ignored issues
show
introduced by
Spaces must be used for mid-line alignment; tabs are not allowed
Loading history...
193
 * @subpackage	template-tags
0 ignored issues
show
introduced by
Spaces must be used for mid-line alignment; tabs are not allowed
Loading history...
194
 * @category 	team
0 ignored issues
show
introduced by
Spaces must be used for mid-line alignment; tabs are not allowed
Loading history...
195
 */
196
function lsx_to_has_team_member() {
197
	$tour_operator = tour_operator();
198
	$tab = 'team';
0 ignored issues
show
Coding Style introduced by
Equals sign not aligned with surrounding assignments; expected 11 spaces but found 1 space

This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.

To visualize

$a = "a";
$ab = "ab";
$abc = "abc";

will produce issues in the first and second line, while this second example

$a   = "a";
$ab  = "ab";
$abc = "abc";

will produce no issues.

Loading history...
199
	$start_with = 'expert-';
0 ignored issues
show
Coding Style introduced by
Equals sign not aligned with surrounding assignments; expected 4 spaces but found 1 space

This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.

To visualize

$a = "a";
$ab = "ab";
$abc = "abc";

will produce issues in the first and second line, while this second example

$a   = "a";
$ab  = "ab";
$abc = "abc";

will produce no issues.

Loading history...
200
	$has_team = false;
0 ignored issues
show
Coding Style introduced by
Equals sign not aligned with surrounding assignments; expected 6 spaces but found 1 space

This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.

To visualize

$a = "a";
$ab = "ab";
$abc = "abc";

will produce issues in the first and second line, while this second example

$a   = "a";
$ab  = "ab";
$abc = "abc";

will produce no issues.

Loading history...
201
202
	// Check if the team member panel has been disabled.
203
	if ( ! is_singular( 'team' ) && ! is_singular( 'review' ) ) {
0 ignored issues
show
Coding Style introduced by
Expected 0 spaces after opening bracket; 1 found
Loading history...
Coding Style introduced by
Expected 0 spaces before closing bracket; 1 found
Loading history...
204
		if ( is_object( $tour_operator ) && isset( $tour_operator->options[ $tab ] ) && is_array( $tour_operator->options[ $tab ] ) && isset( $tour_operator->options[ $tab ]['disable_team_panel'] ) ) {
0 ignored issues
show
Coding Style introduced by
Expected 0 spaces after opening bracket; 1 found
Loading history...
Coding Style introduced by
Expected 0 spaces before closing bracket; 1 found
Loading history...
205
			return false;
206
		}
207
	}
208
209
	if ( is_singular( 'team' ) || is_singular( 'review' ) ) {
0 ignored issues
show
Coding Style introduced by
Expected 0 spaces after opening bracket; 1 found
Loading history...
Coding Style introduced by
Expected 0 spaces before closing bracket; 1 found
Loading history...
210
		$has_team = has_post_thumbnail();
211
	} elseif ( is_tax() ) {
0 ignored issues
show
Coding Style introduced by
Expected 0 spaces after opening bracket; 1 found
Loading history...
Coding Style introduced by
Expected 0 spaces before closing bracket; 1 found
Loading history...
212
		$has_team = lsx_to_has_custom_field_query( 'expert', get_queried_object()->term_id, true );
0 ignored issues
show
Bug introduced by
The property term_id does not seem to exist on WP_Post_Type.
Loading history...
213
	} else {
214
		$has_team = lsx_to_has_custom_field_query( 'team_to_' . get_post_type(), get_the_ID() );
215
	}
216
217
	if ( false === $has_team ) {
0 ignored issues
show
Coding Style introduced by
Expected 0 spaces after opening bracket; 1 found
Loading history...
Coding Style introduced by
Expected 0 spaces before closing bracket; 1 found
Loading history...
218
		if ( is_object( $tour_operator ) && isset( $tour_operator->options[ $tab ] ) && is_array( $tour_operator->options[ $tab ] ) ) {
0 ignored issues
show
Coding Style introduced by
Expected 0 spaces after opening bracket; 1 found
Loading history...
Coding Style introduced by
Expected 0 spaces before closing bracket; 1 found
Loading history...
219
			foreach ( $tour_operator->options[ $tab ] as $key => $value ) {
0 ignored issues
show
Coding Style introduced by
Expected 0 spaces after opening bracket; 1 found
Loading history...
Coding Style introduced by
Expected 0 spaces before closing bracket; 1 found
Loading history...
220
				if ( substr( $key, 0, strlen( $start_with ) ) === $start_with ) {
0 ignored issues
show
Coding Style introduced by
Expected 0 spaces after opening bracket; 1 found
Loading history...
Coding Style introduced by
Expected 0 spaces before closing bracket; 1 found
Loading history...
221
					$has_team = true;
222
					break;
223
				}
224
			}
225
		}
226
	}
0 ignored issues
show
Coding Style introduced by
No blank line found after control structure
Loading history...
227
	return $has_team;
228
}
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
229
230
/**
0 ignored issues
show
Coding Style Documentation introduced by
Doc comment for parameter "$before" missing
Loading history...
Coding Style Documentation introduced by
Doc comment for parameter "$after" missing
Loading history...
231
 * Gets the current connected team member panel
232
 *
233
 * @param		$before	| string
0 ignored issues
show
Documentation Bug introduced by
The doc comment | string at position 0 could not be parsed: Unknown type name '|' at position 0 in | string.
Loading history...
Coding Style introduced by
Missing parameter name
Loading history...
introduced by
Spaces must be used for mid-line alignment; tabs are not allowed
Loading history...
234
 * @param		$after	| string
0 ignored issues
show
Coding Style introduced by
Missing parameter name
Loading history...
introduced by
Spaces must be used for mid-line alignment; tabs are not allowed
Loading history...
235
 * @param		$echo	| boolean
0 ignored issues
show
Coding Style introduced by
Missing parameter name
Loading history...
introduced by
Spaces must be used for mid-line alignment; tabs are not allowed
Loading history...
236
 * @return		string
0 ignored issues
show
Coding Style introduced by
Function return type is not void, but function has no return statement
Loading history...
introduced by
Spaces must be used for mid-line alignment; tabs are not allowed
Loading history...
237
 *
238
 * @package 	tour-operator
0 ignored issues
show
introduced by
Spaces must be used for mid-line alignment; tabs are not allowed
Loading history...
239
 * @subpackage	template-tags
0 ignored issues
show
introduced by
Spaces must be used for mid-line alignment; tabs are not allowed
Loading history...
240
 * @category 	team
0 ignored issues
show
introduced by
Spaces must be used for mid-line alignment; tabs are not allowed
Loading history...
241
 */
242
function lsx_to_team_member_panel( $before = '', $after = '' ) {
243
	$team_id = false;
244
245
	if ( is_tax() ) {
0 ignored issues
show
Coding Style introduced by
Expected 0 spaces after opening bracket; 1 found
Loading history...
Coding Style introduced by
Expected 0 spaces before closing bracket; 1 found
Loading history...
246
		$meta_key = 'expert';
247
		$team_id = get_transient( get_queried_object()->term_id . '_' . $meta_key );
0 ignored issues
show
Coding Style introduced by
Equals sign not aligned with surrounding assignments; expected 2 spaces but found 1 space

This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.

To visualize

$a = "a";
$ab = "ab";
$abc = "abc";

will produce issues in the first and second line, while this second example

$a   = "a";
$ab  = "ab";
$abc = "abc";

will produce no issues.

Loading history...
Bug introduced by
The property term_id does not seem to exist on WP_Post_Type.
Loading history...
248
	} else {
249
		$meta_key = 'team_to_' . get_post_type();
250
		$team_id = get_transient( get_the_ID() . '_' . $meta_key );
0 ignored issues
show
Bug introduced by
Are you sure get_the_ID() of type false|integer can be used in concatenation? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-type  annotation

250
		$team_id = get_transient( /** @scrutinizer ignore-type */ get_the_ID() . '_' . $meta_key );
Loading history...
Coding Style introduced by
Equals sign not aligned with surrounding assignments; expected 2 spaces but found 1 space

This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.

To visualize

$a = "a";
$ab = "ab";
$abc = "abc";

will produce issues in the first and second line, while this second example

$a   = "a";
$ab  = "ab";
$abc = "abc";

will produce no issues.

Loading history...
251
	}
252
253
	if ( false === $team_id ) {
0 ignored issues
show
Coding Style introduced by
Expected 0 spaces after opening bracket; 1 found
Loading history...
Coding Style introduced by
Expected 0 spaces before closing bracket; 1 found
Loading history...
254
		$tour_operator = tour_operator();
255
		$tab = 'team';
0 ignored issues
show
Coding Style introduced by
Equals sign not aligned with surrounding assignments; expected 11 spaces but found 1 space

This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.

To visualize

$a = "a";
$ab = "ab";
$abc = "abc";

will produce issues in the first and second line, while this second example

$a   = "a";
$ab  = "ab";
$abc = "abc";

will produce no issues.

Loading history...
256
		$start_with = 'expert-';
0 ignored issues
show
Coding Style introduced by
Equals sign not aligned with surrounding assignments; expected 4 spaces but found 1 space

This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.

To visualize

$a = "a";
$ab = "ab";
$abc = "abc";

will produce issues in the first and second line, while this second example

$a   = "a";
$ab  = "ab";
$abc = "abc";

will produce no issues.

Loading history...
257
		$team_ids = array();
0 ignored issues
show
Coding Style introduced by
Equals sign not aligned with surrounding assignments; expected 6 spaces but found 1 space

This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.

To visualize

$a = "a";
$ab = "ab";
$abc = "abc";

will produce issues in the first and second line, while this second example

$a   = "a";
$ab  = "ab";
$abc = "abc";

will produce no issues.

Loading history...
258
259
		if ( is_object( $tour_operator ) && isset( $tour_operator->options[ $tab ] ) && is_array( $tour_operator->options[ $tab ] ) ) {
0 ignored issues
show
Coding Style introduced by
Expected 0 spaces after opening bracket; 1 found
Loading history...
Coding Style introduced by
Expected 0 spaces before closing bracket; 1 found
Loading history...
260
			foreach ( $tour_operator->options[ $tab ] as $key => $value ) {
0 ignored issues
show
Coding Style introduced by
Expected 0 spaces after opening bracket; 1 found
Loading history...
Coding Style introduced by
Expected 0 spaces before closing bracket; 1 found
Loading history...
261
				if ( substr( $key, 0, strlen( $start_with ) ) === $start_with ) {
0 ignored issues
show
Coding Style introduced by
Expected 0 spaces after opening bracket; 1 found
Loading history...
Coding Style introduced by
Expected 0 spaces before closing bracket; 1 found
Loading history...
262
					$team_ids[] = $value;
263
				}
264
			}
265
		}
266
267
		if ( count( $team_ids ) > 0 ) {
0 ignored issues
show
Coding Style introduced by
Expected 0 spaces after opening bracket; 1 found
Loading history...
Coding Style introduced by
Expected 0 spaces before closing bracket; 1 found
Loading history...
268
			$team_id = $team_ids[ array_rand( $team_ids ) ];
269
		}
270
	}
271
272
	if ( false !== $team_id ) {
0 ignored issues
show
Coding Style introduced by
Expected 0 spaces after opening bracket; 1 found
Loading history...
Coding Style introduced by
Expected 0 spaces before closing bracket; 1 found
Loading history...
273
		$team_args = array(
274
			'post_type'	=> 'team',
0 ignored issues
show
introduced by
Spaces must be used for mid-line alignment; tabs are not allowed
Loading history...
introduced by
Array double arrow not aligned correctly; expected 3 space(s) between "'post_type'" and double arrow, but found 1.
Loading history...
275
			'post_status' => 'publish',
276
			'p' => $team_id,
0 ignored issues
show
introduced by
Array double arrow not aligned correctly; expected 11 space(s) between "'p'" and double arrow, but found 1.
Loading history...
277
		);
278
279
		$team = new WP_Query( $team_args );
280
281
		if ( $team->have_posts() ) :
0 ignored issues
show
Coding Style introduced by
Expected 0 spaces after opening bracket; 1 found
Loading history...
Coding Style introduced by
Expected 0 spaces before closing bracket; 1 found
Loading history...
282
			echo wp_kses_post( $before );
283
284
			while ( $team->have_posts() ) :
0 ignored issues
show
Coding Style introduced by
Expected 0 spaces after opening bracket; 1 found
Loading history...
Coding Style introduced by
Expected 0 spaces before closing bracket; 1 found
Loading history...
285
				global $post;
286
287
				$team->the_post();
288
289
				$has_single = ! lsx_to_is_single_disabled();
290
				$permalink = '';
0 ignored issues
show
Coding Style introduced by
Equals sign not aligned with surrounding assignments; expected 2 spaces but found 1 space

This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.

To visualize

$a = "a";
$ab = "ab";
$abc = "abc";

will produce issues in the first and second line, while this second example

$a   = "a";
$ab  = "ab";
$abc = "abc";

will produce no issues.

Loading history...
291
292
				if ( $has_single ) {
0 ignored issues
show
Coding Style introduced by
Expected 0 spaces after opening bracket; 1 found
Loading history...
Coding Style introduced by
Expected 0 spaces before closing bracket; 1 found
Loading history...
293
					$permalink = get_the_permalink();
294
				} elseif ( ! is_post_type_archive( 'team' ) ) {
0 ignored issues
show
Coding Style introduced by
Expected 0 spaces after opening bracket; 1 found
Loading history...
Coding Style introduced by
Expected 0 spaces before closing bracket; 1 found
Loading history...
295
					$has_single = true;
296
					$permalink = get_post_type_archive_link( 'team' ) . '#team-' . $post->post_name;
0 ignored issues
show
Bug introduced by
Are you sure get_post_type_archive_link('team') of type false|string can be used in concatenation? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-type  annotation

296
					$permalink = /** @scrutinizer ignore-type */ get_post_type_archive_link( 'team' ) . '#team-' . $post->post_name;
Loading history...
Coding Style introduced by
Equals sign not aligned with surrounding assignments; expected 2 spaces but found 1 space

This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.

To visualize

$a = "a";
$ab = "ab";
$abc = "abc";

will produce issues in the first and second line, while this second example

$a   = "a";
$ab  = "ab";
$abc = "abc";

will produce no issues.

Loading history...
297
				}
298
				?>
299
				<article <?php post_class(); ?>>
300
					<div class="lsx-to-contact-thumb">
301
						<?php if ( $has_single ) { ?><a href="<?php echo esc_url( $permalink ); ?>"><?php } ?>
0 ignored issues
show
Coding Style introduced by
Expected 0 spaces after opening bracket; 1 found
Loading history...
Coding Style introduced by
Expected 0 spaces before closing bracket; 1 found
Loading history...
Bug introduced by
It seems like $permalink can also be of type false; however, parameter $url of esc_url() does only seem to accept string, maybe add an additional type check? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-type  annotation

301
						<?php if ( $has_single ) { ?><a href="<?php echo esc_url( /** @scrutinizer ignore-type */ $permalink ); ?>"><?php } ?>
Loading history...
302
							<?php lsx_thumbnail( 'lsx-thumbnail-square' ); ?>
303
						<?php if ( $has_single ) { ?></a><?php } ?>
0 ignored issues
show
Coding Style introduced by
Expected 0 spaces after opening bracket; 1 found
Loading history...
Coding Style introduced by
Expected 0 spaces before closing bracket; 1 found
Loading history...
304
					</div>
305
306
					<div class="lsx-to-contact-info">
307
						<small class="lsx-to-contact-prefix text-center">Your travel expert:</small>
308
309
						<h4 class="lsx-to-contact-name text-center">
310
							<?php if ( $has_single ) { ?><a href="<?php echo esc_url( $permalink ); ?>"><?php } ?>
0 ignored issues
show
Coding Style introduced by
Expected 0 spaces after opening bracket; 1 found
Loading history...
Coding Style introduced by
Expected 0 spaces before closing bracket; 1 found
Loading history...
311
								<?php the_title(); ?>
312
							<?php if ( $has_single ) { ?></a><?php } ?>
0 ignored issues
show
Coding Style introduced by
Expected 0 spaces after opening bracket; 1 found
Loading history...
Coding Style introduced by
Expected 0 spaces before closing bracket; 1 found
Loading history...
313
						</h4>
314
					</div>
315
316
					<div class="lsx-to-contact-meta-data text-center hidden">
317
						<?php
318
							lsx_to_team_contact_number( '<span class="lsx-to-meta-data contact-number"><i class="fa fa-phone orange"></i> ', '</span>' );
319
							lsx_to_team_contact_email( '<span class="lsx-to-meta-data email"><i class="fa fa-envelope orange"></i> ', '</span>' );
320
							lsx_to_team_contact_skype( '<span class="lsx-to-meta-data skype"><i class="fa fa-skype orange"></i> ', '</span>' );
321
							lsx_to_team_social_profiles( '<div class="lsx-to-meta-data lsx-to-contact-socials">', '</div>' );
322
						?>
323
					</div>
324
				</article>
325
				<?php
326
			endwhile;
327
328
			echo wp_kses_post( $after );
329
330
			wp_reset_postdata();
331
		endif;
332
	}
333
}
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
334
335
/**
336
 * Outputs the connected accommodation for a team member
337
 *
338
 * @package 	tour-operator
0 ignored issues
show
introduced by
Spaces must be used for mid-line alignment; tabs are not allowed
Loading history...
339
 * @subpackage	template-tags
0 ignored issues
show
introduced by
Spaces must be used for mid-line alignment; tabs are not allowed
Loading history...
340
 * @category 	team
0 ignored issues
show
introduced by
Spaces must be used for mid-line alignment; tabs are not allowed
Loading history...
341
 */
342
function lsx_to_team_accommodation() {
343
	global $lsx_to_archive;
344
345
	if ( post_type_exists( 'accommodation' ) && is_singular( 'team' ) ) {
0 ignored issues
show
Coding Style introduced by
Expected 0 spaces after opening bracket; 1 found
Loading history...
Coding Style introduced by
Expected 0 spaces before closing bracket; 1 found
Loading history...
346
		$args = array(
347
			'from'		=> 'accommodation',
0 ignored issues
show
introduced by
Spaces must be used for mid-line alignment; tabs are not allowed
Loading history...
introduced by
Array double arrow not aligned correctly; expected 3 space(s) between "'from'" and double arrow, but found 6.
Loading history...
348
			'to'		=> 'team',
0 ignored issues
show
introduced by
Spaces must be used for mid-line alignment; tabs are not allowed
Loading history...
introduced by
Array double arrow not aligned correctly; expected 5 space(s) between "'to'" and double arrow, but found 8.
Loading history...
349
			'column'	=> '3',
0 ignored issues
show
introduced by
Spaces must be used for mid-line alignment; tabs are not allowed
Loading history...
introduced by
Array double arrow not aligned correctly; expected 1 space(s) between "'column'" and double arrow, but found 4.
Loading history...
350
			// @codingStandardsIgnoreLine
351
			'before'	=> '<section id="accommodation" class="lsx-to-section lsx-to-collapse-section"><h2 class="lsx-to-section-title lsx-to-collapse-title lsx-title" data-toggle="collapse" data-target="#collapse-accommodation">' . __( lsx_to_get_post_type_section_title( 'accommodation', '', 'Featured Accommodations' ), 'to-team' ) . '</h2><div id="collapse-accommodation" class="collapse in"><div class="collapse-inner">',
352
			'after'		=> '</div></div></section>',
0 ignored issues
show
introduced by
Spaces must be used for mid-line alignment; tabs are not allowed
Loading history...
introduced by
Array double arrow not aligned correctly; expected 2 space(s) between "'after'" and double arrow, but found 5.
Loading history...
353
		);
354
355
		lsx_to_connected_panel_query( $args );
356
	}
357
}
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
358
359
/**
360
 * Outputs the connected destination for a team member
361
 *
362
 * @package 	tour-operator
0 ignored issues
show
introduced by
Spaces must be used for mid-line alignment; tabs are not allowed
Loading history...
363
 * @subpackage	template-tags
0 ignored issues
show
introduced by
Spaces must be used for mid-line alignment; tabs are not allowed
Loading history...
364
 * @category 	team
0 ignored issues
show
introduced by
Spaces must be used for mid-line alignment; tabs are not allowed
Loading history...
365
 */
366
function lsx_to_team_destination() {
367
	global $lsx_to_archive;
368
369
	if ( post_type_exists( 'destination' ) && is_singular( 'team' ) ) {
0 ignored issues
show
Coding Style introduced by
Expected 0 spaces after opening bracket; 1 found
Loading history...
Coding Style introduced by
Expected 0 spaces before closing bracket; 1 found
Loading history...
370
		$args = array(
371
			'from'   => 'destination',
372
			'to'     => 'team',
373
			'column' => '3',
374
			// @codingStandardsIgnoreLine
375
			'before' => '<section id="destination" class="lsx-to-section lsx-to-collapse-section"><h2 class="lsx-to-section-title lsx-to-collapse-title lsx-title" data-toggle="collapse" data-target="#collapse-destination">' . __( lsx_to_get_post_type_section_title( 'destination', '', 'Featured Destinations' ), 'to-team' ) . '</h2><div id="collapse-destination" class="collapse in"><div class="collapse-inner">',
376
			'after'  => '</div></div></section>',
377
		);
378
379
		lsx_to_connected_panel_query( $args );
380
	}
381
}
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
382
383
/**
384
 * Outputs the connected tour for a team member
385
 *
386
 * @package 	tour-operator
0 ignored issues
show
introduced by
Spaces must be used for mid-line alignment; tabs are not allowed
Loading history...
387
 * @subpackage	template-tags
0 ignored issues
show
introduced by
Spaces must be used for mid-line alignment; tabs are not allowed
Loading history...
388
 * @category 	team
0 ignored issues
show
introduced by
Spaces must be used for mid-line alignment; tabs are not allowed
Loading history...
389
 */
390
function lsx_to_team_tours() {
391
	global $lsx_to_archive;
392
393
	if ( post_type_exists( 'tour' ) && is_singular( 'team' ) ) {
0 ignored issues
show
Coding Style introduced by
Expected 0 spaces after opening bracket; 1 found
Loading history...
Coding Style introduced by
Expected 0 spaces before closing bracket; 1 found
Loading history...
394
		$args = array(
395
			'from'		=> 'tour',
0 ignored issues
show
introduced by
Spaces must be used for mid-line alignment; tabs are not allowed
Loading history...
introduced by
Array double arrow not aligned correctly; expected 3 space(s) between "'from'" and double arrow, but found 6.
Loading history...
396
			'to'		=> 'team',
0 ignored issues
show
introduced by
Spaces must be used for mid-line alignment; tabs are not allowed
Loading history...
introduced by
Array double arrow not aligned correctly; expected 5 space(s) between "'to'" and double arrow, but found 8.
Loading history...
397
			'column'	=> '3',
0 ignored issues
show
introduced by
Spaces must be used for mid-line alignment; tabs are not allowed
Loading history...
introduced by
Array double arrow not aligned correctly; expected 1 space(s) between "'column'" and double arrow, but found 4.
Loading history...
398
			// @codingStandardsIgnoreLine
399
			'before'	=> '<section id="tours" class="lsx-to-section lsx-to-collapse-section"><h2 class="lsx-to-section-title lsx-to-collapse-title lsx-title" data-toggle="collapse" data-target="#collapse-tours">' . __( lsx_to_get_post_type_section_title( 'tour', '', 'Featured Tours' ), 'to-team' ) . '</h2><div id="collapse-tours" class="collapse in"><div class="collapse-inner">',
400
			'after'		=> '</div></div></section>',
0 ignored issues
show
introduced by
Spaces must be used for mid-line alignment; tabs are not allowed
Loading history...
introduced by
Array double arrow not aligned correctly; expected 2 space(s) between "'after'" and double arrow, but found 5.
Loading history...
401
		);
402
403
		lsx_to_connected_panel_query( $args );
404
	}
405
}
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
406
407
/**
408
 * Outputs the connected accommodation for a team member
409
 *
410
 * @package 	tour-operator
0 ignored issues
show
introduced by
Spaces must be used for mid-line alignment; tabs are not allowed
Loading history...
411
 * @subpackage	template-tags
0 ignored issues
show
introduced by
Spaces must be used for mid-line alignment; tabs are not allowed
Loading history...
412
 * @category 	team
0 ignored issues
show
introduced by
Spaces must be used for mid-line alignment; tabs are not allowed
Loading history...
413
 */
414
function lsx_to_team_reviews() {
415
	global $lsx_to_archive;
416
417
	if ( post_type_exists( 'review' ) && is_singular( 'team' ) ) {
0 ignored issues
show
Coding Style introduced by
Expected 0 spaces after opening bracket; 1 found
Loading history...
Coding Style introduced by
Expected 0 spaces before closing bracket; 1 found
Loading history...
418
		$args = array(
419
			'from'		=> 'review',
0 ignored issues
show
introduced by
Spaces must be used for mid-line alignment; tabs are not allowed
Loading history...
introduced by
Array double arrow not aligned correctly; expected 3 space(s) between "'from'" and double arrow, but found 6.
Loading history...
420
			'to'		=> 'team',
0 ignored issues
show
introduced by
Spaces must be used for mid-line alignment; tabs are not allowed
Loading history...
introduced by
Array double arrow not aligned correctly; expected 5 space(s) between "'to'" and double arrow, but found 8.
Loading history...
421
			'column'	=> '2',
0 ignored issues
show
introduced by
Spaces must be used for mid-line alignment; tabs are not allowed
Loading history...
introduced by
Array double arrow not aligned correctly; expected 1 space(s) between "'column'" and double arrow, but found 4.
Loading history...
422
			// @codingStandardsIgnoreLine
423
			'before'	=> '<section id="reviews" class="lsx-to-section lsx-to-collapse-section"><h2 class="lsx-to-section-title lsx-to-collapse-title lsx-title" data-toggle="collapse" data-target="#collapse-reviews">' . __( lsx_to_get_post_type_section_title( 'review', '', 'Featured Reviews' ), 'to-team' ) . '</h2><div id="collapse-reviews" class="collapse in"><div class="collapse-inner">',
424
			'after'		=> '</div></div></section>',
0 ignored issues
show
introduced by
Spaces must be used for mid-line alignment; tabs are not allowed
Loading history...
introduced by
Array double arrow not aligned correctly; expected 2 space(s) between "'after'" and double arrow, but found 5.
Loading history...
425
		);
426
427
		lsx_to_connected_panel_query( $args );
428
	}
429
}
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
430
431
/**
0 ignored issues
show
Coding Style Documentation introduced by
Doc comment for parameter "$before" missing
Loading history...
Coding Style Documentation introduced by
Doc comment for parameter "$after" missing
Loading history...
Coding Style Documentation introduced by
Doc comment for parameter "$echo" missing
Loading history...
432
 * Gets the current specials connected team member
433
 *
434
 * @param		$before	| string
0 ignored issues
show
Documentation Bug introduced by
The doc comment | string at position 0 could not be parsed: Unknown type name '|' at position 0 in | string.
Loading history...
Coding Style introduced by
Missing parameter name
Loading history...
introduced by
Spaces must be used for mid-line alignment; tabs are not allowed
Loading history...
435
 * @param		$after	| string
0 ignored issues
show
Coding Style introduced by
Missing parameter name
Loading history...
introduced by
Spaces must be used for mid-line alignment; tabs are not allowed
Loading history...
436
 * @param		$echo	| boolean
0 ignored issues
show
Coding Style introduced by
Missing parameter name
Loading history...
introduced by
Spaces must be used for mid-line alignment; tabs are not allowed
Loading history...
437
 * @return		string
0 ignored issues
show
Coding Style introduced by
Function return type is not void, but function has no return statement
Loading history...
introduced by
Spaces must be used for mid-line alignment; tabs are not allowed
Loading history...
438
 *
439
 * @package 	tour-operator
0 ignored issues
show
introduced by
Spaces must be used for mid-line alignment; tabs are not allowed
Loading history...
440
 * @subpackage	template-tags
0 ignored issues
show
introduced by
Spaces must be used for mid-line alignment; tabs are not allowed
Loading history...
441
 * @category 	connections
0 ignored issues
show
introduced by
Spaces must be used for mid-line alignment; tabs are not allowed
Loading history...
442
 */
443
function lsx_to_connected_team( $before = '', $after = '', $echo = true ) {
444
	lsx_to_connected_items_query( 'team', get_post_type(), $before, $after, $echo );
445
}
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
446
447
/**
448
 * Outputs the connected posts
449
 *
450
 * @package 	tour-operator
0 ignored issues
show
introduced by
Spaces must be used for mid-line alignment; tabs are not allowed
Loading history...
451
 * @subpackage	template-tags
0 ignored issues
show
introduced by
Spaces must be used for mid-line alignment; tabs are not allowed
Loading history...
452
 * @category 	team
0 ignored issues
show
introduced by
Spaces must be used for mid-line alignment; tabs are not allowed
Loading history...
453
 */
454
function lsx_to_team_posts() {
455
	//$site_user = get_post_meta( get_the_ID(), 'site_user', true );
0 ignored issues
show
Unused Code Comprehensibility introduced by
58% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
Coding Style introduced by
No space found before comment text; expected "// $site_user = get_post_meta( get_the_ID(), 'site_user', true );" but found "//$site_user = get_post_meta( get_the_ID(), 'site_user', true );"
Loading history...
456
457
	if ( post_type_exists( 'post' ) && is_singular( 'team' ) ) {
0 ignored issues
show
Coding Style introduced by
Expected 0 spaces after opening bracket; 1 found
Loading history...
Coding Style introduced by
Expected 0 spaces before closing bracket; 1 found
Loading history...
458
		$args = array(
459
			'from'		=> 'post',
0 ignored issues
show
introduced by
Spaces must be used for mid-line alignment; tabs are not allowed
Loading history...
introduced by
Array double arrow not aligned correctly; expected 3 space(s) between "'from'" and double arrow, but found 6.
Loading history...
460
			'to'		=> 'team',
0 ignored issues
show
introduced by
Spaces must be used for mid-line alignment; tabs are not allowed
Loading history...
introduced by
Array double arrow not aligned correctly; expected 5 space(s) between "'to'" and double arrow, but found 8.
Loading history...
461
			'column'	=> '3',
0 ignored issues
show
introduced by
Spaces must be used for mid-line alignment; tabs are not allowed
Loading history...
introduced by
Array double arrow not aligned correctly; expected 1 space(s) between "'column'" and double arrow, but found 4.
Loading history...
462
			// @codingStandardsIgnoreLine
463
			'before'	=> '<section id="posts" class="lsx-to-section lsx-to-collapse-section"><h2 class="lsx-to-section-title lsx-to-collapse-title lsx-title" data-toggle="collapse" data-target="#collapse-posts">' . __( lsx_to_get_post_type_section_title( 'post', '', 'Featured Posts' ), 'to-team' ) . '</h2><div id="collapse-posts" class="collapse in"><div class="collapse-inner">',
464
			'after'		=> '</div></div></section>',
0 ignored issues
show
introduced by
Spaces must be used for mid-line alignment; tabs are not allowed
Loading history...
introduced by
Array double arrow not aligned correctly; expected 2 space(s) between "'after'" and double arrow, but found 5.
Loading history...
465
		);
466
467
		lsx_to_connected_panel_query( $args );
468
	}
469
}
0 ignored issues
show
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
470