@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | /** |
20 | 20 | * @var array |
21 | 21 | */ |
22 | - protected $_types = array('jpg', 'jpeg', 'gif', 'png', 'bmp', 'ico', 'flv', 'swf', 'txt', 'css', 'js', 'eot', 'woff', 'woff2','ttf', 'svg'); |
|
22 | + protected $_types = array('jpg', 'jpeg', 'gif', 'png', 'bmp', 'ico', 'flv', 'swf', 'txt', 'css', 'js', 'eot', 'woff', 'woff2', 'ttf', 'svg'); |
|
23 | 23 | /** |
24 | 24 | * @var string |
25 | 25 | */ |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | { |
59 | 59 | $input; |
60 | 60 | $output->writeln('<comment>Start dumping cache.manifest...</comment>'); |
61 | - $this->webDirectory = $this->getContainer()->get('kernel')->getRootdir() . '/../web'; |
|
61 | + $this->webDirectory = $this->getContainer()->get('kernel')->getRootdir().'/../web'; |
|
62 | 62 | $this->filesystem = new Filesystem(); |
63 | 63 | $this->finder = new Finder(); |
64 | 64 | $this->setHtml5Cache($this->getPaths()); |
@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | protected function dump() |
105 | 105 | { |
106 | 106 | $this->filesystem->dumpFile( |
107 | - $this->webDirectory . '/cache.manifest', |
|
107 | + $this->webDirectory.'/cache.manifest', |
|
108 | 108 | $this->render() |
109 | 109 | ); |
110 | 110 | } |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | $this->container->setParameter('jquery', array('version' => $version)); |
44 | 44 | $jqueryUrls = $this->getUrls('getJqueryUrls'); |
45 | 45 | $this->assertCount(1, $jqueryUrls); |
46 | - $this->assertEquals($jqueryUrls[0], 'https://ajax.googleapis.com/ajax/libs/jquery/' . $version . '/jquery.min.js'); |
|
46 | + $this->assertEquals($jqueryUrls[0], 'https://ajax.googleapis.com/ajax/libs/jquery/'.$version.'/jquery.min.js'); |
|
47 | 47 | } |
48 | 48 | |
49 | 49 | /** |
@@ -55,9 +55,9 @@ discard block |
||
55 | 55 | $this->container->setParameter('twitter_bootstrap', array('version' => $version)); |
56 | 56 | $twitterBootstrapUrls = $this->getUrls('getTwitterBootstrapUrls'); |
57 | 57 | $this->assertCount(3, $twitterBootstrapUrls); |
58 | - $this->assertEquals($twitterBootstrapUrls[0], 'https://maxcdn.bootstrapcdn.com/bootstrap/' . $version . '/css/bootstrap.min.css'); |
|
59 | - $this->assertEquals($twitterBootstrapUrls[1], 'https://maxcdn.bootstrapcdn.com/bootstrap/' . $version . '/css/bootstrap-theme.min.css'); |
|
60 | - $this->assertEquals($twitterBootstrapUrls[2], 'https://maxcdn.bootstrapcdn.com/bootstrap/' . $version . '/js/bootstrap.min.js'); |
|
58 | + $this->assertEquals($twitterBootstrapUrls[0], 'https://maxcdn.bootstrapcdn.com/bootstrap/'.$version.'/css/bootstrap.min.css'); |
|
59 | + $this->assertEquals($twitterBootstrapUrls[1], 'https://maxcdn.bootstrapcdn.com/bootstrap/'.$version.'/css/bootstrap-theme.min.css'); |
|
60 | + $this->assertEquals($twitterBootstrapUrls[2], 'https://maxcdn.bootstrapcdn.com/bootstrap/'.$version.'/js/bootstrap.min.js'); |
|
61 | 61 | } |
62 | 62 | |
63 | 63 | /** |
@@ -69,8 +69,8 @@ discard block |
||
69 | 69 | $this->container->setParameter('materialize', array('version' => $version)); |
70 | 70 | $materializeUrls = $this->getUrls('getMaterializeUrls'); |
71 | 71 | $this->assertCount(2, $materializeUrls); |
72 | - $this->assertEquals($materializeUrls[0], 'https://cdnjs.cloudflare.com/ajax/libs/materialize/' . $version . '/css/materialize.min.css'); |
|
73 | - $this->assertEquals($materializeUrls[1], 'https://cdnjs.cloudflare.com/ajax/libs/materialize/' . $version . '/js/materialize.min.js'); |
|
72 | + $this->assertEquals($materializeUrls[0], 'https://cdnjs.cloudflare.com/ajax/libs/materialize/'.$version.'/css/materialize.min.css'); |
|
73 | + $this->assertEquals($materializeUrls[1], 'https://cdnjs.cloudflare.com/ajax/libs/materialize/'.$version.'/js/materialize.min.js'); |
|
74 | 74 | } |
75 | 75 | |
76 | 76 | /** |
@@ -62,13 +62,13 @@ discard block |
||
62 | 62 | $this->command = new DumpCommand(); |
63 | 63 | $this->reflectionClass = new \ReflectionClass('\Evheniy\HTML5CacheBundle\Command\DumpCommand'); |
64 | 64 | $this->container = new Container(); |
65 | - $this->container->set('twig', new TwigEngine(new \Twig_Environment(new \Twig_Loader_Array(array('HTML5CacheBundle::cache.html.twig' => file_get_contents(dirname(__FILE__) . '/../../Resources/views/cache.html.twig')))), new TemplateNameParser())); |
|
65 | + $this->container->set('twig', new TwigEngine(new \Twig_Environment(new \Twig_Loader_Array(array('HTML5CacheBundle::cache.html.twig' => file_get_contents(dirname(__FILE__).'/../../Resources/views/cache.html.twig')))), new TemplateNameParser())); |
|
66 | 66 | |
67 | - $this->webPath = dirname(__FILE__) . '/web'; |
|
67 | + $this->webPath = dirname(__FILE__).'/web'; |
|
68 | 68 | $this->filesystem = new Filesystem(); |
69 | 69 | $this->filesystem->mkdir($this->webPath); |
70 | - $this->filesystem->touch($this->webPath . '/test.png'); |
|
71 | - $this->filesystem->touch($this->webPath . '/test.gif'); |
|
70 | + $this->filesystem->touch($this->webPath.'/test.png'); |
|
71 | + $this->filesystem->touch($this->webPath.'/test.gif'); |
|
72 | 72 | |
73 | 73 | $this->setMockFields(); |
74 | 74 | } |
@@ -287,8 +287,8 @@ discard block |
||
287 | 287 | */ |
288 | 288 | private function parseFile() |
289 | 289 | { |
290 | - $this->assertTrue($this->filesystem->exists(array($this->webPath . '/cache.manifest'))); |
|
291 | - $data = file_get_contents($this->webPath . '/cache.manifest'); |
|
290 | + $this->assertTrue($this->filesystem->exists(array($this->webPath.'/cache.manifest'))); |
|
291 | + $data = file_get_contents($this->webPath.'/cache.manifest'); |
|
292 | 292 | $this->assertRegExp('/CACHE MANIFEST/', $data); |
293 | 293 | $this->assertRegExp('/CACHE:/', $data); |
294 | 294 | $this->assertRegExp('/NETWORK:/', $data); |
@@ -40,8 +40,8 @@ |
||
40 | 40 | */ |
41 | 41 | protected function loadConfiguration(ContainerBuilder $container, $resource) |
42 | 42 | { |
43 | - $loader = new YamlFileLoader($container, new FileLocator(__DIR__ . '/Fixtures/')); |
|
44 | - $loader->load($resource . '.yml'); |
|
43 | + $loader = new YamlFileLoader($container, new FileLocator(__DIR__.'/Fixtures/')); |
|
44 | + $loader->load($resource.'.yml'); |
|
45 | 45 | } |
46 | 46 | |
47 | 47 | /** |
@@ -27,7 +27,7 @@ |
||
27 | 27 | $config = $processor->processConfiguration($configuration, $configs); |
28 | 28 | $config['cdn'] = CdnHelper::createInstance()->filterCdn($config['cdn']); |
29 | 29 | $container->setParameter('html5_cache', $config); |
30 | - $loader = new YamlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config')); |
|
30 | + $loader = new YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); |
|
31 | 31 | $loader->load('services.yml'); |
32 | 32 | } |
33 | 33 |