tenets:
  - name: elseif-not-else-if
    flows:
      codelingo/review:
        comment: The keyword elseif SHOULD be used instead of else if so that all control keywords look like single words.
      codelingo/rewrite:
      codelingo/docs:
        title: if, elseif, else
        body: |
          An ```if``` structure looks like the following. Note the placement of parentheses, spaces, and braces; and that ```else``` and ```elseif``` are on the same line as the closing brace from the earlier body.

          ```<?php
          if ($expr1) {
              // if body
          } elseif ($expr2) {
              // elseif body
          } else {
              // else body;
          }```

          The keyword elseif SHOULD be used instead of else if so that all control keywords look like single words.
    query: |
      import codelingo/ast/php

      @review comment
      @rewrite --replace "elseif"
      php.stmt_else(depth = any):
        php.stmt_if

tenets:
  - name: elseif-not-else-if
    flows:
      codelingo/review:
        comment: The keyword elseif SHOULD be used instead of else if so that all control keywords look like single words.
      codelingo/rewrite:
      codelingo/docs:
        title: if, elseif, else
        body: |
          An ```if``` structure looks like the following. Note the placement of parentheses, spaces, and braces; and that ```else``` and ```elseif``` are on the same line as the closing brace from the earlier body.

          ```<?php
          if ($expr1) {
              // if body
          } elseif ($expr2) {
              // elseif body
          } else {
              // else body;
          }```

          The keyword elseif SHOULD be used instead of else if so that all control keywords look like single words.
    query: |
      import codelingo/ast/php

      @review comment
      # This does not work as intended.
      # It removes everything after 'if'
      # and before closing brace.
      # Waiting on ability to edit raw file.
      @rewrite --replace "elseif"
      php.stmt_else(depth = any):
        php.stmt_if

Add comment to query explaining tenet issue
Add comment to query explaining tenet issue
