\GB_Meta
Class for manipulating metadata of various GeniBase object types.
Synopsis
class GB_Meta
{
- // methods
- public static mixed _get_table()
- public static mixed _sanitize()
- public static int|bool add()
- public static string|array get()
- public static int|bool update()
- public static bool delete()
- public static boolean exists()
- public static get_by_mid()
- public static bool update_by_mid()
- public static bool delete_by_mid()
- public static mixed update_cache()
- public static bool is_protected()
- public static void register()
Violations
PHPMessDetector
Line | Rule | Message |
---|---|---|
99 - 212 | CyclomaticComplexity | The method add() has a Cyclomatic Complexity of 10. The configured cyclomatic complexity threshold is 10. |
99 - 212 | ExcessiveMethodLength | The method add() has 114 lines of code. Current threshold is set to 100. Avoid really long methods. |
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. |
316 - 446 | CyclomaticComplexity | The method update() has a Cyclomatic Complexity of 15. The configured cyclomatic complexity threshold is 10. |
316 - 446 | NPathComplexity | The method update() has an NPath complexity of 4096. The configured NPath complexity threshold is 200. |
316 - 446 | ExcessiveMethodLength | The method update() has 131 lines of code. Current threshold is set to 100. Avoid really long methods. |
469 - 593 | CyclomaticComplexity | The method delete() has a Cyclomatic Complexity of 16. The configured cyclomatic complexity threshold is 10. |
469 - 593 | NPathComplexity | The method delete() has an NPath complexity of 5760. The configured NPath complexity threshold is 200. |
469 - 593 | ExcessiveMethodLength | The method delete() has 125 lines of code. Current threshold is set to 100. Avoid really long methods. |
836 - 901 | CyclomaticComplexity | The method update_cache() has a Cyclomatic Complexity of 16. The configured cyclomatic complexity threshold is 10. |
836 - 901 | NPathComplexity | The method update_cache() has an NPath complexity of 2376. The configured NPath complexity threshold is 200. |
Checkstyle
Line | Column | Severity | Message |
---|---|---|---|
33 | 12 | warning | Method name "_get_table" should not be prefixed with an underscore to indicate visibility |
33 | 12 | error | Method name "GB_Meta::_get_table" is not in camel caps format |
33 | 12 | error | Visibility must be declared on method "_get_table" |
35 | 9 | error | Inline control structures are not allowed |
57 | 12 | warning | Method name "_sanitize" should not be prefixed with an underscore to indicate visibility |
57 | 12 | error | Visibility must be declared on method "_sanitize" |
69 | 11 | error | Whitespace found at end of line |
99 | 12 | error | Visibility must be declared on method "add" |
102 | 9 | warning | Line exceeds 120 characters; contains 123 characters |
133 | 11 | error | Whitespace found at end of line |
146 | 121 | warning | Line exceeds 120 characters; contains 121 characters |
147 | 9 | error | Inline control structures are not allowed |
150 | 9 | error | Inline control structures are not allowed |
168 | 11 | error | Whitespace found at end of line |
187 | 9 | error | Inline control structures are not allowed |
199 | 11 | error | Whitespace found at end of line |
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 |
316 | 12 | error | Visibility must be declared on method "update" |
347 | 11 | error | Whitespace found at end of line |
361 | 128 | warning | Line exceeds 120 characters; contains 128 characters |
362 | 9 | error | Inline control structures are not allowed |
369 | 17 | error | Inline control structures are not allowed |
374 | 126 | warning | Line exceeds 120 characters; contains 126 characters |
405 | 15 | error | Whitespace found at end of line |
419 | 9 | error | Inline control structures are not allowed |
432 | 15 | error | Whitespace found at end of line |
469 | 12 | error | Visibility must be declared on method "delete" |
497 | 11 | error | Whitespace found at end of line |
511 | 128 | warning | Line exceeds 120 characters; contains 128 characters |
512 | 9 | error | Inline control structures are not allowed |
519 | 9 | error | Inline control structures are not allowed |
521 | 9 | error | Inline control structures are not allowed |
532 | 9 | error | Inline control structures are not allowed |
535 | 9 | error | Inline control structures are not allowed |
548 | 11 | error | Whitespace found at end of line |
562 | 9 | error | Inline control structures are not allowed |
580 | 11 | error | Whitespace found at end of line |
608 | 12 | error | Visibility must be declared on method "exists" |
623 | 9 | error | Inline control structures are not allowed |
635 | 9 | error | Inline control structures are not allowed |
652 | 12 | error | Method name "GB_Meta::get_by_mid" is not in camel caps format |
652 | 12 | error | Visibility must be declared on method "get_by_mid" |
670 | 9 | error | Inline control structures are not allowed |
673 | 9 | error | Inline control structures are not allowed |
694 | 12 | error | Method name "GB_Meta::update_by_mid" is not in camel caps format |
694 | 12 | error | Visibility must be declared on method "update_by_mid" |
745 | 13 | error | Inline control structures are not allowed |
774 | 12 | error | Method name "GB_Meta::delete_by_mid" is not in camel caps format |
774 | 12 | error | Visibility must be declared on method "delete_by_mid" |
801 | 126 | warning | Line exceeds 120 characters; contains 126 characters |
814 | 127 | warning | Line exceeds 120 characters; contains 127 characters |
836 | 12 | error | Method name "GB_Meta::update_cache" is not in camel caps format |
836 | 12 | error | Visibility must be declared on method "update_cache" |
861 | 13 | error | Inline control structures are not allowed |
863 | 13 | error | Expected 1 space after ELSE keyword; newline found |
863 | 13 | error | Inline control structures are not allowed |
867 | 9 | error | Inline control structures are not allowed |
872 | 144 | warning | Line exceeds 120 characters; contains 144 characters |
884 | 17 | error | Inline control structures are not allowed |
886 | 17 | error | Inline control structures are not allowed |
895 | 13 | error | Inline control structures are not allowed |
913 | 12 | error | Method name "GB_Meta::is_protected" is not in camel caps format |
913 | 12 | error | Visibility must be declared on method "is_protected" |
921 | 11 | error | Whitespace found at end of line |
946 | 12 | error | Visibility must be declared on method "register" |
948 | 9 | error | Inline control structures are not allowed |
952 | 13 | error | Inline control structures are not allowed |
954 | 13 | error | Expected 1 space after ELSE keyword; newline found |
954 | 13 | error | Inline control structures are not allowed |
958 | 9 | error | Inline control structures are not allowed |
Tasks
Line | Task |
---|---|
101 | Remove this? |
Methods
public
- _get_table() — Retrieve the name of the metadata table for the specified object type.
- _sanitize() — Sanitize meta value.
- add() — Add metadata for the specified object.
- delete() — Delete metadata for the specified object.
- delete_by_mid() — Delete meta data by meta ID
- exists() — Determine if a meta key is set for a given object
- get() — Retrieve metadata for the specified object.
- get_by_mid() — Get meta data by meta ID
- is_protected() — Determine whether a meta key is protected.
- register() — Register meta key
- update() — Update metadata for the specified object.
- update_by_mid() — Update meta data by meta ID
- update_cache() — Update the metadata cache for the specified objects.
History
-
2017-05-18T21:45:34+00:00 (commit #62babba)
Author: Limych (andrey@khrolenok.ru) / Commiter: Limych (andrey@khrolenok.ru)
Pre 3.0.0
-
2017-05-16T19:52:59+00:00 (commit #fd0a296)
Author: Limych (andrey@khrolenok.ru) / Commiter: Limych (andrey@khrolenok.ru)
PSR-2 applied
-
2016-01-25T17:45:50+00:00 (commit #97e2af2)
Author: Limych (andrey@khrolenok.ru) / Commiter: Limych (andrey@khrolenok.ru)
Pre v.3.0