@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | public function index(PageController $parent_controller, Tree $tree, $block_id, $template) { |
| 45 | 45 | $view_bag = new ViewBag(); |
| 46 | 46 | |
| 47 | - if($parent_controller && $tree) { |
|
| 47 | + if ($parent_controller && $tree) { |
|
| 48 | 48 | |
| 49 | 49 | $view_bag->set('tree', $tree); |
| 50 | 50 | $view_bag->set('indi', $parent_controller->getSignificantIndividual()); |
@@ -63,22 +63,22 @@ discard block |
||
| 63 | 63 | '); |
| 64 | 64 | |
| 65 | 65 | if (Auth::isAdmin()) { |
| 66 | - $title='<a class="icon-admin" title="'.I18N::translate('Configure').'" href="block_edit.php?block_id='.$block_id.'&ged=' . $tree->getNameHtml() . '&ctype=gedcom"></a>'; |
|
| 66 | + $title = '<a class="icon-admin" title="'.I18N::translate('Configure').'" href="block_edit.php?block_id='.$block_id.'&ged='.$tree->getNameHtml().'&ctype=gedcom"></a>'; |
|
| 67 | 67 | } else { |
| 68 | - $title=''; |
|
| 68 | + $title = ''; |
|
| 69 | 69 | } |
| 70 | - $title .='<span dir="auto">'.$tree->getTitleHtml().'</span>'; |
|
| 70 | + $title .= '<span dir="auto">'.$tree->getTitleHtml().'</span>'; |
|
| 71 | 71 | |
| 72 | 72 | $piwik_enabled = $this->module->getBlockSetting($block_id, 'piwik_enabled', false); |
| 73 | 73 | $view_bag->set('piwik_enabled', $piwik_enabled); |
| 74 | - if($piwik_enabled) { |
|
| 74 | + if ($piwik_enabled) { |
|
| 75 | 75 | $parent_controller->addInlineJavascript( |
| 76 | 76 | '$("#piwik_stats") |
| 77 | 77 | .load("module.php?mod='.$this->module->getName().'&mod_action=Piwik&block_id='.$block_id.'");' |
| 78 | 78 | ); |
| 79 | 79 | } |
| 80 | 80 | |
| 81 | - $content = ViewFactory::make('WelcomeBlock', $this, new BaseController(), $view_bag)->getHtmlPartial(); |
|
| 81 | + $content = ViewFactory::make('WelcomeBlock', $this, new BaseController(), $view_bag)->getHtmlPartial(); |
|
| 82 | 82 | |
| 83 | 83 | if ($template) { |
| 84 | 84 | return Theme::theme()->formatBlock($id, $title, $class, $content); |
@@ -64,7 +64,7 @@ discard block |
||
| 64 | 64 | public function getConfigLink() { |
| 65 | 65 | Database::updateSchema(self::SCHEMA_MIGRATION_PREFIX, self::SCHEMA_SETTING_NAME, self::SCHEMA_TARGET_VERSION); |
| 66 | 66 | |
| 67 | - return 'module.php?mod=' . $this->getName() . '&mod_action=AdminConfig'; |
|
| 67 | + return 'module.php?mod='.$this->getName().'&mod_action=AdminConfig'; |
|
| 68 | 68 | } |
| 69 | 69 | |
| 70 | 70 | /** |
@@ -83,7 +83,7 @@ discard block |
||
| 83 | 83 | public function getProvider() { |
| 84 | 84 | global $WT_TREE; |
| 85 | 85 | |
| 86 | - if(!$this->provider) { |
|
| 86 | + if (!$this->provider) { |
|
| 87 | 87 | $this->provider = new GeoAnalysisProvider($WT_TREE); |
| 88 | 88 | } |
| 89 | 89 | return $this->provider; |
@@ -38,7 +38,7 @@ discard block |
||
| 38 | 38 | * |
| 39 | 39 | * @param \Fisharebest\Webtrees\Fact $fact_in The Fact to extend |
| 40 | 40 | */ |
| 41 | - public function __construct(\Fisharebest\Webtrees\Fact $fact_in){ |
|
| 41 | + public function __construct(\Fisharebest\Webtrees\Fact $fact_in) { |
|
| 42 | 42 | $this->fact = $fact_in; |
| 43 | 43 | } |
| 44 | 44 | |
@@ -54,22 +54,22 @@ discard block |
||
| 54 | 54 | * |
| 55 | 55 | * @return int Level of sources |
| 56 | 56 | */ |
| 57 | - public function isSourced(){ |
|
| 58 | - $isSourced=0; |
|
| 57 | + public function isSourced() { |
|
| 58 | + $isSourced = 0; |
|
| 59 | 59 | $date = $this->fact->getDate(false); |
| 60 | - if($date->isOK()) { |
|
| 61 | - $isSourced=-1; |
|
| 62 | - if($date->qual1=='' && $date->minimumJulianDay() == $date->maximumJulianDay()){ |
|
| 63 | - $isSourced=-2; |
|
| 60 | + if ($date->isOK()) { |
|
| 61 | + $isSourced = -1; |
|
| 62 | + if ($date->qual1 == '' && $date->minimumJulianDay() == $date->maximumJulianDay()) { |
|
| 63 | + $isSourced = -2; |
|
| 64 | 64 | $citations = $this->fact->getCitations(); |
| 65 | - foreach($citations as $citation){ |
|
| 66 | - $isSourced=max($isSourced, 1); |
|
| 67 | - if(preg_match('/3 _ACT (.*)/', $citation) ){ |
|
| 68 | - $isSourced=max($isSourced, 2); |
|
| 65 | + foreach ($citations as $citation) { |
|
| 66 | + $isSourced = max($isSourced, 1); |
|
| 67 | + if (preg_match('/3 _ACT (.*)/', $citation)) { |
|
| 68 | + $isSourced = max($isSourced, 2); |
|
| 69 | 69 | preg_match_all("/4 DATE (.*)/", $citation, $datessource, PREG_SET_ORDER); |
| 70 | - foreach($datessource as $daterec){ |
|
| 70 | + foreach ($datessource as $daterec) { |
|
| 71 | 71 | $datesource = new Date($daterec[1]); |
| 72 | - if(abs($datesource->julianDay() - $date->julianDay()) < self::DATE_PRECISION_MARGIN){ |
|
| 72 | + if (abs($datesource->julianDay() - $date->julianDay()) < self::DATE_PRECISION_MARGIN) { |
|
| 73 | 73 | $isSourced = max($isSourced, 3); //If this level increases, do not forget to change the constant MAX_IS_SOURCED_LEVEL |
| 74 | 74 | } |
| 75 | 75 | } |
@@ -50,10 +50,10 @@ discard block |
||
| 50 | 50 | public function handle(fw\Module\AbstractModule $module, $request) { |
| 51 | 51 | |
| 52 | 52 | $fq_modclass_name = get_class($module); |
| 53 | - $ctrl_namespace = substr($fq_modclass_name, 0, - strlen('Module')) . '\\'; |
|
| 53 | + $ctrl_namespace = substr($fq_modclass_name, 0, - strlen('Module')).'\\'; |
|
| 54 | 54 | |
| 55 | - $args = explode( '@', $request, 2); |
|
| 56 | - switch(count($args)) { |
|
| 55 | + $args = explode('@', $request, 2); |
|
| 56 | + switch (count($args)) { |
|
| 57 | 57 | case 1: |
| 58 | 58 | $ctrl_name = $args[0]; |
| 59 | 59 | $method = 'index'; |
@@ -65,11 +65,11 @@ discard block |
||
| 65 | 65 | break; |
| 66 | 66 | } |
| 67 | 67 | |
| 68 | - $ctrl_class = $ctrl_namespace . $ctrl_name . 'Controller'; |
|
| 69 | - if(class_exists($ctrl_class) |
|
| 68 | + $ctrl_class = $ctrl_namespace.$ctrl_name.'Controller'; |
|
| 69 | + if (class_exists($ctrl_class) |
|
| 70 | 70 | && is_subclass_of($ctrl_class, '\\MyArtJaub\\Webtrees\\Mvc\\Controller\\MvcController') |
| 71 | - && $ctrl = new $ctrl_class($module) ) { |
|
| 72 | - if(method_exists($ctrl, $method)) { |
|
| 71 | + && $ctrl = new $ctrl_class($module)) { |
|
| 72 | + if (method_exists($ctrl, $method)) { |
|
| 73 | 73 | call_user_func_array(array($ctrl, $method), array()); |
| 74 | 74 | } |
| 75 | 75 | else { |
@@ -53,13 +53,13 @@ |
||
| 53 | 53 | */ |
| 54 | 54 | public function makeView($view_name, MvcController $mvc_ctrl, BaseController $ctrl, ViewBag $data) |
| 55 | 55 | { |
| 56 | - if(!$mvc_ctrl) throw new \Exception('Mvc Controller not defined'); |
|
| 57 | - if(!$ctrl) throw new \Exception('Base Controller not defined'); |
|
| 58 | - if(!$view_name) throw new \Exception('View not defined'); |
|
| 56 | + if (!$mvc_ctrl) throw new \Exception('Mvc Controller not defined'); |
|
| 57 | + if (!$ctrl) throw new \Exception('Base Controller not defined'); |
|
| 58 | + if (!$view_name) throw new \Exception('View not defined'); |
|
| 59 | 59 | |
| 60 | 60 | $mvc_ctrl_refl = new \ReflectionObject($mvc_ctrl); |
| 61 | - $view_class = $mvc_ctrl_refl->getNamespaceName() . '\\Views\\' . $view_name . 'View'; |
|
| 62 | - if(!class_exists($view_class)) throw new \Exception('View does not exist'); |
|
| 61 | + $view_class = $mvc_ctrl_refl->getNamespaceName().'\\Views\\'.$view_name.'View'; |
|
| 62 | + if (!class_exists($view_class)) throw new \Exception('View does not exist'); |
|
| 63 | 63 | |
| 64 | 64 | return new $view_class($ctrl, $data); |
| 65 | 65 | } |
@@ -45,7 +45,7 @@ |
||
| 45 | 45 | public function render() { |
| 46 | 46 | global $controller; |
| 47 | 47 | |
| 48 | - if(!$this->ctrl) throw new \Exception('Controller not initialised'); |
|
| 48 | + if (!$this->ctrl) throw new \Exception('Controller not initialised'); |
|
| 49 | 49 | |
| 50 | 50 | $controller = $this->ctrl; |
| 51 | 51 | $this->ctrl->pageHeader(); |
@@ -73,8 +73,8 @@ discard block |
||
| 73 | 73 | * @param bool $override |
| 74 | 74 | */ |
| 75 | 75 | public function set($key, $value, $override = true) { |
| 76 | - if(is_null($key)) return; |
|
| 77 | - if(!$override && array_key_exists($key, $this->data)) return; |
|
| 76 | + if (is_null($key)) return; |
|
| 77 | + if (!$override && array_key_exists($key, $this->data)) return; |
|
| 78 | 78 | $this->data[$key] = $value; |
| 79 | 79 | } |
| 80 | 80 | |
@@ -107,7 +107,7 @@ discard block |
||
| 107 | 107 | * @param string $key |
| 108 | 108 | */ |
| 109 | 109 | public function __unset($key) { |
| 110 | - unset($this->data[$key]);; |
|
| 110 | + unset($this->data[$key]); ; |
|
| 111 | 111 | } |
| 112 | 112 | |
| 113 | 113 | } |
@@ -62,7 +62,7 @@ discard block |
||
| 62 | 62 | * |
| 63 | 63 | * @param Media|null $media Reference media object |
| 64 | 64 | */ |
| 65 | - public function __construct(Media $media = null){ |
|
| 65 | + public function __construct(Media $media = null) { |
|
| 66 | 66 | $this->media = $media; |
| 67 | 67 | $this->use_ttf = function_exists('imagettftext'); |
| 68 | 68 | $this->expire_offset = 3600 * 24; |
@@ -87,7 +87,7 @@ discard block |
||
| 87 | 87 | * @return ImageBuilder |
| 88 | 88 | */ |
| 89 | 89 | public function setExpireOffset($expireOffset) { |
| 90 | - if($expireOffset) $this->expire_offset = $expireOffset; |
|
| 90 | + if ($expireOffset) $this->expire_offset = $expireOffset; |
|
| 91 | 91 | return $this; |
| 92 | 92 | } |
| 93 | 93 | |
@@ -107,7 +107,7 @@ discard block |
||
| 107 | 107 | * @return ImageBuilder |
| 108 | 108 | */ |
| 109 | 109 | public function setShowWatermark($show_watermark) { |
| 110 | - if(!is_null($show_watermark)) $this->show_watermark = $show_watermark; |
|
| 110 | + if (!is_null($show_watermark)) $this->show_watermark = $show_watermark; |
|
| 111 | 111 | return $this; |
| 112 | 112 | } |
| 113 | 113 | |
@@ -118,7 +118,7 @@ discard block |
||
| 118 | 118 | * @return ImageBuilder |
| 119 | 119 | */ |
| 120 | 120 | public function setFontMaxSize($font_max_size) { |
| 121 | - if($font_max_size) $this->font_max_size = $font_max_size; |
|
| 121 | + if ($font_max_size) $this->font_max_size = $font_max_size; |
|
| 122 | 122 | return $this; |
| 123 | 123 | } |
| 124 | 124 | |
@@ -129,32 +129,32 @@ discard block |
||
| 129 | 129 | * @return ImageBuilder |
| 130 | 130 | */ |
| 131 | 131 | public function setFontColor($font_color) { |
| 132 | - if($font_color) $this->font_color = $font_color; |
|
| 132 | + if ($font_color) $this->font_color = $font_color; |
|
| 133 | 133 | return $this; |
| 134 | 134 | } |
| 135 | 135 | |
| 136 | 136 | /** |
| 137 | 137 | * Render the image to the output. |
| 138 | 138 | */ |
| 139 | - public function render(){ |
|
| 139 | + public function render() { |
|
| 140 | 140 | |
| 141 | 141 | if (!$this->media || !$this->media->canShow()) { |
| 142 | - Log::addMediaLog('Image Builder error: >' . I18N::translate('Missing or private media object.')); |
|
| 142 | + Log::addMediaLog('Image Builder error: >'.I18N::translate('Missing or private media object.')); |
|
| 143 | 143 | $this->renderError(); |
| 144 | 144 | } |
| 145 | 145 | |
| 146 | 146 | $serverFilename = $this->media->getServerFilename(); |
| 147 | 147 | |
| 148 | 148 | if (!file_exists($serverFilename)) { |
| 149 | - Log::addMediaLog('Image Builder error: >'. I18N::translate('The media object does not exist.').'< for path >'.$serverFilename.'<'); |
|
| 149 | + Log::addMediaLog('Image Builder error: >'.I18N::translate('The media object does not exist.').'< for path >'.$serverFilename.'<'); |
|
| 150 | 150 | $this->renderError(); |
| 151 | 151 | } |
| 152 | 152 | |
| 153 | 153 | $mimetype = $this->media->mimeType(); |
| 154 | 154 | $imgsize = $this->media->getImageAttributes(); |
| 155 | 155 | $filetime = $this->media->getFiletime(); |
| 156 | - $filetimeHeader = gmdate('D, d M Y H:i:s', $filetime) . ' GMT'; |
|
| 157 | - $expireHeader = gmdate('D, d M Y H:i:s', WT_TIMESTAMP + $this->getExpireOffset()) . ' GMT'; |
|
| 156 | + $filetimeHeader = gmdate('D, d M Y H:i:s', $filetime).' GMT'; |
|
| 157 | + $expireHeader = gmdate('D, d M Y H:i:s', WT_TIMESTAMP + $this->getExpireOffset()).' GMT'; |
|
| 158 | 158 | |
| 159 | 159 | $type = Functions::isImageTypeSupported($imgsize['ext']); |
| 160 | 160 | $usewatermark = false; |
@@ -186,10 +186,10 @@ discard block |
||
| 186 | 186 | } |
| 187 | 187 | |
| 188 | 188 | // add caching headers. allow browser to cache file, but not proxy |
| 189 | - header('Last-Modified: ' . $filetimeHeader); |
|
| 190 | - header('ETag: "' . $etag . '"'); |
|
| 191 | - header('Expires: ' . $expireHeader); |
|
| 192 | - header('Cache-Control: max-age=' . $this->getExpireOffset() . ', s-maxage=0, proxy-revalidate'); |
|
| 189 | + header('Last-Modified: '.$filetimeHeader); |
|
| 190 | + header('ETag: "'.$etag.'"'); |
|
| 191 | + header('Expires: '.$expireHeader); |
|
| 192 | + header('Cache-Control: max-age='.$this->getExpireOffset().', s-maxage=0, proxy-revalidate'); |
|
| 193 | 193 | |
| 194 | 194 | // if this file is already in the user’s cache, don’t resend it |
| 195 | 195 | // first check if the if_modified_since param matches |
@@ -203,13 +203,13 @@ discard block |
||
| 203 | 203 | } |
| 204 | 204 | |
| 205 | 205 | // send headers for the image |
| 206 | - header('Content-Type: ' . $mimetype); |
|
| 207 | - header('Content-Disposition: filename="' . addslashes(basename($this->media->getFilename())) . '"'); |
|
| 206 | + header('Content-Type: '.$mimetype); |
|
| 207 | + header('Content-Disposition: filename="'.addslashes(basename($this->media->getFilename())).'"'); |
|
| 208 | 208 | |
| 209 | 209 | if ($usewatermark) { |
| 210 | 210 | // generate the watermarked image |
| 211 | - $imCreateFunc = 'imagecreatefrom' . $type; |
|
| 212 | - $imSendFunc = 'image' . $type; |
|
| 211 | + $imCreateFunc = 'imagecreatefrom'.$type; |
|
| 212 | + $imSendFunc = 'image'.$type; |
|
| 213 | 213 | |
| 214 | 214 | if (function_exists($imCreateFunc) && function_exists($imSendFunc)) { |
| 215 | 215 | $im = $imCreateFunc($serverFilename); |
@@ -222,7 +222,7 @@ discard block |
||
| 222 | 222 | return; |
| 223 | 223 | } else { |
| 224 | 224 | // this image is defective. log it |
| 225 | - Log::addMediaLog('Image Builder error: >' . I18N::translate('This media file is broken and cannot be watermarked.') . '< in file >' . $serverFilename . '< memory used: ' . memory_get_usage()); |
|
| 225 | + Log::addMediaLog('Image Builder error: >'.I18N::translate('This media file is broken and cannot be watermarked.').'< in file >'.$serverFilename.'< memory used: '.memory_get_usage()); |
|
| 226 | 226 | } |
| 227 | 227 | } |
| 228 | 228 | |
@@ -230,7 +230,7 @@ discard block |
||
| 230 | 230 | $filesize = filesize($serverFilename); |
| 231 | 231 | |
| 232 | 232 | // set content-length header, send file |
| 233 | - header('Content-Length: ' . $filesize); |
|
| 233 | + header('Content-Length: '.$filesize); |
|
| 234 | 234 | |
| 235 | 235 | // Some servers disable fpassthru() and readfile() |
| 236 | 236 | if (function_exists('readfile')) { |
@@ -260,7 +260,7 @@ discard block |
||
| 260 | 260 | $bgc = imagecolorallocate($im, 255, 255, 255); /* set background color */ |
| 261 | 261 | imagefilledrectangle($im, 2, 2, $width - 4, $height - 4, $bgc); /* create a rectangle, leaving 2 px border */ |
| 262 | 262 | |
| 263 | - $this->embedText($im, $error, 100, '255, 0, 0', WT_ROOT . Config::FONT_DEJAVU_SANS_TTF, 'top', 'left'); |
|
| 263 | + $this->embedText($im, $error, 100, '255, 0, 0', WT_ROOT.Config::FONT_DEJAVU_SANS_TTF, 'top', 'left'); |
|
| 264 | 264 | |
| 265 | 265 | http_response_code(404); |
| 266 | 266 | header('Content-Type: image/png'); |
@@ -278,7 +278,7 @@ discard block |
||
| 278 | 278 | protected function applyWatermark($im) { |
| 279 | 279 | |
| 280 | 280 | // text to watermark with |
| 281 | - if(method_exists($this->media, 'getWatermarkText')) { |
|
| 281 | + if (method_exists($this->media, 'getWatermarkText')) { |
|
| 282 | 282 | $word1_text = $this->media->getWatermarkText(); |
| 283 | 283 | } |
| 284 | 284 | else { |
@@ -290,7 +290,7 @@ discard block |
||
| 290 | 290 | $word1_text, |
| 291 | 291 | $this->font_max_size, |
| 292 | 292 | $this->font_color, |
| 293 | - WT_ROOT . Config::FONT_DEJAVU_SANS_TTF, |
|
| 293 | + WT_ROOT.Config::FONT_DEJAVU_SANS_TTF, |
|
| 294 | 294 | 'top', |
| 295 | 295 | 'left' |
| 296 | 296 | ); |
@@ -409,7 +409,7 @@ discard block |
||
| 409 | 409 | * @param string $hexstr |
| 410 | 410 | * @return int[] |
| 411 | 411 | */ |
| 412 | - protected function hexrgb ($hexstr) |
|
| 412 | + protected function hexrgb($hexstr) |
|
| 413 | 413 | { |
| 414 | 414 | $int = hexdec($hexstr); |
| 415 | 415 | |
@@ -451,7 +451,7 @@ discard block |
||
| 451 | 451 | */ |
| 452 | 452 | function imageTtfTextErrorHandler($errno, $errstr) { |
| 453 | 453 | // log the error |
| 454 | - Log::addErrorLog('Image Builder error: >' . $errno . '/' . $errstr . '< while processing file >' . $this->media->getServerFilename() . '<'); |
|
| 454 | + Log::addErrorLog('Image Builder error: >'.$errno.'/'.$errstr.'< while processing file >'.$this->media->getServerFilename().'<'); |
|
| 455 | 455 | |
| 456 | 456 | // change value of useTTF to false so the fallback watermarking can be used. |
| 457 | 457 | $this->use_ttf = false; |
@@ -14,13 +14,13 @@ discard block |
||
| 14 | 14 | /** |
| 15 | 15 | * Cache component to speed up some potential data retrievals |
| 16 | 16 | */ |
| 17 | -class Cache{ |
|
| 17 | +class Cache { |
|
| 18 | 18 | |
| 19 | 19 | /** |
| 20 | 20 | * Underlying Zend Cache object |
| 21 | 21 | * @var \Zend_Cache_Core|\Zend_Cache_FrontEnd $cache |
| 22 | 22 | */ |
| 23 | - protected $cache=null; |
|
| 23 | + protected $cache = null; |
|
| 24 | 24 | |
| 25 | 25 | /** |
| 26 | 26 | * Defines whether the cache has been initialised |
@@ -54,7 +54,7 @@ discard block |
||
| 54 | 54 | */ |
| 55 | 55 | protected function init() { |
| 56 | 56 | // The translation libraries only work with a cache. |
| 57 | - $cache_options=array('automatic_serialization'=>true); |
|
| 57 | + $cache_options = array('automatic_serialization'=>true); |
|
| 58 | 58 | |
| 59 | 59 | if (ini_get('apc.enabled')) { |
| 60 | 60 | $this->cache = \Zend_Cache::factory('Core', 'Apc', $cache_options, array()); |
@@ -79,8 +79,8 @@ discard block |
||
| 79 | 79 | * Initiliase the Cache if not done. |
| 80 | 80 | * |
| 81 | 81 | */ |
| 82 | - protected function checkInit(){ |
|
| 83 | - if(!$this->is_init) $this->init(); |
|
| 82 | + protected function checkInit() { |
|
| 83 | + if (!$this->is_init) $this->init(); |
|
| 84 | 84 | } |
| 85 | 85 | |
| 86 | 86 | /** |
@@ -90,10 +90,10 @@ discard block |
||
| 90 | 90 | * @param AbstractModule $mod Calling module |
| 91 | 91 | * @return string Cached key name |
| 92 | 92 | */ |
| 93 | - protected function getKeyName($value, AbstractModule $mod = null){ |
|
| 93 | + protected function getKeyName($value, AbstractModule $mod = null) { |
|
| 94 | 94 | $this->checkInit(); |
| 95 | 95 | $mod_name = 'myartjaub'; |
| 96 | - if($mod !== null) $mod_name = $mod->getName(); |
|
| 96 | + if ($mod !== null) $mod_name = $mod->getName(); |
|
| 97 | 97 | return $mod_name.'_'.$value; |
| 98 | 98 | } |
| 99 | 99 | |
@@ -127,7 +127,7 @@ discard block |
||
| 127 | 127 | * @param AbstractModule $mod Calling module |
| 128 | 128 | * @return unknown_type Cached value |
| 129 | 129 | */ |
| 130 | - public function getI($value, AbstractModule $mod = null){ |
|
| 130 | + public function getI($value, AbstractModule $mod = null) { |
|
| 131 | 131 | $this->checkInit(); |
| 132 | 132 | return $this->cache->load($this->getKeyName($value, $mod)); |
| 133 | 133 | } |
@@ -139,7 +139,7 @@ discard block |
||
| 139 | 139 | * @param AbstractModule $mod Calling module |
| 140 | 140 | * @return unknown_type Cached value |
| 141 | 141 | */ |
| 142 | - public static function get($value, AbstractModule $mod = null){ |
|
| 142 | + public static function get($value, AbstractModule $mod = null) { |
|
| 143 | 143 | self::getInstance()->getI($value, $mod); |
| 144 | 144 | } |
| 145 | 145 | |
@@ -151,7 +151,7 @@ discard block |
||
| 151 | 151 | * @param AbstractModule $mod Calling module |
| 152 | 152 | * @return unknown_type Cached value |
| 153 | 153 | */ |
| 154 | - public function saveI($value, $data, AbstractModule $mod = null){ |
|
| 154 | + public function saveI($value, $data, AbstractModule $mod = null) { |
|
| 155 | 155 | $this->checkInit(); |
| 156 | 156 | $this->cache->save($data, $this->getKeyName($value, $mod)); |
| 157 | 157 | return $this->get($value, $mod); |
@@ -165,7 +165,7 @@ discard block |
||
| 165 | 165 | * @param AbstractModule $mod Calling module |
| 166 | 166 | * @return unknown_type Cached value |
| 167 | 167 | */ |
| 168 | - public static function save($value, $data, AbstractModule $mod = null){ |
|
| 168 | + public static function save($value, $data, AbstractModule $mod = null) { |
|
| 169 | 169 | self::getInstance()->saveI($value, $data, $mod); |
| 170 | 170 | } |
| 171 | 171 | |
@@ -173,7 +173,7 @@ discard block |
||
| 173 | 173 | * Clean the cache |
| 174 | 174 | * |
| 175 | 175 | */ |
| 176 | - public function cleanI(){ |
|
| 176 | + public function cleanI() { |
|
| 177 | 177 | $this->checkInit(); |
| 178 | 178 | $this->cache->clean(); |
| 179 | 179 | } |