canax/textfilter

View on GitHub
src/TextFilter/TShortcode.php

Summary

Maintainability
B
6 hrs
Test Coverage

Method shortCode has 64 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function shortCode($text)
    {
        /* Needs PHP 7
        $patternsAndCallbacks = [
            "/\[(FIGURE)[\s+](.+)\]/" => function ($match) {
Severity: Major
Found in src/TextFilter/TShortcode.php - About 2 hrs to fix

    Method shortCodeFigure has 40 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public static function shortCodeFigure($options)
        {
            // Merge incoming options with default and expose as variables
            $options= array_merge(
                [
    Severity: Minor
    Found in src/TextFilter/TShortcode.php - About 1 hr to fix

      Method shortCodeCodepen has 29 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public static function shortCodeCodepen($options)
          {
              $options= array_merge(
                  [
                      "id"    => null,
      Severity: Minor
      Found in src/TextFilter/TShortcode.php - About 1 hr to fix

        Method shortCodeYoutube has 29 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public static function shortCodeYoutube($options)
            {
                $options= array_merge(
                    [
                        "id"    => null,
        Severity: Minor
        Found in src/TextFilter/TShortcode.php - About 1 hr to fix

          There are no issues that match your filters.

          Category
          Status