File tree Expand file tree Collapse file tree 6 files changed +17
-43
lines changed
scripts/dev/generate-phpt/src/setup Expand file tree Collapse file tree 6 files changed +17
-43
lines changed Original file line number Diff line number Diff line change @@ -56,17 +56,11 @@ public function hasSkipif() {
5656 }
5757
5858 public function hasSkipifKey () {
59- if ($ this ->skipifKey != '' ) {
60- return true ;
61- }
62- return false ;
59+ return $ this ->skipifKey != '' ;
6360 }
6461
6562 public function hasSkipifExt () {
66- if ($ this ->skipifExt != '' ) {
67- return true ;
68- }
69- return false ;
63+ return $ this ->skipifExt != '' ;
7064 }
7165 public function hasIni () {
7266 return $ this ->optSections ['ini ' ];
Original file line number Diff line number Diff line change 55 *
66 */
77class gtIfClassHasMethod extends gtPreCondition {
8-
8+
99 public function check ( $ clo ) {
10- if ($ clo ->hasOption ('c ' )) {
11- if (!$ clo ->hasOption ('m ' )) {
12- return false ;
13- }
14- return true ;
15- }
16- return true ;
10+ return !$ clo ->hasOption ('c ' ) || $ clo ->hasOption ('m ' );
1711 }
18-
12+
1913 public function getMessage () {
2014 return gtText::get ('methodNotSpecified ' );
2115 }
2216
2317}
24- ?>
18+ ?>
Original file line number Diff line number Diff line change 55 *
66 */
77class gtIsSpecifiedFunctionOrMethod extends gtPreCondition {
8-
8+
99 public function check ( $ clo ) {
10- if ($ clo ->hasOption ('f ' ) || $ clo ->hasOption ('m ' )) {
11-
12- return true ;
13- }
14- return false ;
10+ return $ clo ->hasOption ('f ' ) || $ clo ->hasOption ('m ' );
1511 }
16-
12+
1713 public function getMessage () {
1814 return gtText::get ('functionOrMethodNotSpecified ' );
1915 }
2016}
21- ?>
17+ ?>
Original file line number Diff line number Diff line change 55 *
66 */
77class gtIsSpecifiedTestType extends gtPreCondition {
8-
8+
99 public function check ( $ clo ) {
10- if ($ clo ->hasOption ('b ' ) || $ clo ->hasOption ('e ' ) || $ clo ->hasOption ('v ' ) ) {
11-
12- return true ;
13- }
14- return false ;
10+ return $ clo ->hasOption ('b ' ) || $ clo ->hasOption ('e ' ) || $ clo ->hasOption ('v ' );
1511 }
1612
1713 public function getMessage () {
1814 return gtText::get ('testTypeNotSpecified ' );
1915 }
2016}
21- ?>
17+ ?>
Original file line number Diff line number Diff line change @@ -9,10 +9,7 @@ class gtIsValidClass extends gtPreCondition {
99 public function check ( $ clo ) {
1010 if ($ clo ->hasOption ('c ' ) ) {
1111 $ className = $ clo ->getOption ('c ' );
12- if ( in_array ( $ className , get_declared_classes () ) ) {
13- return true ;
14- }
15- return false ;
12+ return in_array ( $ className , get_declared_classes () );
1613 }
1714 return true ;
1815 }
@@ -21,4 +18,4 @@ public function getMessage() {
2118 return gtText::get ('unknownClass ' );
2219 }
2320}
24- ?>
21+ ?>
Original file line number Diff line number Diff line change @@ -10,10 +10,7 @@ public function check( $clo) {
1010 if ($ clo ->hasOption ('f ' ) ) {
1111 $ function = $ clo ->getOption ('f ' );
1212 $ functions = get_defined_functions ();
13- if ( in_array ( $ function , $ functions ['internal ' ] ) ) {
14- return true ;
15- }
16- return false ;
13+ return in_array ( $ function , $ functions ['internal ' ] );
1714 }
1815 return true ;
1916 }
@@ -22,4 +19,4 @@ public function getMessage() {
2219 return gtText::get ('unknownFunction ' );
2320 }
2421}
25- ?>
22+ ?>
You can’t perform that action at this time.
0 commit comments