@@ -15,7 +15,7 @@ |
||
| 15 | 15 | /** |
| 16 | 16 | * Returns a list of filters. |
| 17 | 17 | * |
| 18 | - * @return array |
|
| 18 | + * @return Twig_SimpleFilter[] |
|
| 19 | 19 | */ |
| 20 | 20 | public function getFilters() |
| 21 | 21 | { |
@@ -20,7 +20,7 @@ discard block |
||
| 20 | 20 | public function getFilters () |
| 21 | 21 | { |
| 22 | 22 | return array( |
| 23 | - new Twig_SimpleFilter('summary', 'twig_summary_filter'), |
|
| 23 | + new Twig_SimpleFilter('summary', 'twig_summary_filter'), |
|
| 24 | 24 | new Twig_SimpleFilter('truncate', 'twig_truncate_filter', array('needs_environment' => true)), |
| 25 | 25 | new Twig_SimpleFilter('wordwrap', 'twig_wordwrap_filter', array('needs_environment' => true)), |
| 26 | 26 | ); |
@@ -73,7 +73,7 @@ discard block |
||
| 73 | 73 | $length = $breakpoint; |
| 74 | 74 | } |
| 75 | 75 | |
| 76 | - return rtrim(mb_substr($value, 0, $length, $env->getCharset())).$separator; |
|
| 76 | + return rtrim(mb_substr($value, 0, $length, $env->getCharset())) . $separator; |
|
| 77 | 77 | } |
| 78 | 78 | |
| 79 | 79 | return $value; |
@@ -62,7 +62,7 @@ |
||
| 62 | 62 | * @throws FileNotFoundException When originFile doesn't exist |
| 63 | 63 | * @throws IOException When copy fails |
| 64 | 64 | */ |
| 65 | - public function copy($originFile, $targetFile, $overwriteNewerFiles = false) |
|
| 65 | + public function copy ($originFile, $targetFile, $overwriteNewerFiles = false) |
|
| 66 | 66 | { |
| 67 | 67 | if ($this->isDir($originFile)) |
| 68 | 68 | { |
@@ -56,6 +56,9 @@ |
||
| 56 | 56 | $this->staticPageViews = array(); |
| 57 | 57 | } |
| 58 | 58 | |
| 59 | + /** |
|
| 60 | + * @param \allejo\stakx\Object\Configuration $configuration |
|
| 61 | + */ |
|
| 59 | 62 | public function configureTwig ($configuration, $options) |
| 60 | 63 | { |
| 61 | 64 | $twig = new TwigManager(); |
@@ -58,7 +58,7 @@ discard block |
||
| 58 | 58 | /** |
| 59 | 59 | * PageManager constructor |
| 60 | 60 | */ |
| 61 | - public function __construct() |
|
| 61 | + public function __construct () |
|
| 62 | 62 | { |
| 63 | 63 | parent::__construct(); |
| 64 | 64 | |
@@ -228,7 +228,7 @@ discard block |
||
| 228 | 228 | /** |
| 229 | 229 | * {@inheritdoc} |
| 230 | 230 | */ |
| 231 | - public function isTracked($filePath) |
|
| 231 | + public function isTracked ($filePath) |
|
| 232 | 232 | { |
| 233 | 233 | return (parent::isTracked($filePath) || isset($this->twigExtendsDeps[$filePath])); |
| 234 | 234 | } |
@@ -236,7 +236,7 @@ discard block |
||
| 236 | 236 | /** |
| 237 | 237 | * {@inheritdoc} |
| 238 | 238 | */ |
| 239 | - public function refreshItem($filePath) |
|
| 239 | + public function refreshItem ($filePath) |
|
| 240 | 240 | { |
| 241 | 241 | if (parent::isTracked($filePath)) |
| 242 | 242 | { |
@@ -256,7 +256,7 @@ discard block |
||
| 256 | 256 | /** |
| 257 | 257 | * {@inheritdoc} |
| 258 | 258 | */ |
| 259 | - protected function handleTrackableItem($filePath, $options = array()) |
|
| 259 | + protected function handleTrackableItem ($filePath, $options = array()) |
|
| 260 | 260 | { |
| 261 | 261 | $pageView = PageView::create($filePath); |
| 262 | 262 | $namespace = $pageView->getType(); |
@@ -534,7 +534,7 @@ discard block |
||
| 534 | 534 | { |
| 535 | 535 | $filePath = $this->fs->getRelativePath($parent->getSourceContext()->getPath()); |
| 536 | 536 | |
| 537 | - $this->twigExtendsDeps[$filePath][(string)$pageView->getFilePath()] = &$pageView; |
|
| 537 | + $this->twigExtendsDeps[$filePath][(string) $pageView->getFilePath()] = &$pageView; |
|
| 538 | 538 | $parent = $parent->getParent(array()); |
| 539 | 539 | } |
| 540 | 540 | } |
@@ -17,7 +17,7 @@ |
||
| 17 | 17 | */ |
| 18 | 18 | private static $twig; |
| 19 | 19 | |
| 20 | - public static function &getInstance () |
|
| 20 | + public static function &getInstance() |
|
| 21 | 21 | { |
| 22 | 22 | return self::$twig; |
| 23 | 23 | } |
@@ -32,7 +32,7 @@ |
||
| 32 | 32 | /** |
| 33 | 33 | * Get all of the DataItems and DataSets in this manager |
| 34 | 34 | * |
| 35 | - * @return array |
|
| 35 | + * @return string |
|
| 36 | 36 | */ |
| 37 | 37 | public function getDataItems () |
| 38 | 38 | { |
@@ -128,10 +128,10 @@ discard block |
||
| 128 | 128 | $this->pm->configureTwig($this->getConfiguration(), array( |
| 129 | 129 | 'safe' => $this->safeMode, |
| 130 | 130 | 'globals' => array( |
| 131 | - array('name' => 'site', 'value' => $this->getConfiguration()->getConfiguration()), |
|
| 131 | + array('name' => 'site', 'value' => $this->getConfiguration()->getConfiguration()), |
|
| 132 | 132 | array('name' => 'collections', 'value' => $this->cm->getCollections()), |
| 133 | - array('name' => 'menu', 'value' => $this->pm->getSiteMenu()), |
|
| 134 | - array('name' => 'data', 'value' => $this->dm->getDataItems()) |
|
| 133 | + array('name' => 'menu', 'value' => $this->pm->getSiteMenu()), |
|
| 134 | + array('name' => 'data', 'value' => $this->dm->getDataItems()) |
|
| 135 | 135 | ) |
| 136 | 136 | )); |
| 137 | 137 | |
@@ -312,7 +312,7 @@ discard block |
||
| 312 | 312 | /** |
| 313 | 313 | * @return boolean |
| 314 | 314 | */ |
| 315 | - public function isNoClean() |
|
| 315 | + public function isNoClean () |
|
| 316 | 316 | { |
| 317 | 317 | return $this->noClean; |
| 318 | 318 | } |
@@ -320,7 +320,7 @@ discard block |
||
| 320 | 320 | /** |
| 321 | 321 | * @param boolean $noClean |
| 322 | 322 | */ |
| 323 | - public function setNoClean($noClean) |
|
| 323 | + public function setNoClean ($noClean) |
|
| 324 | 324 | { |
| 325 | 325 | $this->noClean = $noClean; |
| 326 | 326 | } |
@@ -305,11 +305,17 @@ |
||
| 305 | 305 | $this->noClean = $noClean; |
| 306 | 306 | } |
| 307 | 307 | |
| 308 | + /** |
|
| 309 | + * @param string $filePath |
|
| 310 | + */ |
|
| 308 | 311 | private function creationWatcher ($filePath) |
| 309 | 312 | { |
| 310 | 313 | $this->output->writeln(sprintf("File creation detected: %s", $filePath)); |
| 311 | 314 | } |
| 312 | 315 | |
| 316 | + /** |
|
| 317 | + * @param string $filePath |
|
| 318 | + */ |
|
| 313 | 319 | private function modificationWatcher ($filePath) |
| 314 | 320 | { |
| 315 | 321 | $this->output->writeln(sprintf("File change detected: %s", $filePath)); |
@@ -28,7 +28,7 @@ |
||
| 28 | 28 | /** |
| 29 | 29 | * {@inheritdoc} |
| 30 | 30 | */ |
| 31 | - public function setLogger(LoggerInterface $logger) |
|
| 31 | + public function setLogger (LoggerInterface $logger) |
|
| 32 | 32 | { |
| 33 | 33 | $this->output = $logger; |
| 34 | 34 | } |
@@ -140,7 +140,7 @@ |
||
| 140 | 140 | * |
| 141 | 141 | * @return string |
| 142 | 142 | */ |
| 143 | - private function interpolate($message, array $context) |
|
| 143 | + private function interpolate ($message, array $context) |
|
| 144 | 144 | { |
| 145 | 145 | // build a replacement array with braces around the context keys |
| 146 | 146 | $replace = array(); |
@@ -34,7 +34,7 @@ discard block |
||
| 34 | 34 | /** |
| 35 | 35 | * Configuration constructor. |
| 36 | 36 | */ |
| 37 | - public function __construct() |
|
| 37 | + public function __construct () |
|
| 38 | 38 | { |
| 39 | 39 | $this->configuration = array(); |
| 40 | 40 | $this->fs = new Filesystem(); |
@@ -64,7 +64,7 @@ discard block |
||
| 64 | 64 | /** |
| 65 | 65 | * {@inheritdoc} |
| 66 | 66 | */ |
| 67 | - public function setLogger(LoggerInterface $logger) |
|
| 67 | + public function setLogger (LoggerInterface $logger) |
|
| 68 | 68 | { |
| 69 | 69 | $this->output = $logger; |
| 70 | 70 | } |