Passed
Branch feature/2.1-geodispersion-dev (38d49e)
by Jonathan
04:17
created
src/Webtrees/Constants.php 2 patches
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -14,17 +14,17 @@  discard block
 block discarded – undo
14 14
  */
15 15
 class Constants {
16 16
     
17
-    const LIB_NAMESPACE = __NAMESPACE__;
17
+	const LIB_NAMESPACE = __NAMESPACE__;
18 18
 	
19
-    /** Internal name of the Certificates Module
20
-     * @var string
21
-     */
22
-    const MODULE_MAJ_CERTIF_NAME = 'myartjaub_certificates';
19
+	/** Internal name of the Certificates Module
20
+	 * @var string
21
+	 */
22
+	const MODULE_MAJ_CERTIF_NAME = 'myartjaub_certificates';
23 23
     
24
-    /** Internal name of the GeoDispersion Module
25
-     * @var string
26
-     */
27
-    const MODULE_MAJ_GEODISP_NAME = 'myartjaub_geodispersion';
24
+	/** Internal name of the GeoDispersion Module
25
+	 * @var string
26
+	 */
27
+	const MODULE_MAJ_GEODISP_NAME = 'myartjaub_geodispersion';
28 28
     
29 29
 	/** Internal name of the Hooks Module
30 30
 	 * @var string
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
 	 * @return string $WT_RAPHAEL_JS_URL
62 62
 	 */
63 63
 	public static function WT_RAPHAEL_JS_URL() {
64
-	    return WT_STATIC_URL . 'packages/raphael-2.1.4/raphael-min.js';
64
+		return WT_STATIC_URL . 'packages/raphael-2.1.4/raphael-min.js';
65 65
 	}
66 66
 		
67 67
 }
68 68
\ 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
@@ -61,7 +61,7 @@
 block discarded – undo
61 61
 	 * @return string $WT_RAPHAEL_JS_URL
62 62
 	 */
63 63
 	public static function WT_RAPHAEL_JS_URL() {
64
-	    return WT_STATIC_URL . 'packages/raphael-2.1.4/raphael-min.js';
64
+	    return WT_STATIC_URL.'packages/raphael-2.1.4/raphael-min.js';
65 65
 	}
66 66
 		
67 67
 }
68 68
\ No newline at end of file
Please login to merge, or discard this patch.
src/Webtrees/Module/ModuleMenuItemInterface.php 1 patch
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -15,11 +15,11 @@
 block discarded – undo
15 15
  */
16 16
 interface ModuleMenuItemInterface
17 17
 {
18
-    /**
19
-     * Returns a menu item for the module.
20
-     * 
21
-     * @param \Fisharebest\Webtrees\Tree|null $tree
22
-     * @param mixed $reference
23
-     */
24
-    public function getMenu(\Fisharebest\Webtrees\Tree $tree, $reference);
18
+	/**
19
+	 * Returns a menu item for the module.
20
+	 * 
21
+	 * @param \Fisharebest\Webtrees\Tree|null $tree
22
+	 * @param mixed $reference
23
+	 */
24
+	public function getMenu(\Fisharebest\Webtrees\Tree $tree, $reference);
25 25
 }
26 26
\ No newline at end of file
Please login to merge, or discard this patch.
src/Webtrees/Module/Hooks/Schema/Migration0.php 1 patch
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -23,17 +23,17 @@
 block discarded – undo
23 23
 
24 24
 		Database::exec(
25 25
 		   "CREATE TABLE IF NOT EXISTS `##maj_hooks` (".
26
-	       " majh_id       			INTEGER AUTO_INCREMENT NOT NULL,".
27
-	       " majh_hook_function		VARCHAR(32)            NOT NULL,".
26
+		   " majh_id       			INTEGER AUTO_INCREMENT NOT NULL,".
27
+		   " majh_hook_function		VARCHAR(32)            NOT NULL,".
28 28
 		   " majh_hook_context      VARCHAR(32)            NOT NULL DEFAULT 'all',".
29
-	       " majh_module_name		VARCHAR(32)            NOT NULL,".
30
-	       " majh_module_priority	INTEGER            	   NOT NULL DEFAULT 99,".
31
-	       " majh_status      		ENUM('enabled', 'disabled') NOT NULL DEFAULT 'enabled',".		   
32
-	       " PRIMARY KEY (majh_id),".
33
-	       " UNIQUE KEY `##maj_hooks_uk` (majh_hook_function, majh_hook_context, majh_module_name),".
34
-	       " FOREIGN KEY `##module_name_fk1` (majh_module_name)".
29
+		   " majh_module_name		VARCHAR(32)            NOT NULL,".
30
+		   " majh_module_priority	INTEGER            	   NOT NULL DEFAULT 99,".
31
+		   " majh_status      		ENUM('enabled', 'disabled') NOT NULL DEFAULT 'enabled',".		   
32
+		   " PRIMARY KEY (majh_id),".
33
+		   " UNIQUE KEY `##maj_hooks_uk` (majh_hook_function, majh_hook_context, majh_module_name),".
34
+		   " FOREIGN KEY `##module_name_fk1` (majh_module_name)".
35 35
 		   " REFERENCES `##module` (module_name) ON DELETE CASCADE ON UPDATE CASCADE".
36
-	       ") COLLATE utf8_unicode_ci ENGINE=InnoDB"
36
+		   ") COLLATE utf8_unicode_ci ENGINE=InnoDB"
37 37
 		);
38 38
 	}
39 39
 }
Please login to merge, or discard this patch.
src/Webtrees/Module/Hooks/Views/AdminConfigView.php 3 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -25,11 +25,11 @@  discard block
 block discarded – undo
25 25
 	 * {@inhericDoc}
26 26
 	 * @see \MyArtJaub\Webtrees\Mvc\View\AbstractView::renderContent()
27 27
 	 */
28
-    protected function renderContent() {
28
+	protected function renderContent() {
29 29
         
30
-        $table_id = $this->data->get('table_id');
30
+		$table_id = $this->data->get('table_id');
31 31
         
32
-        ?>        
32
+		?>        
33 33
         <ol class="breadcrumb small">
34 34
         	<li><a href="admin.php"><?php echo I18N::translate('Control panel'); ?></a></li>
35 35
 			<li><a href="admin_modules.php"><?php echo I18N::translate('Module administration'); ?></a></li>
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
 		</div>	
80 80
 		
81 81
 		<?php        
82
-    }
82
+	}
83 83
     
84 84
 }
85 85
  
86 86
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -60,13 +60,13 @@
 block discarded – undo
60 60
 							?>
61 61
 							<tr>
62 62
 								<td>
63
-									<input type="hidden" name="hook-<?php echo $hook->id;?>" value="yes" >
64
-									<?php echo FunctionsEdit::twoStateCheckbox('status-'.($hook->id), ($hook->status)=='enabled'); ?>
63
+									<input type="hidden" name="hook-<?php echo $hook->id; ?>" value="yes" >
64
+									<?php echo FunctionsEdit::twoStateCheckbox('status-'.($hook->id), ($hook->status) == 'enabled'); ?>
65 65
 								</td>
66
-								<td><?php echo (($hook->status)=='enabled'); ?></td>
66
+								<td><?php echo (($hook->status) == 'enabled'); ?></td>
67 67
 								<td><?php echo $hook->hook; ?></td>
68 68
 								<td><?php echo $hook->context; ?></td>
69
-								<td><?php if($mod = Module::getModuleByName($hook->module)) echo $mod->getTitle(); ?></td>
69
+								<td><?php if ($mod = Module::getModuleByName($hook->module)) echo $mod->getTitle(); ?></td>
70 70
 								<td><input type="text" class="center" size="2" value="<?php echo $hook->priority; ?>" name="moduleorder-<?php echo $hook->id; ?>" /></td>
71 71
 								<td><?php echo $hook->priority; ?></td>
72 72
 							</tr>
Please login to merge, or discard this patch.
Braces   +4 added lines, -1 removed lines patch added patch discarded remove patch
@@ -66,7 +66,10 @@
 block discarded – undo
66 66
 								<td><?php echo (($hook->status)=='enabled'); ?></td>
67 67
 								<td><?php echo $hook->hook; ?></td>
68 68
 								<td><?php echo $hook->context; ?></td>
69
-								<td><?php if($mod = Module::getModuleByName($hook->module)) echo $mod->getTitle(); ?></td>
69
+								<td><?php if($mod = Module::getModuleByName($hook->module)) {
70
+	echo $mod->getTitle();
71
+}
72
+?></td>
70 73
 								<td><input type="text" class="center" size="2" value="<?php echo $hook->priority; ?>" name="moduleorder-<?php echo $hook->id; ?>" /></td>
71 74
 								<td><?php echo $hook->priority; ?></td>
72 75
 							</tr>
Please login to merge, or discard this patch.
src/Webtrees/Module/ModuleManager.php 3 patches
Indentation   +52 added lines, -52 removed lines patch added patch discarded remove patch
@@ -49,62 +49,62 @@
 block discarded – undo
49 49
 	}
50 50
 	
51 51
 	/**
52
-     * Protected constructor.
53
-     */
54
-    protected function __construct()
55
-    {
56
-    	$this->modules_list = array();
57
-    }
52
+	 * Protected constructor.
53
+	 */
54
+	protected function __construct()
55
+	{
56
+		$this->modules_list = array();
57
+	}
58 58
     
59
-    /**
60
-     * {@inheritDoc}
61
-     * @see \MyArtJaub\Webtrees\Module\ModuleManagerInterface::isOperational()
62
-     */
63
-    public function isOperational($moduleName) {
64
-    	if(!array_key_exists($moduleName, $this->modules_list)) {
65
-    		if($module = fw\Module::getModuleByName($moduleName)) {
66
-    			if($module instanceof DependentInterface) {
67
-    				if($module->validatePrerequisites()) {
68
-    					$this->modules_list[$moduleName] = TRUE;
69
-    					return true;
70
-    				} else {
71
-    					// Do not cache the result,
72
-    					// as they could change by the next call to the method
73
-    					return false;
74
-    				}
75
-    			}
76
-    			else {
77
-    				$this->modules_list[$moduleName] = TRUE;
78
-    				return true;
79
-    			}
80
-    		}
81
-    		else {
82
-    			$this->modules_list[$moduleName] = FALSE;
83
-    		}
84
-    	}
85
-    	return $this->modules_list[$moduleName];
59
+	/**
60
+	 * {@inheritDoc}
61
+	 * @see \MyArtJaub\Webtrees\Module\ModuleManagerInterface::isOperational()
62
+	 */
63
+	public function isOperational($moduleName) {
64
+		if(!array_key_exists($moduleName, $this->modules_list)) {
65
+			if($module = fw\Module::getModuleByName($moduleName)) {
66
+				if($module instanceof DependentInterface) {
67
+					if($module->validatePrerequisites()) {
68
+						$this->modules_list[$moduleName] = TRUE;
69
+						return true;
70
+					} else {
71
+						// Do not cache the result,
72
+						// as they could change by the next call to the method
73
+						return false;
74
+					}
75
+				}
76
+				else {
77
+					$this->modules_list[$moduleName] = TRUE;
78
+					return true;
79
+				}
80
+			}
81
+			else {
82
+				$this->modules_list[$moduleName] = FALSE;
83
+			}
84
+		}
85
+		return $this->modules_list[$moduleName];
86 86
     	
87
-    }
87
+	}
88 88
     
89 89
 
90
-    /**
91
-     * Private clone method to prevent cloning of the instance of the
92
-     * *ModuleManager* instance.
93
-     *
94
-     * @return void
95
-     */
96
-    private function __clone()
97
-    {
98
-    }
90
+	/**
91
+	 * Private clone method to prevent cloning of the instance of the
92
+	 * *ModuleManager* instance.
93
+	 *
94
+	 * @return void
95
+	 */
96
+	private function __clone()
97
+	{
98
+	}
99 99
 
100
-    /**
101
-     * Private unserialize method to prevent unserializing of the *ModuleManager*
102
-     * instance.
103
-     *
104
-     * @return void
105
-     */
106
-    private function __wakeup()
107
-    {
108
-    }
100
+	/**
101
+	 * Private unserialize method to prevent unserializing of the *ModuleManager*
102
+	 * instance.
103
+	 *
104
+	 * @return void
105
+	 */
106
+	private function __wakeup()
107
+	{
108
+	}
109 109
     
110 110
 }
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -61,10 +61,10 @@
 block discarded – undo
61 61
      * @see \MyArtJaub\Webtrees\Module\ModuleManagerInterface::isOperational()
62 62
      */
63 63
     public function isOperational($moduleName) {
64
-    	if(!array_key_exists($moduleName, $this->modules_list)) {
65
-    		if($module = fw\Module::getModuleByName($moduleName)) {
66
-    			if($module instanceof DependentInterface) {
67
-    				if($module->validatePrerequisites()) {
64
+    	if (!array_key_exists($moduleName, $this->modules_list)) {
65
+    		if ($module = fw\Module::getModuleByName($moduleName)) {
66
+    			if ($module instanceof DependentInterface) {
67
+    				if ($module->validatePrerequisites()) {
68 68
     					$this->modules_list[$moduleName] = TRUE;
69 69
     					return true;
70 70
     				} else {
Please login to merge, or discard this patch.
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -72,13 +72,11 @@
 block discarded – undo
72 72
     					// as they could change by the next call to the method
73 73
     					return false;
74 74
     				}
75
-    			}
76
-    			else {
75
+    			} else {
77 76
     				$this->modules_list[$moduleName] = TRUE;
78 77
     				return true;
79 78
     			}
80
-    		}
81
-    		else {
79
+    		} else {
82 80
     			$this->modules_list[$moduleName] = FALSE;
83 81
     		}
84 82
     	}
Please login to merge, or discard this patch.
src/Webtrees/Module/MiscExtensions/Views/AdminConfigView.php 1 patch
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -28,15 +28,15 @@  discard block
 block discarded – undo
28 28
 	 * {@inhericDoc}
29 29
 	 * @see \MyArtJaub\Webtrees\Mvc\View\AbstractView::renderContent()
30 30
 	 */
31
-    protected function renderContent() {
31
+	protected function renderContent() {
32 32
         
33
-        if (Module::getModuleByName('ckeditor')) {
34
-            CkeditorModule::enableEditor($this->ctrl);
35
-        }
33
+		if (Module::getModuleByName('ckeditor')) {
34
+			CkeditorModule::enableEditor($this->ctrl);
35
+		}
36 36
         
37
-        /** @var AbstractModule $module  */
38
-        $module = $this->data->get('module');        
39
-        ?>        
37
+		/** @var AbstractModule $module  */
38
+		$module = $this->data->get('module');        
39
+		?>        
40 40
         <ol class="breadcrumb small">
41 41
         	<li><a href="admin.php"><?php echo I18N::translate('Control panel'); ?></a></li>
42 42
 			<li><a href="admin_modules.php"><?php echo I18N::translate('Module administration'); ?></a></li>
@@ -187,7 +187,7 @@  discard block
 block discarded – undo
187 187
         </form>
188 188
 		
189 189
 		<?php        
190
-    }
190
+	}
191 191
     
192 192
 }
193 193
  
194 194
\ No newline at end of file
Please login to merge, or discard this patch.
src/Webtrees/Place.php 2 patches
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -77,8 +77,7 @@
 block discarded – undo
77 77
 			$index = str_replace('%', '', $match2);
78 78
 			if(is_numeric($index) && $index >0 && $index <= $nbLevels){
79 79
 				$displayPlace = str_replace($match2, $levels[$index-1] , $displayPlace);
80
-			}
81
-			else{
80
+			} else{
82 81
 				$displayPlace = str_replace($match2, '' , $displayPlace);
83 82
 			}
84 83
 		}
Please login to merge, or discard this patch.
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
 	 *
28 28
 	 * @param \Fisharebest\Webtrees\Place $place_in The Place to extend
29 29
 	 */
30
-	public function __construct(\Fisharebest\Webtrees\Place $place){
30
+	public function __construct(\Fisharebest\Webtrees\Place $place) {
31 31
 		$this->place = $place;
32 32
 	}
33 33
 
@@ -39,9 +39,9 @@  discard block
 block discarded – undo
39 39
 	 * @param \Fisharebest\Webtrees\Tree $tree
40 40
 	 * @return \MyArtJaub\Webtrees\Place|null Instance of \MyArtJaub\Webtrees\Place, if relevant
41 41
 	 */
42
-	public static function getIntance($place_str, Tree $tree){
42
+	public static function getIntance($place_str, Tree $tree) {
43 43
 		$dplace = null;
44
-		if(is_string($place_str) && strlen($place_str) > 0){
44
+		if (is_string($place_str) && strlen($place_str) > 0) {
45 45
 			$dplace = new Place(new \Fisharebest\Webtrees\Place($place_str, $tree));
46 46
 		}
47 47
 		return $dplace;
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
 	 *
53 53
 	 * @return \Fisharebest\Webtrees\Place Embedded place record
54 54
 	 */
55
-	public function getDerivedPlace(){
55
+	public function getDerivedPlace() {
56 56
 		return $this->place;
57 57
 	}
58 58
 	
@@ -65,8 +65,8 @@  discard block
 block discarded – undo
65 65
 	 * @param bool $anchor Option to print a link to placelist
66 66
 	 * @return string HTML code for formatted place
67 67
 	 */
68
-	public function htmlFormattedName($format, $anchor = false){		
69
-		$html='';
68
+	public function htmlFormattedName($format, $anchor = false) {		
69
+		$html = '';
70 70
 		
71 71
 		$levels = array_map('trim', explode(',', $this->place->getGedcomName()));
72 72
 		$nbLevels = count($levels);
@@ -74,15 +74,15 @@  discard block
 block discarded – undo
74 74
 		preg_match_all('/%[^%]/', $displayPlace, $matches);
75 75
 		foreach ($matches[0] as $match2) {
76 76
 			$index = str_replace('%', '', $match2);
77
-			if(is_numeric($index) && $index >0 && $index <= $nbLevels){
78
-				$displayPlace = str_replace($match2, $levels[$index-1] , $displayPlace);
77
+			if (is_numeric($index) && $index > 0 && $index <= $nbLevels) {
78
+				$displayPlace = str_replace($match2, $levels[$index - 1], $displayPlace);
79 79
 			}
80
-			else{
81
-				$displayPlace = str_replace($match2, '' , $displayPlace);
80
+			else {
81
+				$displayPlace = str_replace($match2, '', $displayPlace);
82 82
 			}
83 83
 		}
84 84
 		if ($anchor && !Auth::isSearchEngine()) {
85
-			$html .='<a href="' . $this->place->getURL() . '">' . $displayPlace . '</a>';
85
+			$html .= '<a href="'.$this->place->getURL().'">'.$displayPlace.'</a>';
86 86
 		} else {
87 87
 			$html .= $displayPlace;
88 88
 		}
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.