markdown 代码复杂性报告,用于比较在PHP Raw Raw中编写`clamp`函数的各种样式

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了markdown 代码复杂性报告,用于比较在PHP Raw Raw中编写`clamp`函数的各种样式相关的知识,希望对你有一定的参考价值。

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>PhpMetrics report</title>
  <meta content="width=device-width, initial-scale=1" name="viewport">
  <link
    crossorigin="anonymous"
    href="https://cdnjs.cloudflare.com/ajax/libs/bulma/0.5.3/css/bulma.min.css"
    integrity="sha256-spCEAaZMKebC3rE/ZTt8jITn65b0Zan45WXblWjyDyQ="
    rel="stylesheet"
  />
  <link
    crossorigin="anonymous"
    href="https://rawgit.com/tristen/tablesort/8fac56d4/tablesort.css"
    integrity="sha384-fEamSb6ckugl8gVUnIx3yq0S1UbtJ4am10TSni/9LZQuOJowf18Ian7zELfKqw1N"
    rel="stylesheet"
  />
  <style>.content {margin: 1em 3em;}</style>
</head>
<body class="content has-text-centered">
  <h1>Code Metrics</h1>
  <h2>
    <svg height="24" viewbox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">
      <defs><path d="M0 0h24v24H0z" id="a"></path></defs>
      <clippath id="b"><use overflow="visible" xlink:href="#a"></use></clippath>
      <path clip-path="url(#b)" d="M11 5.08V2c-5 .5-9 4.81-9 10s4 9.5 9 10v-3.08c-3-.48-6-3.4-6-6.92s3-6.44 6-6.92zM18.97 11H22c-.47-5-4-8.53-9-9v3.08C16 5.51 18.54 8 18.97 11zM13 18.92V22c5-.47 8.53-4 9-9h-3.03c-.43 3-2.97 5.49-5.97 5.92z"></path>
    </svg>
    Size &amp; volume
  </h2>
  <table class="js-sort-table table is-bordered is-striped is-narrow is-hoverable is-fullwidth" id="table-length">
    <thead>
      <tr>
        <th>Class</th>
        <th class="js-sort-number">LLOC</th>
        <th class="js-sort-number">CLOC</th>
        <th class="js-sort-number">Volume</th>
        <th class="js-sort-number">Intelligent content</th>
        <th class="js-sort-number">Comment Weight</th>
      </tr>
    </thead>
    <tr>
      <td>clamp_832B9C44</td>
      <td>8</td>
      <td>0</td>
      <td>14</td>
      <td>14</td>
      <td>0</td>
    </tr>
    <tr>
      <td>clamp_CAB599E9</td>
      <td>14</td>
      <td>0</td>
      <td>44.92</td>
      <td>6.74</td>
      <td>0</td>
    </tr>
    <tr>
      <td>clamp_8389C469</td>
      <td>13</td>
      <td>0</td>
      <td>54</td>
      <td>5.4</td>
      <td>0</td>
    </tr>
    <tr>
      <td>clamp_83C742FF</td>
      <td>14</td>
      <td>0</td>
      <td>47.73</td>
      <td>7.16</td>
      <td>0</td>
    </tr>
    <tr>
      <td>clamp_60AA891E</td>
      <td>8</td>
      <td>0</td>
      <td>33.6</td>
      <td>6.72</td>
      <td>0</td>
    </tr>
    <tr>
      <td>clamp_7BC1F85B</td>
      <td>14</td>
      <td>0</td>
      <td>57</td>
      <td>5.7</td>
      <td>0</td>
    </tr>
    <tr>
      <td>clamp_A13E087E</td>
      <td>14</td>
      <td>0</td>
      <td>47.73</td>
      <td>7.16</td>
      <td>0</td>
    </tr>
  </table>
  <h2>
    <svg height="24" viewbox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">
    <path d="M0 0h24v24H0V0z" fill="none"></path>
    <path d="M19.07 4.93l-1.41 1.41C19.1 7.79 20 9.79 20 12c0 4.42-3.58 8-8 8s-8-3.58-8-8c0-4.08 3.05-7.44 7-7.93v2.02C8.16 6.57 6 9.03 6 12c0 3.31 2.69 6 6 6s6-2.69 6-6c0-1.66-.67-3.16-1.76-4.24l-1.41 1.41C15.55 9.9 16 10.9 16 12c0 2.21-1.79 4-4 4s-4-1.79-4-4c0-1.86 1.28-3.41 3-3.86v2.14c-.6.35-1 .98-1 1.72 0 1.1.9 2 2 2s2-.9 2-2c0-.74-.4-1.38-1-1.72V2h-1C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10c0-2.76-1.12-5.26-2.93-7.07z"></path>
    </svg>
    Complexity &amp; defects
  </h2>
  <table class="js-sort-table table is-bordered is-striped is-narrow is-hoverable is-fullwidth" id="table-length">
    <thead>
      <tr>
        <th>Class</th>
        <th class="js-sort-number">Class cycl.</th>
        <th class="js-sort-number">Max method cycl.</th>
        <th class="js-sort-number">Relative system complexity</th>
        <th class="js-sort-number">Relative data complexity</th>
        <th class="js-sort-number">Relative structural complexity</th>
        <th class="js-sort-number">Bugs</th>
        <th class="js-sort-number">Defects</th>
      </tr>
    </thead>
    <tr>
      <td>clamp_832B9C44</td>
      <td>1</td>
      <td>1</td>
      <td>4</td>
      <td>4</td>
      <td>0</td>
      <td>0</td>
      <td>0.15</td>
    </tr>
    <tr>
      <td>clamp_CAB599E9</td>
      <td>2</td>
      <td>2</td>
      <td>6</td>
      <td>6</td>
      <td>0</td>
      <td>0.01</td>
      <td>0.22</td>
    </tr>
    <tr>
      <td>clamp_8389C469</td>
      <td>2</td>
      <td>2</td>
      <td>4</td>
      <td>4</td>
      <td>0</td>
      <td>0.02</td>
      <td>0.22</td>
    </tr>
    <tr>
      <td>clamp_83C742FF</td>
      <td>3</td>
      <td>3</td>
      <td>6</td>
      <td>6</td>
      <td>0</td>
      <td>0.02</td>
      <td>0.29</td>
    </tr>
    <tr>
      <td>clamp_60AA891E</td>
      <td>1</td>
      <td>1</td>
      <td>4</td>
      <td>4</td>
      <td>0</td>
      <td>0.01</td>
      <td>0.15</td>
    </tr>
    <tr>
      <td>clamp_7BC1F85B</td>
      <td>3</td>
      <td>3</td>
      <td>4</td>
      <td>4</td>
      <td>0</td>
      <td>0.02</td>
      <td>0.29</td>
    </tr>
    <tr>
      <td>clamp_A13E087E</td>
      <td>3</td>
      <td>3</td>
      <td>6</td>
      <td>6</td>
      <td>0</td>
      <td>0.02</td>
      <td>0.29</td>
    </tr>
  </table>

  <h2>
    <svg height="24" viewbox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">
      <path d="M0 0h24v24H0z" fill="none"></path>
      <path d="M17 6c-3.31 0-6 2.69-6 6s2.69 6 6 6 6-2.69 6-6-2.69-6-6-6zM5 8c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4zm0 6c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2z"></path>
    </svg>
    Object oriented metrics
  </h2>
  <table class="js-sort-table table is-bordered is-striped is-narrow is-hoverable is-fullwidth" id="table-length">
    <thead>
      <tr>
        <th>Class</th>
        <th class="js-sort-number">LCOM</th>
        <th class="js-sort-number">Volume</th>
        <th class="js-sort-number">Class cycl.</th>
        <th class="js-sort-number">Max method cycl.</th>
        <th class="js-sort-number">Bugs</th>
        <th class="js-sort-number">Difficulty</th>
      </tr>
    </thead>
    <tr>
      <td>clamp_832B9C44</td>
      <td>1</td>
      <td>14</td>
      <td>1</td>
      <td>1</td>
      <td>0</td>
      <td>1</td>
    </tr>
    <tr>
      <td>clamp_CAB599E9</td>
      <td>1</td>
      <td>44.92</td>
      <td>2</td>
      <td>2</td>
      <td>0.01</td>
      <td>6.67</td>
    </tr>
    <tr>
      <td>clamp_8389C469</td>
      <td>1</td>
      <td>54</td>
      <td>2</td>
      <td>2</td>
      <td>0.02</td>
      <td>10</td>
    </tr>
    <tr>
      <td>clamp_83C742FF</td>
      <td>1</td>
      <td>47.73</td>
      <td>3</td>
      <td>3</td>
      <td>0.02</td>
      <td>6.67</td>
    </tr>
    <tr>
      <td>clamp_60AA891E</td>
      <td>1</td>
      <td>33.6</td>
      <td>1</td>
      <td>1</td>
      <td>0.01</td>
      <td>5</td>
    </tr>
    <tr>
      <td>clamp_7BC1F85B</td>
      <td>1</td>
      <td>57</td>
      <td>3</td>
      <td>3</td>
      <td>0.02</td>
      <td>10</td>
    </tr>
    <tr>
      <td>clamp_A13E087E</td>
      <td>1</td>
      <td>47.73</td>
      <td>3</td>
      <td>3</td>
      <td>0.02</td>
      <td>6.67</td>
    </tr>
  </table>
  <p class="is-pulled-right	">Created with <a href="https://www.phpmetrics.org/">PHPMetrics</a></p>

<script
  crossorigin="anonymous"
  integrity="sha256-9K8PNtEmsUnNmfTBL9Qn58jQokYgaReYVbONQ+VEhaM="
  src="https://cdnjs.cloudflare.com/ajax/libs/tablesort/5.0.1/tablesort.min.js"
></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/tablesort/5.0.1/sorts/tablesort.number.min.js" integrity="sha256-iN7KurZsC57TrLxXl68DsJd47XVqpfCZDAFexSr619Q=" crossorigin="anonymous"></script>
<script>
    Array.from(document.getElementsByTagName('table')).forEach(function(p_oTable){new Tablesort(p_oTable);})
</script>
</body>
</html>
<kbd>

以上是关于markdown 代码复杂性报告,用于比较在PHP Raw Raw中编写`clamp`函数的各种样式的主要内容,如果未能解决你的问题,请参考以下文章

markdown 不要使用`empty`进行比较--Potherca在PHP中创建更健壮的代码的规则

markdown 在PHP中编写`clamp`函数的各种风格的比较

markdown 在PHP中编写`clamp`函数的各种样式的比较基准

markdown 用于预处理字段的WordPress自定义PHP函数在Twig模板中使用之前

PHP HTTP请求

markdown Shell用于使用Docker运行NPM,Composer和PHP之类的东西。