PHPPM\ProcessSlave::sendCurrentFiles PHP Method

sendCurrentFiles() protected method

Sends to the master a snapshot of current known php files, so it can track those files and restart slaves if necessary.
protected sendCurrentFiles ( )
    protected function sendCurrentFiles()
    {
        $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 = [];
    }