Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit3227cf2

Browse files
dantleechweaverryan
authored andcommitted
Updated coding standard
Specify using "sprintf" in Exceptionmessages as per@fabpot's recommendation on the mailing list.
1 parentecea24b commit3227cf2

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

‎contributing/code/standards.rst

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,8 @@ example containing most features described below:
7272
} else {
7373
$dummy = ucwords($dummy);
7474
}
75+
} else {
76+
throw new\RuntimeException(sprintf('Unrecognized dummy option "%s"', $dummy));
7577
}
7678

7779
return $dummy;
@@ -100,10 +102,12 @@ Structure
100102

101103
* Declare class properties before methods;
102104

103-
* Declare public methods first, then protected ones and finally private ones.
105+
* Declare public methods first, then protected ones and finally private ones;
104106

105107
* Use parentheses when instantiating classes regardless of the number of
106-
arguments the constructor has.
108+
arguments the constructor has;
109+
110+
* Exception message strings should be concatenated using:phpfunction:`sprintf`.
107111

108112
Naming Conventions
109113
------------------

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp