GB_Meta::get
Retrieve metadata for the specified object.
Signature
public function get(string
$meta_type,
int
$object_id,
[string
$meta_key = '',
[boolean
$single = false]] )
Parameters
$meta_type
—
string
Type of object metadata is for (e.g., comment, post, or user)
$object_id
—
int
ID of the object metadata is for
$meta_key
—
string
Optional. Metadata key. If not specified, retrieve all metadata for
the specified object.
$single
—
boolean
Optional, default is false. If true, return only the first value of the
specified meta_key. This parameter has no effect if meta_key is not specified.
Returns
- string|array
- Single metadata value, or array of values
Violations
PHPMessDetector
Line |
Rule |
Message |
231 - 294 |
CyclomaticComplexity
|
The method get() has a Cyclomatic Complexity of 12. The configured cyclomatic complexity threshold is 10. |
231 - 294 |
NPathComplexity
|
The method get() has an NPath complexity of 576. The configured NPath complexity threshold is 200. |
Checkstyle
Line |
Column |
Severity |
Message |
231 |
12 |
error
|
Visibility must be declared on method "get" |
250 |
11 |
error
|
Whitespace found at end of line |
264 |
13 |
error
|
Inline control structures are not allowed |
266 |
13 |
error
|
Expected 1 space after ELSE keyword; newline found |
266 |
13 |
error
|
Inline control structures are not allowed |
284 |
13 |
error
|
Inline control structures are not allowed |
286 |
13 |
error
|
Expected 1 space after ELSE keyword; newline found |
286 |
13 |
error
|
Inline control structures are not allowed |
290 |
9 |
error
|
Inline control structures are not allowed |
292 |
9 |
error
|
Expected 1 space after ELSE keyword; newline found |
292 |
9 |
error
|
Inline control structures are not allowed |