Project

General

Profile

Actions

Backport(バックポート) #3642

closed

コーディング規約チェックのルールにおいて制御構造のブロックで空白が考慮されていない

Added by 誠二 天重 over 10 years ago. Updated over 8 years ago.

Status:
Invalid(無効)
Priority:
Normal(通常)
Target version:
Start date:
2011-10-18
Due date:
% Done:

0%

Estimated time:

Description

改行

コーディング規約チェックのルールで制御構造のブロックで空白が考慮されていない.

data/CodingStandard/OpenPNE3/Sniffs/WhiteSpace/ControlSignatureSniff.php

 19   protected function getPatterns()
 20   {
 21     return array(
 22        'tryEOL{EOL...}EOLcatch (...)EOL{EOL',
 23        'doEOL{EOL...}EOLwhile (...);EOL',
 24        'while (...)EOL{EOL',
 25        'for (...)EOL{EOL',
 26        'if (...)EOL{EOL',
 27        'foreach (...)EOL{EOL',
 28        '}EOLelseif (...)EOL{EOL',
 29        '}EOLelseEOL{EOL',
 30     );
 31   }

修正案

下記のように修正.

diff --git a/data/CodingStandard/OpenPNE3/Sniffs/WhiteSpace/ControlSignatureSniff.php b/data/CodingStandard/OpenPNE3/Sniffs/WhiteSpace/ControlSignatureSniff.php
index d89fd62..b05ca6a 100644
--- a/data/CodingStandard/OpenPNE3/Sniffs/WhiteSpace/ControlSignatureSniff.php
+++ b/data/CodingStandard/OpenPNE3/Sniffs/WhiteSpace/ControlSignatureSniff.php
@@ -19,14 +19,14 @@ class OpenPNE3_Sniffs_WhiteSpace_ControlSignatureSniff extends PHP_CodeSniffer_S
   protected function getPatterns()
   {
     return array(
-       'tryEOL{EOL...}EOLcatch (...)EOL{EOL',
-       'doEOL{EOL...}EOLwhile (...);EOL',
-       'while (...)EOL{EOL',
-       'for (...)EOL{EOL',
-       'if (...)EOL{EOL',
-       'foreach (...)EOL{EOL',
-       '}EOLelseif (...)EOL{EOL',
-       '}EOLelseEOL{EOL',
+       'tryEOL *{EOL...}EOL *catch (...)EOL *{EOL',
+       'doEOL *{EOL...}EOL *while (...);EOL',
+       'while (...)EOL *{EOL',
+       'for (...)EOL *{EOL',
+       'if (...)EOL *{EOL',
+       'foreach (...)EOL *{EOL',
+       '}EOL *elseif (...)EOL *{EOL',
+       '}EOL *elseEOL *{EOL',
     );
   }
 }

Related issues 1 (0 open1 closed)

Copied from OpenPNE 3 - Bug(バグ) #2503: コーディング規約チェックのルールにおいて制御構造のブロックで空白が考慮されていないInvalid(無効)Youichi Kimura2011-10-18

Actions
Actions #1

Updated by 誠二 天重 over 10 years ago

  • Copied from Bug(バグ) #2503: コーディング規約チェックのルールにおいて制御構造のブロックで空白が考慮されていない added
Actions #2

Updated by isao sano over 10 years ago

  • Target version changed from OpenPNE 3.8.12 to OpenPNE 3.8.x
Actions #3

Updated by kaoru n over 8 years ago

  • Target version changed from OpenPNE 3.8.x to OpenPNE 3.8.21
Actions #4

Updated by Youichi Kimura over 8 years ago

  • Status changed from New(新規) to Pending Review(レビュー待ち)
  • % Done changed from 0 to 50

下記 Pull Request を作成しました
https://github.com/openpne/OpenPNE3/pull/346

Actions #5

Updated by kaoru n over 8 years ago

  • Assignee set to Youichi Kimura
Actions #6

Updated by Youichi Kimura over 8 years ago

  • Status changed from Pending Review(レビュー待ち) to Rejected(差し戻し)

#2503-12 と同様に理由で差し戻します。

Actions #7

Updated by kaoru n over 8 years ago

  • Target version changed from OpenPNE 3.8.21 to OpenPNE 3.8.x
Actions #8

Updated by kaoru n over 8 years ago

  • Status changed from Rejected(差し戻し) to Invalid(無効)
  • % Done changed from 50 to 0

#2503-13 により無効とします

Actions

Also available in: Atom PDF