private function saveToFile() { if (!$this->isCacheAvailable()) { return; } $data = serialize(array('version' => ToolInfo::getVersion(), 'checkers' => $this->checkers, 'messages' => $this->messages)); if (false === @file_put_contents($this->cacheFile, $data, LOCK_EX)) { throw new IOException(sprintf('Failed to write file "%s".', $this->cacheFile), 0, null, $this->cacheFile); } }
private function saveToFile() { if (!$this->isEnabled) { return; } $data = serialize(array('version' => ToolInfo::getVersion(), 'fixers' => $this->fixers, 'header' => $this->header, 'hashes' => $this->newHashes)); if (false === @file_put_contents($this->cacheFile, $data, LOCK_EX)) { throw new IOException(sprintf('Failed to write file "%s".', $this->cacheFile), 0, null, $this->cacheFile); } }
public function testGetVersion() { $this->assertInternalType('string', ToolInfo::getVersion()); }