@@ -8,12 +8,12 @@ |
||
8 | 8 | */ |
9 | 9 | namespace PPI\ServiceManager\Config; |
10 | 10 | |
11 | -use Zend\ServiceManager\Config, |
|
12 | - Zend\ServiceManager\ServiceManager, |
|
13 | - Symfony\Component\Routing\RequestContext, |
|
14 | - Symfony\Component\Routing\RouteCollection, |
|
15 | - PPI\Module\Routing\Router, |
|
16 | - PPI\Module\Routing\RoutingHelper; |
|
11 | +use Zend\ServiceManager\Config; |
|
12 | +use Zend\ServiceManager\ServiceManager; |
|
13 | +use Symfony\Component\Routing\RequestContext; |
|
14 | +use Symfony\Component\Routing\RouteCollection; |
|
15 | +use PPI\Module\Routing\Router; |
|
16 | +use PPI\Module\Routing\RoutingHelper; |
|
17 | 17 | |
18 | 18 | /** |
19 | 19 | * ServiceManager configuration for the Router component. |
@@ -69,7 +69,6 @@ |
||
69 | 69 | * |
70 | 70 | * This method is an alias to $this->get(). |
71 | 71 | * |
72 | - * @param string $cName |
|
73 | 72 | * @param boolean $usePeeringServiceManagers |
74 | 73 | * |
75 | 74 | * @return object|array |
@@ -8,8 +8,8 @@ |
||
8 | 8 | */ |
9 | 9 | namespace PPI\ServiceManager; |
10 | 10 | |
11 | -use PPI\ServiceManager\Options\OptionsInterface, |
|
12 | - Zend\ServiceManager\ServiceManager as BaseServiceManager; |
|
11 | +use PPI\ServiceManager\Options\OptionsInterface; |
|
12 | +use Zend\ServiceManager\ServiceManager as BaseServiceManager; |
|
13 | 13 | |
14 | 14 | /** |
15 | 15 | * ServiceManager implements the Service Locator design pattern. |
@@ -70,7 +70,7 @@ |
||
70 | 70 | $parameters = parent::matchRequest($request); |
71 | 71 | $this->matchedRouteRequest = $request; |
72 | 72 | return $parameters; |
73 | - } catch(\Exception $e) { |
|
73 | + } catch (\Exception $e) { |
|
74 | 74 | throw $e; |
75 | 75 | } |
76 | 76 | } |
@@ -8,8 +8,8 @@ |
||
8 | 8 | */ |
9 | 9 | namespace PPI\Templating\Helper; |
10 | 10 | |
11 | -use Symfony\Component\Templating\Helper\Helper, |
|
12 | - Symfony\Component\Routing\Generator\UrlGeneratorInterface; |
|
11 | +use Symfony\Component\Templating\Helper\Helper; |
|
12 | +use Symfony\Component\Routing\Generator\UrlGeneratorInterface; |
|
13 | 13 | |
14 | 14 | /** |
15 | 15 | * RouterHelper manages links between pages in a template context. |
@@ -8,8 +8,8 @@ |
||
8 | 8 | */ |
9 | 9 | namespace PPI\Templating\Helper; |
10 | 10 | |
11 | -use Symfony\Component\Templating\Helper\Helper, |
|
12 | - Symfony\Component\HttpFoundation\Session\SessionInterface; |
|
11 | +use Symfony\Component\Templating\Helper\Helper; |
|
12 | +use Symfony\Component\HttpFoundation\Session\SessionInterface; |
|
13 | 13 | |
14 | 14 | /** |
15 | 15 | * SessionHelper provides read-only access to the session attributes. |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | /** |
29 | 29 | * Constructor. |
30 | 30 | * |
31 | - * @param Mustache_Engine $mustache A \Mustache_Engine instance |
|
31 | + * @param \Mustache_Engine $mustache A \Mustache_Engine instance |
|
32 | 32 | * @param TemplateNameParserInterface $parser A TemplateNameParserInterface instance |
33 | 33 | */ |
34 | 34 | public function __construct(\Mustache_Engine $mustache, TemplateNameParserInterface $parser) |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | /** |
41 | 41 | * Renders a template. |
42 | 42 | * |
43 | - * @param mixed $name A template name |
|
43 | + * @param string $name A template name |
|
44 | 44 | * @param array $parameters An array of parameters to pass to the template |
45 | 45 | * |
46 | 46 | * @return string The evaluated template as a string |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | * |
36 | 36 | * @param FileLocatorInterface $locator A FileLocatorInterface instance |
37 | 37 | * |
38 | - * @return void |
|
38 | + * @return LoaderInterface |
|
39 | 39 | */ |
40 | 40 | public function __construct(FileLocatorInterface $locator) |
41 | 41 | { |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | * @param TemplateReferenceInterface $template The template name as an array |
68 | 68 | * @param integer $time The last modification time of the cached template (timestamp) |
69 | 69 | * |
70 | - * @return integer|boolean |
|
70 | + * @return boolean |
|
71 | 71 | */ |
72 | 72 | public function isFresh(TemplateReferenceInterface $template, $time) |
73 | 73 | { |
@@ -8,10 +8,10 @@ |
||
8 | 8 | */ |
9 | 9 | namespace PPI\Templating\Php; |
10 | 10 | |
11 | -use Symfony\Component\Templating\Storage\FileStorage, |
|
12 | - Symfony\Component\Templating\Loader\LoaderInterface, |
|
13 | - Symfony\Component\Config\FileLocatorInterface, |
|
14 | - Symfony\Component\Templating\TemplateReferenceInterface; |
|
11 | +use Symfony\Component\Templating\Storage\FileStorage; |
|
12 | +use Symfony\Component\Templating\Loader\LoaderInterface; |
|
13 | +use Symfony\Component\Config\FileLocatorInterface; |
|
14 | +use Symfony\Component\Templating\TemplateReferenceInterface; |
|
15 | 15 | |
16 | 16 | /** |
17 | 17 | * FilesystemLoader is a loader that read templates from the filesystem. |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | * |
44 | 44 | * @param AssetsHelper $assetsHelper |
45 | 45 | * |
46 | - * @return void |
|
46 | + * @return \NoiseLabs\Bundle\SmartyBundle\Extension\ExtensionInterface |
|
47 | 47 | */ |
48 | 48 | public function __construct(AssetsHelper $assetsHelper) |
49 | 49 | { |
@@ -130,7 +130,7 @@ discard block |
||
130 | 130 | * @param array $parameters |
131 | 131 | * @param \Smarty_Internal_Template $template |
132 | 132 | * |
133 | - * @return integer |
|
133 | + * @return string |
|
134 | 134 | */ |
135 | 135 | public function getAssetsVersion(array $parameters = array(), \Smarty_Internal_Template $template) |
136 | 136 | { |
@@ -8,8 +8,8 @@ |
||
8 | 8 | */ |
9 | 9 | namespace PPI\Templating\Smarty\Extension; |
10 | 10 | |
11 | -use NoiseLabs\Bundle\SmartyBundle\Extension\AssetsExtension as BaseAssetsExtension, |
|
12 | - Symfony\Component\Templating\Helper\AssetsHelper; |
|
11 | +use NoiseLabs\Bundle\SmartyBundle\Extension\AssetsExtension as BaseAssetsExtension; |
|
12 | +use Symfony\Component\Templating\Helper\AssetsHelper; |
|
13 | 13 | |
14 | 14 | /** |
15 | 15 | * Provides helper functions to link to assets (images, Javascript, |
@@ -64,7 +64,7 @@ |
||
64 | 64 | * @return mixed |
65 | 65 | */ |
66 | 66 | public function __call($method, array $params = array()) { |
67 | - if(isset($this->funRemap[$method])) { |
|
67 | + if (isset($this->funRemap[$method])) { |
|
68 | 68 | return call_user_func_array(array($this, $this->funRemap[$method]), $params); |
69 | 69 | } |
70 | 70 | throw new \BadMethodCallException('Method ' . $method . ' does not exist'); |
@@ -1,11 +1,11 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * This file is part of the PPI Framework. |
|
4 | - * |
|
5 | - * @copyright Copyright (c) 2012 Paul Dragoonis <[email protected]> |
|
6 | - * @license http://opensource.org/licenses/mit-license.php MIT |
|
7 | - * @link http://www.ppi.io |
|
8 | - */ |
|
3 | + * This file is part of the PPI Framework. |
|
4 | + * |
|
5 | + * @copyright Copyright (c) 2012 Paul Dragoonis <[email protected]> |
|
6 | + * @license http://opensource.org/licenses/mit-license.php MIT |
|
7 | + * @link http://www.ppi.io |
|
8 | + */ |
|
9 | 9 | namespace PPI\Exception; |
10 | 10 | |
11 | 11 | /** |
@@ -8,11 +8,11 @@ |
||
8 | 8 | */ |
9 | 9 | namespace PPI\Templating\Smarty; |
10 | 10 | |
11 | -use PPI\Templating\GlobalVariables, |
|
12 | - PPI\Templating\TemplateLocator, |
|
13 | - NoiseLabs\Bundle\SmartyBundle\SmartyEngine as BaseSmartyEngine, |
|
14 | - Symfony\Component\Templating\Loader\LoaderInterface, |
|
15 | - Symfony\Component\Templating\TemplateNameParserInterface; |
|
11 | +use PPI\Templating\GlobalVariables; |
|
12 | +use PPI\Templating\TemplateLocator; |
|
13 | +use NoiseLabs\Bundle\SmartyBundle\SmartyEngine as BaseSmartyEngine; |
|
14 | +use Symfony\Component\Templating\Loader\LoaderInterface; |
|
15 | +use Symfony\Component\Templating\TemplateNameParserInterface; |
|
16 | 16 | |
17 | 17 | /** |
18 | 18 | * SmartyEngine is an engine able to render Smarty templates. |
@@ -98,7 +98,7 @@ |
||
98 | 98 | * of your custom error handler, please call muteExpectedErrors() after |
99 | 99 | * you've registered your custom error handler. |
100 | 100 | * |
101 | - * muteExpectedErrors() registers a custom error handler using |
|
101 | + * muteExpectedErrors() registers a custom error handler using |
|
102 | 102 | * set_error_handler(). The error handler merely inspects $errno and |
103 | 103 | * $errfile to determine if the given error was produced deliberately |
104 | 104 | * and must be ignored, or should be passed on to the next error handler. |
@@ -8,9 +8,9 @@ |
||
8 | 8 | */ |
9 | 9 | namespace PPI\Templating; |
10 | 10 | |
11 | -use PPI\Templating\TemplateReference, |
|
12 | - Symfony\Component\Config\FileLocatorInterface, |
|
13 | - Symfony\Component\Templating\TemplateReferenceInterface; |
|
11 | +use PPI\Templating\TemplateReference; |
|
12 | +use Symfony\Component\Config\FileLocatorInterface; |
|
13 | +use Symfony\Component\Templating\TemplateReferenceInterface; |
|
14 | 14 | |
15 | 15 | /** |
16 | 16 | * The PPI Template Locator. |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | */ |
47 | 47 | public function __construct(FileLocatorInterface $locator, $cacheDir = null) |
48 | 48 | { |
49 | - if (null !== $cacheDir && is_file($cache = $cacheDir.'/templates.php')) { |
|
49 | + if (null !== $cacheDir && is_file($cache = $cacheDir . '/templates.php')) { |
|
50 | 50 | $this->cache = require $cache; |
51 | 51 | } |
52 | 52 | |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | */ |
104 | 104 | public function getAppPath() |
105 | 105 | { |
106 | - return $this->locator->appPath.DIRECTORY_SEPARATOR.TemplateReference::APP_VIEWS_DIRECTORY; |
|
106 | + return $this->locator->appPath . DIRECTORY_SEPARATOR . TemplateReference::APP_VIEWS_DIRECTORY; |
|
107 | 107 | } |
108 | 108 | |
109 | 109 | /** |
@@ -116,7 +116,7 @@ discard block |
||
116 | 116 | $paths = $this->locator->getModulesPath(); |
117 | 117 | |
118 | 118 | foreach (array_keys($paths) as $module) { |
119 | - $paths[$module] .= DIRECTORY_SEPARATOR.TemplateReference::MODULE_VIEWS_DIRECTORY; |
|
119 | + $paths[$module] .= DIRECTORY_SEPARATOR . TemplateReference::MODULE_VIEWS_DIRECTORY; |
|
120 | 120 | } |
121 | 121 | |
122 | 122 | return $paths; |