}
public function hasSkipifKey() {
- if($this->skipifKey != '') {
- return true;
- }
- return false;
+ return $this->skipifKey != '';
}
public function hasSkipifExt() {
- if($this->skipifExt != '') {
- return true;
- }
- return false;
+ return $this->skipifExt != '';
}
public function hasIni() {
return $this->optSections['ini'];
*
*/
class gtIfClassHasMethod extends gtPreCondition {
-
+
public function check( $clo) {
- if($clo->hasOption('c')) {
- if(!$clo->hasOption('m')) {
- return false;
- }
- return true;
- }
- return true;
+ return !$clo->hasOption('c') || $clo->hasOption('m');
}
-
+
public function getMessage() {
return gtText::get('methodNotSpecified');
}
}
-?>
\ No newline at end of file
+?>
*
*/
class gtIsSpecifiedFunctionOrMethod extends gtPreCondition {
-
+
public function check( $clo) {
- if($clo->hasOption('f') || $clo->hasOption('m')) {
-
- return true;
- }
- return false;
+ return $clo->hasOption('f') || $clo->hasOption('m');
}
-
+
public function getMessage() {
return gtText::get('functionOrMethodNotSpecified');
}
}
-?>
\ No newline at end of file
+?>
*
*/
class gtIsSpecifiedTestType extends gtPreCondition {
-
+
public function check( $clo) {
- if($clo->hasOption('b') || $clo->hasOption('e') || $clo->hasOption('v') ) {
-
- return true;
- }
- return false;
+ return $clo->hasOption('b') || $clo->hasOption('e') || $clo->hasOption('v');
}
public function getMessage() {
return gtText::get('testTypeNotSpecified');
}
}
-?>
\ No newline at end of file
+?>
public function check( $clo) {
if($clo->hasOption('c') ) {
$className = $clo->getOption('c');
- if( in_array( $className, get_declared_classes() ) ) {
- return true;
- }
- return false;
+ return in_array( $className, get_declared_classes() );
}
return true;
}
return gtText::get('unknownClass');
}
}
-?>
\ No newline at end of file
+?>
if($clo->hasOption('f') ) {
$function = $clo->getOption('f');
$functions = get_defined_functions();
- if( in_array( $function, $functions['internal'] ) ) {
- return true;
- }
- return false;
+ return in_array( $function, $functions['internal'] );
}
return true;
}
return gtText::get('unknownFunction');
}
}
-?>
\ No newline at end of file
+?>