Merge "Consistently follow conventions for documenting parameters"
[lhc/web/wiklou.git] / includes / ForkController.php
index 2a05411..ced45af 100644 (file)
@@ -53,7 +53,7 @@ class ForkController {
        const RESTART_ON_ERROR = 1;
 
        public function __construct( $numProcs, $flags = 0 ) {
-               if ( php_sapi_name() != 'cli' ) {
+               if ( PHP_SAPI != 'cli' ) {
                        throw new MWException( "ForkController cannot be used from the web." );
                }
                $this->procsToStart = $numProcs;
@@ -121,7 +121,9 @@ class ForkController {
                        if ( function_exists( 'pcntl_signal_dispatch' ) ) {
                                pcntl_signal_dispatch();
                        } else {
-                               declare (ticks=1) { $status = $status; }
+                               declare( ticks = 1 ) {
+                                       $status = $status;
+                               }
                        }
                        // Respond to TERM signal
                        if ( $this->termReceived ) {