getVersion() 공개 정적인 메소드

public static getVersion ( )
예제 #1
0
파일: Runner.php 프로젝트: thekabal/tki
 /**
  * @param ConfigInterface $config
  * @param bool            $isDryRun
  *
  * @return CacheManagerInterface
  */
 private function createCacheManager(ConfigInterface $config, $isDryRun)
 {
     if ($config->usingCache() && (ToolInfo::isInstalledAsPhar() || ToolInfo::isInstalledByComposer())) {
         return new FileCacheManager(new FileHandler($config->getCacheFile()), new Signature(PHP_VERSION, ToolInfo::getVersion(), $config->usingLinter(), $config->getRules()), $isDryRun);
     }
     return new NullCacheManager();
 }
 private function saveToFile()
 {
     if (!$this->isCacheAvailable()) {
         return;
     }
     $data = serialize(array('version' => ToolInfo::getVersion(), 'rules' => $this->rules, '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);
     }
 }
예제 #3
0
 /**
  * @return CacheManagerInterface
  */
 public function getCacheManager()
 {
     if (null === $this->cacheManager) {
         if ($this->getUsingCache() && (ToolInfo::isInstalledAsPhar() || ToolInfo::isInstalledByComposer())) {
             $this->cacheManager = new FileCacheManager(new FileHandler($this->getCacheFile()), new Signature(PHP_VERSION, ToolInfo::getVersion(), $this->getRules()), $this->isDryRun());
         } else {
             $this->cacheManager = new NullCacheManager();
         }
     }
     return $this->cacheManager;
 }
예제 #4
0
 public function testGetVersion()
 {
     $this->assertInternalType('string', ToolInfo::getVersion());
 }