| 1 | <?php |
||
| 19 | class EmbedShortcodeProvider implements ShortcodeHandler |
||
| 20 | { |
||
| 21 | |||
| 22 | /** |
||
| 23 | * Gets the list of shortcodes provided by this handler |
||
| 24 | * |
||
| 25 | * @return mixed |
||
| 26 | */ |
||
| 27 | public static function get_shortcodes() |
||
| 31 | |||
| 32 | /** |
||
| 33 | * Embed shortcode parser from Oembed. This is a temporary workaround. |
||
| 34 | * Oembed class has been replaced with the Embed external service. |
||
| 35 | * |
||
| 36 | * @param $arguments |
||
| 37 | * @param $content |
||
| 38 | * @param $parser |
||
| 39 | * @param $shortcode |
||
| 40 | * @param array $extra |
||
| 41 | * |
||
| 42 | * @return string |
||
| 43 | */ |
||
| 44 | public static function handle_shortcode($arguments, $content, $parser, $shortcode, $extra = array()) { |
||
| 52 | |||
| 53 | /** |
||
| 54 | * @param Adapter $embed |
||
| 55 | * |
||
| 56 | * @return string |
||
| 57 | */ |
||
| 58 | public static function embedForTemplate($embed) |
||
| 77 | } |
||
| 78 |
This check looks for unreachable code. It uses sophisticated control flow analysis techniques to find statements which will never be executed.
Unreachable code is most often the result of
return,dieorexitstatements that have been added for debug purposes.In the above example, the last
return falsewill never be executed, because a return statement has already been met in every possible execution path.