src/ProcessManager.php
protected function commandFiles(array $data, ConnectionInterface $conn)
    {
        try {
            $slave = $this->slaves->getByConnection($conn);

            $start = microtime(true);

            clearstatcache();

            $newFilesCount = 0;
            $knownFiles = array_keys($this->filesLastMTime);
            $recentlyIncludedFiles = array_diff($data['files'], $knownFiles);
            foreach ($recentlyIncludedFiles as $filePath) {
                if (file_exists($filePath)) {
                    $this->filesLastMTime[$filePath] = filemtime($filePath);
                    $this->filesLastMd5[$filePath] = md5_file($filePath, true);
                    $newFilesCount++;
                }
            }

            if ($this->output->isVeryVerbose()) {
                $this->output->writeln(
                    sprintf(
                        'Received %d new files from %d. Stats collection cycle: %u files, %.3f ms',
                        $newFilesCount,
                        $slave->getPort(),
                        count($this->filesLastMTime),
                        (microtime(true) - $start) * 1000
                    )
                );
            }
        } catch (\Exception $e) {
            // silent
        }
    }
protected function commandFiles(array $data, ConnectionInterface $conn)
    {
        try {
            $slave = $this->slaves->getByConnection($conn);

            $start = microtime(true);

            clearstatcache();

            $newFilesCount = 0;
            $knownFiles = array_keys($this->filesLastMTime);
            $recentlyIncludedFiles = array_diff($data['files'], $knownFiles);
            foreach ($recentlyIncludedFiles as $filePath) {
                if (file_exists($filePath)) {
                    $this->filesLastMTime[$filePath] = filemtime($filePath);
                    $this->filesLastMd5[$filePath] = md5_file($filePath, true);
                    $newFilesCount++;
                }
            }

            if ($this->output->isVeryVerbose()) {
                $this->output->writeln(
                    sprintf(
                        'Received %d new files from %d. Stats collection cycle: %u files, %.3f ms',
                        $newFilesCount,
                        $slave->getPort(),
                        count($this->filesLastMTime),
                        (microtime(true) - $start) * 1000
                    )
                );
            }
        } catch (\Exception $e) {
            // silent
        }
    }
protected function commandFiles ( array $ data , ConnectionInterface $ conn ) { try { $ slave = $ this -> slaves -> getByConnection ( $ conn ) ; $ start = microtime ( true ) ; clearstatcache ( ) ; $ newFilesCount = 0 ; $ knownFiles = array_keys ( $ this -> filesLastMTime ) ; $ recentlyIncludedFiles = array_diff ( $ data [ 'files' ] , $ knownFiles ) ; foreach ( $ recentlyIncludedFiles as $ filePath ) { if ( file_exists ( $ filePath ) ) { $ this -> filesLastMTime [ $ filePath ] = filemtime ( $ filePath ) ; $ this -> filesLastMd5 [ $ filePath ] = md5_file ( $ filePath , true ) ; $ newFilesCount ++ ; } } if ( $ this -> output -> isVeryVerbose ( ) ) { $ this -> output -> writeln ( sprintf ( 'Received %d new files from %d. Stats collection cycle: %u files, %.3f ms' , $ newFilesCount , $ slave -> getPort ( ) , count ( $ this -> filesLastMTime ) , ( microtime ( true ) - $ start ) * 1000 ) ) ; } } catch ( \ Exception $ e ) { // silent } }
Register client files for change tracking

@param array      $data
@param ConnectionInterface $conn
Register client files for change tracking