* @throws MWException
*/
protected static function cleanCallback( $callback ) {
- if( is_string( $callback ) ) {
+ if ( is_string( $callback ) ) {
if ( strpos( $callback, '::' ) !== false ) {
// PHP 5.1 cannot use call_user_func( 'Class::Method' )
// It can only handle only call_user_func( array( 'Class', 'Method' ) )
}
}
- if( count( $callback ) == 2 && $callback[0] == 'self' || $callback[0] == 'parent' ) {
+ if ( count( $callback ) == 2 && $callback[0] == 'self' || $callback[0] == 'parent' ) {
throw new MWException( 'MWFunction cannot call self::method() or parent::method()' );
}
* @return object
*/
public static function newObj( $class, $args = array() ) {
- if( !count( $args ) ) {
+ if ( !count( $args ) ) {
return new $class;
}