src/ProcessSlave.php
protected function sendCurrentFiles()
    {
        if (!$this->isDebug()) {
            return;
        }

        $files = array_merge($this->watchedFiles, get_included_files());
        $flipped = array_flip($files);

        //speedy way checking if two arrays are different.
        if (!$this->lastSentFiles || array_diff_key($flipped, $this->lastSentFiles)) {
            $this->lastSentFiles = $flipped;
            $this->sendMessage($this->controller, 'files', ['files' => $files]);
        }

        $this->watchedFiles = [];
    }
protected function sendCurrentFiles()
    {
        if (!$this->isDebug()) {
            return;
        }

        $files = array_merge($this->watchedFiles, get_included_files());
        $flipped = array_flip($files);

        //speedy way checking if two arrays are different.
        if (!$this->lastSentFiles || array_diff_key($flipped, $this->lastSentFiles)) {
            $this->lastSentFiles = $flipped;
            $this->sendMessage($this->controller, 'files', ['files' => $files]);
        }

        $this->watchedFiles = [];
    }
protected function sendCurrentFiles ( ) { if ( ! $ this -> isDebug ( ) ) { return ; } $ files = array_merge ( $ this -> watchedFiles , get_included_files ( ) ) ; $ flipped = array_flip ( $ files ) ; //speedy way checking if two arrays are different. if ( ! $ this -> lastSentFiles || array_diff_key ( $ flipped , $ this -> lastSentFiles ) ) { $ this -> lastSentFiles = $ flipped ; $ this -> sendMessage ( $ this -> controller , 'files' , [ 'files' => $ files ] ) ; } $ this -> watchedFiles = [ ] ; }
Sends to the master a snapshot of current known php files, so it can track those files and restart
slaves if necessary.
Sends to the master a snapshot of current known php files so it can track those files and restart slaves if necessary .