11<?php
22
33/*
4- * This file is part of the Behat Gherkin.
5- * (c) Konstantin Kudryashov <ever.zet@gmail.com>
6- *
7- * For the full copyright and license information, please view the LICENSE
8- * file that was distributed with this source code.
9- */
4+ * This file is part of the Behat Gherkin Parser .
5+ * (c) Konstantin Kudryashov <ever.zet@gmail.com>
6+ *
7+ * For the full copyright and license information, please view the LICENSE
8+ * file that was distributed with this source code.
9+ */
1010
1111namespace Behat \Gherkin \Cache ;
1212
1313use Behat \Gherkin \Exception \CacheException ;
14- use Behat \Gherkin \Node \FeatureNode ;
1514use Behat \Gherkin \Gherkin ;
15+ use Behat \Gherkin \Node \FeatureNode ;
1616
1717/**
1818 * File cache.
@@ -27,13 +27,13 @@ class FileCache implements CacheInterface
2727 /**
2828 * Initializes file cache.
2929 *
30- * @param string $path Path to the folder where to store caches.
30+ * @param string $path path to the folder where to store caches
3131 *
3232 * @throws CacheException
3333 */
3434 public function __construct ($ path )
3535 {
36- $ this ->path = rtrim ($ path , DIRECTORY_SEPARATOR ). DIRECTORY_SEPARATOR . 'v ' . Gherkin::VERSION ;
36+ $ this ->path = rtrim ($ path , DIRECTORY_SEPARATOR ) . DIRECTORY_SEPARATOR . 'v ' . Gherkin::VERSION ;
3737
3838 if (!is_dir ($ this ->path )) {
3939 @mkdir ($ this ->path , 0777 , true );
@@ -47,8 +47,8 @@ public function __construct($path)
4747 /**
4848 * Checks that cache for feature exists and is fresh.
4949 *
50- * @param string $path Feature path
51- * @param integer $timestamp The last time feature was updated
50+ * @param string $path Feature path
51+ * @param int $timestamp The last time feature was updated
5252 *
5353 * @return bool
5454 */
@@ -78,7 +78,7 @@ public function read($path)
7878 $ feature = unserialize (file_get_contents ($ cachePath ));
7979
8080 if (!$ feature instanceof FeatureNode) {
81- throw new CacheException (sprintf ('Can not load cache for a feature "%s" from "%s". ' , $ path , $ cachePath ));
81+ throw new CacheException (sprintf ('Can not load cache for a feature "%s" from "%s". ' , $ path , $ cachePath ));
8282 }
8383
8484 return $ feature ;
@@ -87,7 +87,7 @@ public function read($path)
8787 /**
8888 * Caches feature node.
8989 *
90- * @param string $path Feature path
90+ * @param string $path Feature path
9191 * @param FeatureNode $feature Feature instance
9292 */
9393 public function write ($ path , FeatureNode $ feature )
@@ -104,6 +104,6 @@ public function write($path, FeatureNode $feature)
104104 */
105105 protected function getCachePathFor ($ path )
106106 {
107- return $ this ->path . '/ ' . md5 ($ path ). '.feature.cache ' ;
107+ return $ this ->path . '/ ' . md5 ($ path ) . '.feature.cache ' ;
108108 }
109109}
0 commit comments