@@ -73,7 +73,7 @@ discard block |
||
| 73 | 73 | |
| 74 | 74 | // register a Twig filter for generating URLs for vocabulary resources (concepts and groups) |
| 75 | 75 | $controller = $this; // for use by anonymous function below |
| 76 | - $urlFilter = new Twig_SimpleFilter('link_url', function ($uri, $vocab, $lang, $type = 'page', $clang = null, $term = null) use ($controller) { |
|
| 76 | + $urlFilter = new Twig_SimpleFilter('link_url', function($uri, $vocab, $lang, $type = 'page', $clang = null, $term = null) use ($controller) { |
|
| 77 | 77 | // $vocab can either be null, a vocabulary id (string) or a Vocabulary object |
| 78 | 78 | if ($vocab === null) { |
| 79 | 79 | // target vocabulary is unknown, best bet is to link to the plain URI |
@@ -114,7 +114,7 @@ discard block |
||
| 114 | 114 | $this->twig->addFilter($urlFilter); |
| 115 | 115 | |
| 116 | 116 | // register a Twig filter for generating strings from language codes with CLDR |
| 117 | - $langFilter = new Twig_SimpleFilter('lang_name', function ($langcode, $lang) use ($controller) { |
|
| 117 | + $langFilter = new Twig_SimpleFilter('lang_name', function($langcode, $lang) use ($controller) { |
|
| 118 | 118 | return Language::getName($langcode, $lang); |
| 119 | 119 | }); |
| 120 | 120 | $this->twig->addFilter($langFilter); |
@@ -611,7 +611,7 @@ discard block |
||
| 611 | 611 | * Loads and renders the view containing a list of recent changes in the vocabulary. |
| 612 | 612 | * @param Request $request |
| 613 | 613 | */ |
| 614 | - public function invokeChangeList($request, $prop='dc:created') |
|
| 614 | + public function invokeChangeList($request, $prop = 'dc:created') |
|
| 615 | 615 | { |
| 616 | 616 | // set language parameters for gettext |
| 617 | 617 | $this->setLanguageProperties($request->getLang()); |
@@ -1,9 +1,9 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * Copyright (c) 2012-2013 Aalto University and University of Helsinki |
|
| 4 | - * MIT License |
|
| 5 | - * see LICENSE.txt for more information |
|
| 6 | - */ |
|
| 3 | + * Copyright (c) 2012-2013 Aalto University and University of Helsinki |
|
| 4 | + * MIT License |
|
| 5 | + * see LICENSE.txt for more information |
|
| 6 | + */ |
|
| 7 | 7 | |
| 8 | 8 | /* Register text: namespace needed for jena-text queries */ |
| 9 | 9 | EasyRdf_Namespace::set('text', 'http://jena.apache.org/text#'); |
@@ -33,7 +33,7 @@ discard block |
||
| 33 | 33 | * @param string $property the property to query |
| 34 | 34 | * @param string $lang preferred language for the literal, |
| 35 | 35 | */ |
| 36 | - private function getLiteral($property, $lang=null) |
|
| 36 | + private function getLiteral($property, $lang = null) |
|
| 37 | 37 | { |
| 38 | 38 | if (!isset($lang)) {; |
| 39 | 39 | $lang = $this->getEnvLang(); |
@@ -909,9 +909,9 @@ discard block |
||
| 909 | 909 | { |
| 910 | 910 | $changelist = $this->getSparql()->queryChangeList($clang, $offset, $prop); |
| 911 | 911 | $bydate = array(); |
| 912 | - foreach($changelist as $concept) { |
|
| 912 | + foreach ($changelist as $concept) { |
|
| 913 | 913 | $concept['datestring'] = Punic\Calendar::formatDate($concept['date'], 'medium', $lang); |
| 914 | - $bydate[Punic\Calendar::getMonthName($concept['date'], 'wide', $lang, true) . Punic\Calendar::format($concept['date'], ' y', $lang) ][strtolower($concept['prefLabel'])] = $concept; |
|
| 914 | + $bydate[Punic\Calendar::getMonthName($concept['date'], 'wide', $lang, true) . Punic\Calendar::format($concept['date'], ' y', $lang)][strtolower($concept['prefLabel'])] = $concept; |
|
| 915 | 915 | } |
| 916 | 916 | return $bydate; |
| 917 | 917 | } |
@@ -461,7 +461,7 @@ |
||
| 461 | 461 | } |
| 462 | 462 | } catch (Exception $e) { |
| 463 | 463 | trigger_error($e->getMessage(), E_USER_WARNING); |
| 464 | - return gettext('skosmos:modified') . ' ' . (string) $this->resource->get('dc:modified') . ' ' . gettext('skosmos:created') . ' ' . (string) $this->resource->get('dc:created'); |
|
| 464 | + return gettext('skosmos:modified') . ' ' . (string)$this->resource->get('dc:modified') . ' ' . gettext('skosmos:created') . ' ' . (string)$this->resource->get('dc:created'); |
|
| 465 | 465 | } |
| 466 | 466 | return $ret; |
| 467 | 467 | } |
@@ -1,9 +1,9 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * Copyright (c) 2012-2013 Aalto University and University of Helsinki |
|
| 4 | - * MIT License |
|
| 5 | - * see LICENSE.txt for more information |
|
| 6 | - */ |
|
| 3 | + * Copyright (c) 2012-2013 Aalto University and University of Helsinki |
|
| 4 | + * MIT License |
|
| 5 | + * see LICENSE.txt for more information |
|
| 6 | + */ |
|
| 7 | 7 | |
| 8 | 8 | /* Register text: namespace needed for jena-text queries */ |
| 9 | 9 | EasyRdf_Namespace::set('text', 'http://jena.apache.org/text#'); |
@@ -1,9 +1,9 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * Copyright (c) 2012-2013 Aalto University and University of Helsinki |
|
| 4 | - * MIT License |
|
| 5 | - * see LICENSE.txt for more information |
|
| 6 | - */ |
|
| 3 | + * Copyright (c) 2012-2013 Aalto University and University of Helsinki |
|
| 4 | + * MIT License |
|
| 5 | + * see LICENSE.txt for more information |
|
| 6 | + */ |
|
| 7 | 7 | |
| 8 | 8 | /* Register text: namespace needed for jena-text queries */ |
| 9 | 9 | EasyRdf_Namespace::set('text', 'http://jena.apache.org/text#'); |
@@ -37,7 +37,7 @@ |
||
| 37 | 37 | * @return string SPARQL text search clause |
| 38 | 38 | */ |
| 39 | 39 | |
| 40 | - protected function createTextQueryCondition($term, $property='') |
|
| 40 | + protected function createTextQueryCondition($term, $property = '') |
|
| 41 | 41 | { |
| 42 | 42 | // construct the lucene search term for jena-text |
| 43 | 43 | |
@@ -44,7 +44,7 @@ |
||
| 44 | 44 | return Punic\Calendar::formatDate($val, 'short'); |
| 45 | 45 | } catch (Exception $e) { |
| 46 | 46 | trigger_error($e->getMessage(), E_USER_WARNING); |
| 47 | - return (string) $this->literal; |
|
| 47 | + return (string)$this->literal; |
|
| 48 | 48 | } |
| 49 | 49 | } |
| 50 | 50 | return $this->literal->getValue(); |
@@ -118,7 +118,7 @@ |
||
| 118 | 118 | */ |
| 119 | 119 | public function getEnvLang() |
| 120 | 120 | { |
| 121 | - // get language from locale, same as used by gettext, set by Controller |
|
| 122 | - return substr(getenv("LC_ALL"), 0, 2); |
|
| 121 | + // get language from locale, same as used by gettext, set by Controller |
|
| 122 | + return substr(getenv("LC_ALL"), 0, 2); |
|
| 123 | 123 | } |
| 124 | 124 | } |
@@ -1,9 +1,9 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * Copyright (c) 2012 Aalto University and University of Helsinki |
|
| 4 | - * MIT License |
|
| 5 | - * see LICENSE.txt for more information |
|
| 6 | - */ |
|
| 3 | + * Copyright (c) 2012 Aalto University and University of Helsinki |
|
| 4 | + * MIT License |
|
| 5 | + * see LICENSE.txt for more information |
|
| 6 | + */ |
|
| 7 | 7 | |
| 8 | 8 | /** |
| 9 | 9 | * Includes the side wide settings. |
@@ -1,9 +1,9 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * Copyright (c) 2012 Aalto University and University of Helsinki |
|
| 4 | - * MIT License |
|
| 5 | - * see LICENSE.txt for more information |
|
| 6 | - */ |
|
| 3 | + * Copyright (c) 2012 Aalto University and University of Helsinki |
|
| 4 | + * MIT License |
|
| 5 | + * see LICENSE.txt for more information |
|
| 6 | + */ |
|
| 7 | 7 | |
| 8 | 8 | /** |
| 9 | 9 | * Includes the side wide settings. |
@@ -1,9 +1,9 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * Copyright (c) 2012-2013 Aalto University and University of Helsinki |
|
| 4 | - * MIT License |
|
| 5 | - * see LICENSE.txt for more information |
|
| 6 | - */ |
|
| 3 | + * Copyright (c) 2012-2013 Aalto University and University of Helsinki |
|
| 4 | + * MIT License |
|
| 5 | + * see LICENSE.txt for more information |
|
| 6 | + */ |
|
| 7 | 7 | |
| 8 | 8 | /* Register text: namespace needed for jena-text queries */ |
| 9 | 9 | EasyRdf_Namespace::set('text', 'http://jena.apache.org/text#'); |