Completed
Push — master ( a26fec...153c83 )
by Jonathan
15:10
created
src/Webtrees/Module/WelcomeBlock/WelcomeBlockController.php 2 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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.'&amp;ged=' . $tree->getNameHtml() . '&amp;ctype=gedcom"></a>';
66
+                $title = '<a class="icon-admin" title="'.I18N::translate('Configure').'" href="block_edit.php?block_id='.$block_id.'&amp;ged='.$tree->getNameHtml().'&amp;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);
Please login to merge, or discard this patch.
Indentation   +65 added lines, -65 removed lines patch added patch discarded remove patch
@@ -28,30 +28,30 @@  discard block
 block discarded – undo
28 28
 class WelcomeBlockController extends MvcController
29 29
 {   
30 30
     
31
-    /**
32
-     * Pages
33
-     */
31
+	/**
32
+	 * Pages
33
+	 */
34 34
         
35
-    /**
36
-     * WelcomeBlock@index
37
-     * 
38
-     * @param PageController $parent_controller
39
-     * @param Tree $tree
40
-     * @param string $block_id
41
-     * @param string $template
42
-     * @return $string
43
-     */
44
-    public function index(PageController $parent_controller, Tree $tree, $block_id, $template) {        
45
-        $view_bag = new ViewBag();
35
+	/**
36
+	 * WelcomeBlock@index
37
+	 * 
38
+	 * @param PageController $parent_controller
39
+	 * @param Tree $tree
40
+	 * @param string $block_id
41
+	 * @param string $template
42
+	 * @return $string
43
+	 */
44
+	public function index(PageController $parent_controller, Tree $tree, $block_id, $template) {        
45
+		$view_bag = new ViewBag();
46 46
         
47
-        if($parent_controller && $tree) {
47
+		if($parent_controller && $tree) {
48 48
         
49
-            $view_bag->set('tree', $tree);
50
-            $view_bag->set('indi', $parent_controller->getSignificantIndividual());
49
+			$view_bag->set('tree', $tree);
50
+			$view_bag->set('indi', $parent_controller->getSignificantIndividual());
51 51
         
52
-            $id = $this->module->getName().$block_id;
53
-            $class = $this->module->getName().'_block';
54
-            $parent_controller->addInlineJavascript('
52
+			$id = $this->module->getName().$block_id;
53
+			$class = $this->module->getName().'_block';
54
+			$parent_controller->addInlineJavascript('
55 55
                 jQuery("#maj-new_passwd").hide();
56 56
                 jQuery("#maj-passwd_click").click(function()
57 57
                 {
@@ -62,62 +62,62 @@  discard block
 block discarded – undo
62 62
     				  });
63 63
     			');
64 64
     
65
-            if (Auth::isAdmin()) {
66
-                $title='<a class="icon-admin" title="'.I18N::translate('Configure').'" href="block_edit.php?block_id='.$block_id.'&amp;ged=' . $tree->getNameHtml() . '&amp;ctype=gedcom"></a>';
67
-            } else {
68
-                $title='';
69
-            }
70
-            $title .='<span dir="auto">'.$tree->getTitleHtml().'</span>';
65
+			if (Auth::isAdmin()) {
66
+				$title='<a class="icon-admin" title="'.I18N::translate('Configure').'" href="block_edit.php?block_id='.$block_id.'&amp;ged=' . $tree->getNameHtml() . '&amp;ctype=gedcom"></a>';
67
+			} else {
68
+				$title='';
69
+			}
70
+			$title .='<span dir="auto">'.$tree->getTitleHtml().'</span>';
71 71
     
72
-            $piwik_enabled = $this->module->getBlockSetting($block_id, 'piwik_enabled', false);
73
-            $view_bag->set('piwik_enabled', $piwik_enabled);
74
-            if($piwik_enabled) {
75
-                $parent_controller->addInlineJavascript(
76
-                    '$("#piwik_stats")
72
+			$piwik_enabled = $this->module->getBlockSetting($block_id, 'piwik_enabled', false);
73
+			$view_bag->set('piwik_enabled', $piwik_enabled);
74
+			if($piwik_enabled) {
75
+				$parent_controller->addInlineJavascript(
76
+					'$("#piwik_stats")
77 77
                         .load("module.php?mod='.$this->module->getName().'&mod_action=Piwik&block_id='.$block_id.'");'
78
-                );
79
-            }
78
+				);
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
-            if ($template) {
84
-                return Theme::theme()->formatBlock($id, $title, $class, $content);
85
-            } else {
86
-                return $content;
87
-            }
88
-        }
89
-    }
83
+			if ($template) {
84
+				return Theme::theme()->formatBlock($id, $title, $class, $content);
85
+			} else {
86
+				return $content;
87
+			}
88
+		}
89
+	}
90 90
     
91 91
     
92 92
     
93
-    /**
94
-     * WelcomeBlock@config
95
-     * 
96
-     * @param string $block_id
97
-     */
98
-    public function config($block_id) {
93
+	/**
94
+	 * WelcomeBlock@config
95
+	 * 
96
+	 * @param string $block_id
97
+	 */
98
+	public function config($block_id) {
99 99
 
100
-        if (Filter::postBool('save') && Filter::checkCsrf()) {
101
-            $this->module->setBlockSetting($block_id, 'piwik_enabled', Filter::postBool('piwik_enabled'));
102
-            $this->module->setBlockSetting($block_id, 'piwik_url', trim(Filter::postUrl('piwik_url')));
103
-            $this->module->setBlockSetting($block_id, 'piwik_siteid', trim(Filter::post('piwik_siteid')));
104
-            $this->module->setBlockSetting($block_id, 'piwik_token', trim(Filter::post('piwik_token')));            
105
-            throw new MvcException(200); // Use this instead of exit
106
-        }
100
+		if (Filter::postBool('save') && Filter::checkCsrf()) {
101
+			$this->module->setBlockSetting($block_id, 'piwik_enabled', Filter::postBool('piwik_enabled'));
102
+			$this->module->setBlockSetting($block_id, 'piwik_url', trim(Filter::postUrl('piwik_url')));
103
+			$this->module->setBlockSetting($block_id, 'piwik_siteid', trim(Filter::post('piwik_siteid')));
104
+			$this->module->setBlockSetting($block_id, 'piwik_token', trim(Filter::post('piwik_token')));            
105
+			throw new MvcException(200); // Use this instead of exit
106
+		}
107 107
         
108
-        $view_bag = new ViewBag();
108
+		$view_bag = new ViewBag();
109 109
         
110
-        // Is Piwik Statistic Enabled ?
111
-        $view_bag->set('piwik_enabled', $this->module->getBlockSetting($block_id, 'piwik_enabled', '0'));
112
-        //Piwik Root Url
113
-        $view_bag->set('piwik_url', $this->module->getBlockSetting($block_id, 'piwik_url', ''));
114
-        // Piwik token
115
-        $view_bag->set('piwik_token', $this->module->getBlockSetting($block_id, 'piwik_token', ''));
116
-        // Piwik side id
117
-        $view_bag->set('piwik_siteid', $this->module->getBlockSetting($block_id, 'piwik_siteid', ''));
110
+		// Is Piwik Statistic Enabled ?
111
+		$view_bag->set('piwik_enabled', $this->module->getBlockSetting($block_id, 'piwik_enabled', '0'));
112
+		//Piwik Root Url
113
+		$view_bag->set('piwik_url', $this->module->getBlockSetting($block_id, 'piwik_url', ''));
114
+		// Piwik token
115
+		$view_bag->set('piwik_token', $this->module->getBlockSetting($block_id, 'piwik_token', ''));
116
+		// Piwik side id
117
+		$view_bag->set('piwik_siteid', $this->module->getBlockSetting($block_id, 'piwik_siteid', ''));
118 118
         
119
-        ViewFactory::make('WelcomeBlockConfig', $this, new BaseController(), $view_bag)->renderPartial();
120
-    }
119
+		ViewFactory::make('WelcomeBlockConfig', $this, new BaseController(), $view_bag)->renderPartial();
120
+	}
121 121
     
122 122
     
123 123
     
Please login to merge, or discard this patch.
src/Webtrees/Module/GeoDispersionModule.php 3 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
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() . '&amp;mod_action=AdminConfig';
67
+        return 'module.php?mod='.$this->getName().'&amp;mod_action=AdminConfig';
68 68
     }
69 69
     
70 70
     /**
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
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;
Please login to merge, or discard this patch.
Indentation   +59 added lines, -59 removed lines patch added patch discarded remove patch
@@ -24,88 +24,88 @@
 block discarded – undo
24 24
 class GeoDispersionModule extends AbstractModule implements ModuleConfigInterface, DependentInterface {
25 25
     
26 26
 	// How to update the database schema for this module
27
-    const SCHEMA_TARGET_VERSION   = 1;
28
-    const SCHEMA_SETTING_NAME     = 'MAJ_GEODISP_SCHEMA_VERSION';
29
-    const SCHEMA_MIGRATION_PREFIX = '\MyArtJaub\Webtrees\Module\GeoDispersion\Schema';
27
+	const SCHEMA_TARGET_VERSION   = 1;
28
+	const SCHEMA_SETTING_NAME     = 'MAJ_GEODISP_SCHEMA_VERSION';
29
+	const SCHEMA_MIGRATION_PREFIX = '\MyArtJaub\Webtrees\Module\GeoDispersion\Schema';
30 30
     
31
-    /** @var string For custom modules - link for support, upgrades, etc. */
32
-    const CUSTOM_WEBSITE = 'https://github.com/jon48/webtrees-lib';
31
+	/** @var string For custom modules - link for support, upgrades, etc. */
32
+	const CUSTOM_WEBSITE = 'https://github.com/jon48/webtrees-lib';
33 33
         
34
-    /**
35
-     * GeoDispersion analysis provider
36
-     * @var \MyArtJaub\Webtrees\Module\GeoDispersion\Model\GeoAnalysisProvider $provider
37
-     */
38
-    protected $provider;
34
+	/**
35
+	 * GeoDispersion analysis provider
36
+	 * @var \MyArtJaub\Webtrees\Module\GeoDispersion\Model\GeoAnalysisProvider $provider
37
+	 */
38
+	protected $provider;
39 39
     
40
-    /**
41
-     * {@inhericDoc}
42
-     */
43
-    public function getTitle() {
44
-        return /* I18N: Name of the “Hooks” module */ I18N::translate('Geographical Dispersion');
45
-    }
40
+	/**
41
+	 * {@inhericDoc}
42
+	 */
43
+	public function getTitle() {
44
+		return /* I18N: Name of the “Hooks” module */ I18N::translate('Geographical Dispersion');
45
+	}
46 46
     
47
-    /**
48
-     * {@inhericDoc}
49
-     */
50
-    public function getDescription() {
51
-        return /* I18N: Description of the “Hooks” module */ I18N::translate('Display the geographical dispersion of the root person’s Sosa ancestors.');
52
-    }
47
+	/**
48
+	 * {@inhericDoc}
49
+	 */
50
+	public function getDescription() {
51
+		return /* I18N: Description of the “Hooks” module */ I18N::translate('Display the geographical dispersion of the root person’s Sosa ancestors.');
52
+	}
53 53
     
54
-    /**
55
-     * {@inhericDoc}
56
-     */
57
-    public function modAction($mod_action) {
58
-        Database::updateSchema(self::SCHEMA_MIGRATION_PREFIX, self::SCHEMA_SETTING_NAME, self::SCHEMA_TARGET_VERSION);
54
+	/**
55
+	 * {@inhericDoc}
56
+	 */
57
+	public function modAction($mod_action) {
58
+		Database::updateSchema(self::SCHEMA_MIGRATION_PREFIX, self::SCHEMA_SETTING_NAME, self::SCHEMA_TARGET_VERSION);
59 59
         
60
-        \MyArtJaub\Webtrees\Mvc\Dispatcher::getInstance()->handle($this, $mod_action);
61
-    }
60
+		\MyArtJaub\Webtrees\Mvc\Dispatcher::getInstance()->handle($this, $mod_action);
61
+	}
62 62
     
63
-    /**
64
-     * {@inhericDoc}
65
-     * @see \Fisharebest\Webtrees\Module\ModuleConfigInterface::getConfigLink()
66
-     */
67
-    public function getConfigLink() {
68
-        Database::updateSchema(self::SCHEMA_MIGRATION_PREFIX, self::SCHEMA_SETTING_NAME, self::SCHEMA_TARGET_VERSION);
63
+	/**
64
+	 * {@inhericDoc}
65
+	 * @see \Fisharebest\Webtrees\Module\ModuleConfigInterface::getConfigLink()
66
+	 */
67
+	public function getConfigLink() {
68
+		Database::updateSchema(self::SCHEMA_MIGRATION_PREFIX, self::SCHEMA_SETTING_NAME, self::SCHEMA_TARGET_VERSION);
69 69
         
70
-        return 'module.php?mod=' . $this->getName() . '&amp;mod_action=AdminConfig';
71
-    }
70
+		return 'module.php?mod=' . $this->getName() . '&amp;mod_action=AdminConfig';
71
+	}
72 72
     
73
-    /**
74
-     * {@inhericDoc}
75
-     * @see \MyArtJaub\Webtrees\Module\DependentInterface::validatePrerequisites()
76
-     */
77
-    public function validatePrerequisites() {
78
-        try {
79
-            Database::updateSchema(self::SCHEMA_MIGRATION_PREFIX, self::SCHEMA_SETTING_NAME, self::SCHEMA_TARGET_VERSION);
73
+	/**
74
+	 * {@inhericDoc}
75
+	 * @see \MyArtJaub\Webtrees\Module\DependentInterface::validatePrerequisites()
76
+	 */
77
+	public function validatePrerequisites() {
78
+		try {
79
+			Database::updateSchema(self::SCHEMA_MIGRATION_PREFIX, self::SCHEMA_SETTING_NAME, self::SCHEMA_TARGET_VERSION);
80 80
             
81
-            return !is_null(Module::getModuleByName(Constants::MODULE_MAJ_SOSA_NAME));
82
-        }
83
-        catch (\Exception $ex) {  }
84
-        return false;
85
-    }
81
+			return !is_null(Module::getModuleByName(Constants::MODULE_MAJ_SOSA_NAME));
82
+		}
83
+		catch (\Exception $ex) {  }
84
+		return false;
85
+	}
86 86
     
87 87
 	/**
88 88
 	 * Get the GeoAnalysis Provider (initialise it if not done yet).
89 89
 	 *
90 90
 	 * @return \MyArtJaub\Webtrees\Module\GeoDispersion\Model\GeoAnalysisProvider
91 91
 	 */
92
-    public function getProvider() {
93
-        global $WT_TREE;
92
+	public function getProvider() {
93
+		global $WT_TREE;
94 94
         
95
-        if(!$this->provider) {
96
-            $this->provider = new GeoAnalysisProvider($WT_TREE);
97
-        }
98
-        return $this->provider;
99
-    }
95
+		if(!$this->provider) {
96
+			$this->provider = new GeoAnalysisProvider($WT_TREE);
97
+		}
98
+		return $this->provider;
99
+	}
100 100
 	
101 101
 	/**
102 102
 	 * Set the GeoAnalysis Provider.
103 103
 	 *
104 104
 	 * @return \MyArtJaub\Webtrees\Module\GeoDispersion\Model\GeoAnalysisProvider
105 105
 	 */
106
-    public function setProvider(GeoAnalysisProvider $provider) {
107
-        $this->provider = $provider;
108
-    }
106
+	public function setProvider(GeoAnalysisProvider $provider) {
107
+		$this->provider = $provider;
108
+	}
109 109
     
110 110
 
111 111
 }
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -79,8 +79,7 @@
 block discarded – undo
79 79
             Database::updateSchema(self::SCHEMA_MIGRATION_PREFIX, self::SCHEMA_SETTING_NAME, self::SCHEMA_TARGET_VERSION);
80 80
             
81 81
             return !is_null(Module::getModuleByName(Constants::MODULE_MAJ_SOSA_NAME));
82
-        }
83
-        catch (\Exception $ex) {  }
82
+        } catch (\Exception $ex) {  }
84 83
         return false;
85 84
     }
86 85
     
Please login to merge, or discard this patch.
src/Webtrees/Fact.php 2 patches
Indentation   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -34,26 +34,26 @@
 block discarded – undo
34 34
 	protected $fact; 
35 35
 	
36 36
 	/**
37
-	* Contructor for the decorator
38
-	*
39
-	* @param \Fisharebest\Webtrees\Fact $fact_in The Fact to extend
40
-	*/
37
+	 * Contructor for the decorator
38
+	 *
39
+	 * @param \Fisharebest\Webtrees\Fact $fact_in The Fact to extend
40
+	 */
41 41
 	public function __construct(\Fisharebest\Webtrees\Fact $fact_in){
42 42
 		$this->fact = $fact_in;
43 43
 	}
44 44
 	
45 45
 	/**
46
-	* Check if a fact has a date and is sourced
47
-	* Values:
48
-	* 		- 0, if no date is found for the fact
49
-	* 		- -1, if the date is not precise
50
-	* 		- -2, if the date is precise, but no source is found
51
-	* 		- 1, if the date is precise, and a source is found
52
-	* 		- 2, if the date is precise, a source exists, and is supported by a certificate (requires _ACT usage)
53
-	* 		- 3, if the date is precise, a source exists, and the certificate supporting the fact is within an acceptable range of date
54
-	*
55
-	* @return int Level of sources
56
-	*/
46
+	 * Check if a fact has a date and is sourced
47
+	 * Values:
48
+	 * 		- 0, if no date is found for the fact
49
+	 * 		- -1, if the date is not precise
50
+	 * 		- -2, if the date is precise, but no source is found
51
+	 * 		- 1, if the date is precise, and a source is found
52
+	 * 		- 2, if the date is precise, a source exists, and is supported by a certificate (requires _ACT usage)
53
+	 * 		- 3, if the date is precise, a source exists, and the certificate supporting the fact is within an acceptable range of date
54
+	 *
55
+	 * @return int Level of sources
56
+	 */
57 57
 	public function isSourced(){
58 58
 		$isSourced=0;
59 59
 		$date = $this->fact->getDate(false);
Please login to merge, or discard this patch.
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
  						}
Please login to merge, or discard this patch.
src/Webtrees/Cache.php 4 patches
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -16,10 +16,10 @@  discard block
 block discarded – undo
16 16
  */
17 17
 class Cache{
18 18
 	
19
-    /**
20
-     * Underlying Zend Cache object
21
-     * @var \Zend_Cache_Core|\Zend_Cache_FrontEnd $cache
22
-     */
19
+	/**
20
+	 * Underlying Zend Cache object
21
+	 * @var \Zend_Cache_Core|\Zend_Cache_FrontEnd $cache
22
+	 */
23 23
 	protected $cache=null;
24 24
 	
25 25
 	/**
@@ -41,11 +41,11 @@  discard block
 block discarded – undo
41 41
 	 */
42 42
 	protected static function getInstance()
43 43
 	{
44
-	    if (null === static::$instance) {
45
-	        static::$instance = new static();
46
-	    }
44
+		if (null === static::$instance) {
45
+			static::$instance = new static();
46
+		}
47 47
 	
48
-	    return static::$instance;
48
+		return static::$instance;
49 49
 	}
50 50
 	
51 51
 	/**
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
 	 * @return string Cached key name
92 92
 	 */
93 93
 	protected function getKeyName($value, AbstractModule $mod = null){
94
-	    $this->checkInit();
94
+		$this->checkInit();
95 95
 		$mod_name = 'myartjaub';
96 96
 		if($mod != null) $mod_name = $mod->getName();
97 97
 		return $mod_name.'_'.$value;
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
 	 * @return bool True is cached
118 118
 	 */
119 119
 	public static function isCached($value, AbstractModule $mod = null) {
120
-	    self::getInstance()->isCachedI($value, $mod);
120
+		self::getInstance()->isCachedI($value, $mod);
121 121
 	}
122 122
 	
123 123
 	/**
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
 	 * @return unknown_type Cached value
141 141
 	 */
142 142
 	public static function get($value, AbstractModule $mod = null){
143
-	    self::getInstance()->getI($value, $mod);
143
+		self::getInstance()->getI($value, $mod);
144 144
 	}
145 145
 	
146 146
 	/**
@@ -166,7 +166,7 @@  discard block
 block discarded – undo
166 166
 	 * @return unknown_type Cached value
167 167
 	 */
168 168
 	public static function save($value, $data, AbstractModule $mod = null){
169
-	    self::getInstance()->saveI($value, $data, $mod);
169
+		self::getInstance()->saveI($value, $data, $mod);
170 170
 	}
171 171
 	
172 172
 	/**
@@ -174,7 +174,7 @@  discard block
 block discarded – undo
174 174
 	 *
175 175
 	 */
176 176
 	public function cleanI(){
177
-	    $this->checkInit();
177
+		$this->checkInit();
178 178
 		$this->cache->clean();
179 179
 	}
180 180
 	
@@ -182,7 +182,7 @@  discard block
 block discarded – undo
182 182
 	 * Static invocation of the *clean* method.
183 183
 	 */
184 184
 	public static function clean() {
185
-	    self::getInstance()->cleanI();
185
+		self::getInstance()->cleanI();
186 186
 	}
187 187
 	
188 188
 }
189 189
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -14,13 +14,13 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 	}
Please login to merge, or discard this patch.
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -80,7 +80,9 @@  discard block
 block discarded – undo
80 80
 	 *
81 81
 	 */
82 82
 	protected function checkInit(){
83
-		if(!$this->is_init) $this->init();
83
+		if(!$this->is_init) {
84
+			$this->init();
85
+		}
84 86
 	}
85 87
 	
86 88
 	/**
@@ -93,7 +95,9 @@  discard block
 block discarded – undo
93 95
 	protected function getKeyName($value, AbstractModule $mod = null){
94 96
 	    $this->checkInit();
95 97
 		$mod_name = 'myartjaub';
96
-		if($mod !== null) $mod_name = $mod->getName();
98
+		if($mod !== null) {
99
+			$mod_name = $mod->getName();
100
+		}
97 101
 		return $mod_name.'_'.$value;
98 102
 	}
99 103
 
Please login to merge, or discard this patch.
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
 	 *
115 115
 	 * @param string $value Value name
116 116
 	 * @param AbstractModule $mod Calling module
117
-	 * @return bool True is cached
117
+	 * @return boolean|null True is cached
118 118
 	 */
119 119
 	public static function isCached($value, AbstractModule $mod = null) {
120 120
 	    self::getInstance()->isCachedI($value, $mod);
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
 	 * @param string $value Value name
150 150
 	 * @param mixed $data Value
151 151
 	 * @param AbstractModule $mod Calling module
152
-	 * @return mixed Cached value
152
+	 * @return unknown_type|null Cached value
153 153
 	 */
154 154
 	public function saveI($value, $data, AbstractModule $mod = null){
155 155
 		$this->checkInit();
Please login to merge, or discard this patch.
src/Webtrees/Mvc/Controller/MvcControllerInterface.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -15,12 +15,12 @@
 block discarded – undo
15 15
  */
16 16
 interface MvcControllerInterface {
17 17
     
18
-    /**
19
-     * Return the module attached to this controller.
20
-     * 
21
-     * @return \Fisharebest\Webtrees\Module\AbstractModule
22
-     */
23
-    function getModule();
18
+	/**
19
+	 * Return the module attached to this controller.
20
+	 * 
21
+	 * @return \Fisharebest\Webtrees\Module\AbstractModule
22
+	 */
23
+	function getModule();
24 24
     
25 25
 }
26 26
  
27 27
\ No newline at end of file
Please login to merge, or discard this patch.
src/Webtrees/Mvc/Controller/MvcController.php 1 patch
Indentation   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -17,28 +17,28 @@
 block discarded – undo
17 17
  */
18 18
 class MvcController implements MvcControllerInterface 
19 19
 {
20
-    /**
21
-     * Reference module
22
-     * @var Fisharebest\Webtrees\Module\AbstractModule $module
23
-     */
24
-    protected $module;
20
+	/**
21
+	 * Reference module
22
+	 * @var Fisharebest\Webtrees\Module\AbstractModule $module
23
+	 */
24
+	protected $module;
25 25
     
26
-    /**
27
-     * Constructor for MvcController
28
-     * 
29
-     * @param AbstractModule $module
30
-     */
31
-    public function __construct(AbstractModule $module) {
32
-        $this->module = $module;
33
-    }
26
+	/**
27
+	 * Constructor for MvcController
28
+	 * 
29
+	 * @param AbstractModule $module
30
+	 */
31
+	public function __construct(AbstractModule $module) {
32
+		$this->module = $module;
33
+	}
34 34
     
35
-    /**
36
-     * {@inheritDoc}
37
-     * @see \MyArtJaub\Webtrees\Mvc\Controller\MvcControllerInterface::getModule()
38
-     */
39
-    public function getModule() {
40
-        return $this->module;
41
-    }
35
+	/**
36
+	 * {@inheritDoc}
37
+	 * @see \MyArtJaub\Webtrees\Mvc\Controller\MvcControllerInterface::getModule()
38
+	 */
39
+	public function getModule() {
40
+		return $this->module;
41
+	}
42 42
         
43 43
 }
44 44
  
45 45
\ No newline at end of file
Please login to merge, or discard this patch.
src/Webtrees/Mvc/DispatcherInterface.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
 	 * @param \Fisharebest\Webtrees\Module\AbstractModule $module
22 22
 	 * @param string $request
23 23
 	 */
24
-    public function handle(\Fisharebest\Webtrees\Module\AbstractModule $module, $request);
24
+	public function handle(\Fisharebest\Webtrees\Module\AbstractModule $module, $request);
25 25
     
26 26
 }
27 27
  
28 28
\ No newline at end of file
Please login to merge, or discard this patch.
src/Webtrees/Mvc/View/ViewFactory.php 3 patches
Indentation   +72 added lines, -72 removed lines patch added patch discarded remove patch
@@ -17,87 +17,87 @@
 block discarded – undo
17 17
  */
18 18
 class ViewFactory {
19 19
     
20
-    /**
21
-     * @var ViewFactory $instance Singleton pattern instance
22
-     */
23
-    private static $instance = null;
20
+	/**
21
+	 * @var ViewFactory $instance Singleton pattern instance
22
+	 */
23
+	private static $instance = null;
24 24
     
25
-    /**
26
-     * Returns the *ViewFactory* instance of this class.
27
-     *
28
-     * @return ViewFactory The *Singleton* instance.
29
-     */
30
-    public static function getInstance()
31
-    {
32
-        if (null === static::$instance) {
33
-            static::$instance = new static();
34
-        }
25
+	/**
26
+	 * Returns the *ViewFactory* instance of this class.
27
+	 *
28
+	 * @return ViewFactory The *Singleton* instance.
29
+	 */
30
+	public static function getInstance()
31
+	{
32
+		if (null === static::$instance) {
33
+			static::$instance = new static();
34
+		}
35 35
     
36
-        return static::$instance;
37
-    }
36
+		return static::$instance;
37
+	}
38 38
     
39
-    /**
40
-     * Protected constructor
41
-     */
42
-    protected function __construct() {}
39
+	/**
40
+	 * Protected constructor
41
+	 */
42
+	protected function __construct() {}
43 43
               
44
-    /**
45
-     * Return the view specified by the controller and view name, using data from the ViewBag
46
-     * 
47
-     * @param string $view_name
48
-     * @param \MyArtJaub\Webtrees\Mvc\Controller\MvcControllerInterface $mvc_ctrl
49
-     * @param \Fisharebest\Webtrees\Controller\BaseController $ctrl
50
-     * @param \MyArtJaub\Webtrees\Mvc\View\ViewBag $data
51
-     * @return \MyArtJaub\Webtrees\Mvc\View\AbstractView View
52
-     * @throws \Exception
53
-     */
54
-    public function makeView($view_name, MvcController $mvc_ctrl, BaseController $ctrl, ViewBag $data) 
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');
44
+	/**
45
+	 * Return the view specified by the controller and view name, using data from the ViewBag
46
+	 * 
47
+	 * @param string $view_name
48
+	 * @param \MyArtJaub\Webtrees\Mvc\Controller\MvcControllerInterface $mvc_ctrl
49
+	 * @param \Fisharebest\Webtrees\Controller\BaseController $ctrl
50
+	 * @param \MyArtJaub\Webtrees\Mvc\View\ViewBag $data
51
+	 * @return \MyArtJaub\Webtrees\Mvc\View\AbstractView View
52
+	 * @throws \Exception
53
+	 */
54
+	public function makeView($view_name, MvcController $mvc_ctrl, BaseController $ctrl, ViewBag $data) 
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');
59 59
         
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');
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');
63 63
         
64
-        return new $view_class($ctrl, $data);
65
-    }
64
+		return new $view_class($ctrl, $data);
65
+	}
66 66
     
67
-    /**
68
-     * Static invocation of the makeView method
69
-     * 
70
-     * @param string $view_name
71
-     * @param \MyArtJaub\Webtrees\Mvc\Controller\MvcControllerInterface $mvc_ctrl
72
-     * @param \Fisharebest\Webtrees\Controller\BaseController $ctrl
73
-     * @param \MyArtJaub\Webtrees\Mvc\View\ViewBag $data
74
-     * @return \MyArtJaub\Webtrees\Mvc\View\AbstractView View
75
-     * @see \MyArtJaub\Webtrees\Mvc\View\ViewFactory::handle()
76
-     */
77
-    public static function make($view_name, MvcController $mvc_ctrl, BaseController $ctrl, ViewBag $data) 
78
-    {
79
-        return self::getInstance()->makeView($view_name, $mvc_ctrl, $ctrl, $data);
80
-    }
67
+	/**
68
+	 * Static invocation of the makeView method
69
+	 * 
70
+	 * @param string $view_name
71
+	 * @param \MyArtJaub\Webtrees\Mvc\Controller\MvcControllerInterface $mvc_ctrl
72
+	 * @param \Fisharebest\Webtrees\Controller\BaseController $ctrl
73
+	 * @param \MyArtJaub\Webtrees\Mvc\View\ViewBag $data
74
+	 * @return \MyArtJaub\Webtrees\Mvc\View\AbstractView View
75
+	 * @see \MyArtJaub\Webtrees\Mvc\View\ViewFactory::handle()
76
+	 */
77
+	public static function make($view_name, MvcController $mvc_ctrl, BaseController $ctrl, ViewBag $data) 
78
+	{
79
+		return self::getInstance()->makeView($view_name, $mvc_ctrl, $ctrl, $data);
80
+	}
81 81
     
82
-    /**
83
-     * Private clone method to prevent cloning of the instance of the
84
-     * *Dispatcher* instance.
85
-     *
86
-     * @return void
87
-     */
88
-    private function __clone()
89
-    {
90
-    }
82
+	/**
83
+	 * Private clone method to prevent cloning of the instance of the
84
+	 * *Dispatcher* instance.
85
+	 *
86
+	 * @return void
87
+	 */
88
+	private function __clone()
89
+	{
90
+	}
91 91
     
92
-    /**
93
-     * Private unserialize method to prevent unserializing of the *Dispatcher*
94
-     * instance.
95
-     *
96
-     * @return void
97
-     */
98
-    private function __wakeup()
99
-    {
100
-    }
92
+	/**
93
+	 * Private unserialize method to prevent unserializing of the *Dispatcher*
94
+	 * instance.
95
+	 *
96
+	 * @return void
97
+	 */
98
+	private function __wakeup()
99
+	{
100
+	}
101 101
     
102 102
 }
103 103
  
104 104
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -53,13 +53,13 @@
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
Braces   +12 added lines, -4 removed lines patch added patch discarded remove patch
@@ -53,13 +53,21 @@
 block discarded – undo
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) {
57
+        	throw new \Exception('Mvc Controller not defined');
58
+        }
59
+        if(!$ctrl) {
60
+        	throw new \Exception('Base Controller not defined');
61
+        }
62
+        if(!$view_name) {
63
+        	throw new \Exception('View not defined');
64
+        }
59 65
         
60 66
         $mvc_ctrl_refl = new \ReflectionObject($mvc_ctrl);
61 67
         $view_class = $mvc_ctrl_refl->getNamespaceName() . '\\Views\\' . $view_name . 'View';       
62
-        if(!class_exists($view_class)) throw new \Exception('View does not exist');
68
+        if(!class_exists($view_class)) {
69
+        	throw new \Exception('View does not exist');
70
+        }
63 71
         
64 72
         return new $view_class($ctrl, $data);
65 73
     }
Please login to merge, or discard this patch.
src/Webtrees/Mvc/View/AbstractView.php 3 patches
Indentation   +45 added lines, -45 removed lines patch added patch discarded remove patch
@@ -15,62 +15,62 @@
 block discarded – undo
15 15
  */
16 16
 abstract class AbstractView {
17 17
     
18
-    /**
19
-     * Reference controller
20
-     * @var \Fisharebest\Webtrees\Controller\BaseController $ctrl
21
-     */
22
-    protected $ctrl;
18
+	/**
19
+	 * Reference controller
20
+	 * @var \Fisharebest\Webtrees\Controller\BaseController $ctrl
21
+	 */
22
+	protected $ctrl;
23 23
     
24
-    /**
25
-     * Structure containing the data of the view
26
-     * @var ViewBag $data
27
-     */
28
-    protected $data;
24
+	/**
25
+	 * Structure containing the data of the view
26
+	 * @var ViewBag $data
27
+	 */
28
+	protected $data;
29 29
     
30
-    /**
31
-     * Constructor 
32
-     * @param \Fisharebest\Webtrees\Controller\BaseController $ctrl Controller
33
-     * @param ViewBag $data ViewBag holding view data
34
-     */
35
-    public function __construct(\Fisharebest\Webtrees\Controller\BaseController $ctrl, ViewBag $data) {
36
-        $this->ctrl = $ctrl;
37
-        $this->data = $data;
38
-    }
30
+	/**
31
+	 * Constructor 
32
+	 * @param \Fisharebest\Webtrees\Controller\BaseController $ctrl Controller
33
+	 * @param ViewBag $data ViewBag holding view data
34
+	 */
35
+	public function __construct(\Fisharebest\Webtrees\Controller\BaseController $ctrl, ViewBag $data) {
36
+		$this->ctrl = $ctrl;
37
+		$this->data = $data;
38
+	}
39 39
     
40
-    /**
41
-     * Render the view to the page, including header.
42
-     * 
43
-     * @throws \Exception
44
-     */
45
-    public function render() {
40
+	/**
41
+	 * Render the view to the page, including header.
42
+	 * 
43
+	 * @throws \Exception
44
+	 */
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
-        $this->ctrl->pageHeader();
51
+		$this->ctrl->pageHeader();
52 52
         
53
-        echo $this->renderContent();
54
-    }
53
+		echo $this->renderContent();
54
+	}
55 55
     
56
-    /**
57
-     * Render the view to the page, without any header
58
-     */
59
-    public function renderPartial() {
60
-        echo $this->getHtmlPartial();
61
-    }
56
+	/**
57
+	 * Render the view to the page, without any header
58
+	 */
59
+	public function renderPartial() {
60
+		echo $this->getHtmlPartial();
61
+	}
62 62
     
63
-    /**
64
-     * Return the HTML code generated by the view, without any header
65
-     */
66
-    public function getHtmlPartial() {
67
-        return $this->renderContent();
68
-    }
63
+	/**
64
+	 * Return the HTML code generated by the view, without any header
65
+	 */
66
+	public function getHtmlPartial() {
67
+		return $this->renderContent();
68
+	}
69 69
     
70
-    /**
71
-     * Abstract method containing the details of the view.
72
-     */
73
-    abstract protected function renderContent();
70
+	/**
71
+	 * Abstract method containing the details of the view.
72
+	 */
73
+	abstract protected function renderContent();
74 74
     
75 75
 }
76 76
  
77 77
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@
 block discarded – undo
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();
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -45,7 +45,9 @@
 block discarded – undo
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) {
49
+        	throw new \Exception('Controller not initialised');
50
+        }
49 51
         
50 52
 		$controller = $this->ctrl;
51 53
         $this->ctrl->pageHeader();
Please login to merge, or discard this patch.