Passed
Branch feature/2.1-geodispersion-dev (1d61a8)
by Jonathan
61:21
created
src/Webtrees/Constants.php 1 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/Hooks/Views/AdminConfigView.php 1 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.
src/Webtrees/Module/ModuleManager.php 1 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.
src/Webtrees/Mvc/View/ViewFactory.php 1 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.
src/Webtrees/Mvc/View/ViewBag.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -73,8 +73,8 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 }
Please login to merge, or discard this patch.
src/Webtrees/Place.php 1 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/Controller/IndividualController.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
 	 *
33 33
 	 * @param \Fisharebest\Webtrees\Controller\IndividualController $ctrl_individual_in The Individual Controller to extend
34 34
 	 */
35
-	public function __construct(fw\Controller\IndividualController $ctrl_individual_in){
35
+	public function __construct(fw\Controller\IndividualController $ctrl_individual_in) {
36 36
 		$this->ctrl_individual = $ctrl_individual_in;
37 37
 		$this->dindi = new mw\Individual($this->ctrl_individual->getSignificantIndividual());
38 38
 	}
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
 	 * 
44 44
 	 * @uses \MyArtJaub\Webtrees\Hook\Hook
45 45
 	 */
46
-	public function printHeaderExtensions(){
46
+	public function printHeaderExtensions() {
47 47
 		$hook_extend_indi_header_left = new mw\Hook\Hook('hExtendIndiHeaderLeft');
48 48
 		$hook_extend_indi_header_right = new mw\Hook\Hook('hExtendIndiHeaderRight');
49 49
 		$hook_extend_indi_header_left = $hook_extend_indi_header_left->execute($this->ctrl_individual);
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
 		echo '<div id="indi_perso_header">',
53 53
 			'<div id="indi_perso_header_left">';
54 54
 		foreach ($hook_extend_indi_header_left as $div) {
55
-			if(count($div)==2){
55
+			if (count($div) == 2) {
56 56
 				echo '<div id="', $div[0], '" class="indi_perso_header_left_div">',
57 57
 					$div[1], '</div>';
58 58
 			}
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
 		echo '</div>',
61 61
 			'<div id="indi_perso_header_right">';
62 62
 		foreach ($hook_extend_indi_header_right as $div) {
63
-			if(count($div)==2){
63
+			if (count($div) == 2) {
64 64
 				echo '<div id="', $div[0], '" class="indi_perso_header_right_div">',
65 65
 					$div[1], '</div>';
66 66
 			}
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
 	 *
76 76
 	 * @uses \MyArtJaub\Webtrees\Hook\Hook
77 77
 	 */
78
-	public function printHeaderExtraIcons(){
78
+	public function printHeaderExtraIcons() {
79 79
 		$hook_extend_indi_header_icons = new Hook('hExtendIndiHeaderIcons');
80 80
 		$hook_extend_indi_header_icons = $hook_extend_indi_header_icons->execute($this->ctrl_individual);
81 81
 		
Please login to merge, or discard this patch.
src/Webtrees/Mvc/Dispatcher.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -49,10 +49,10 @@  discard block
 block discarded – undo
49 49
     public function handle(fw\Module\AbstractModule $module, $request) {
50 50
 		
51 51
 		$fq_modclass_name = get_class($module);
52
-		$ctrl_namespace = substr($fq_modclass_name, 0, - strlen('Module')) . '\\';
52
+		$ctrl_namespace = substr($fq_modclass_name, 0, - strlen('Module')).'\\';
53 53
 		
54
-		$args = explode( '@', $request, 2);
55
-		switch(count($args)) {
54
+		$args = explode('@', $request, 2);
55
+		switch (count($args)) {
56 56
 			case 1:
57 57
 				$ctrl_name = $args[0];
58 58
 				$method = 'index';
@@ -64,16 +64,16 @@  discard block
 block discarded – undo
64 64
 				break;
65 65
 		}
66 66
 		
67
-		$ctrl_class = $ctrl_namespace . $ctrl_name . 'Controller';
68
-		if(class_exists($ctrl_class) 
67
+		$ctrl_class = $ctrl_namespace.$ctrl_name.'Controller';
68
+		if (class_exists($ctrl_class) 
69 69
 		    && is_subclass_of($ctrl_class, '\\MyArtJaub\\Webtrees\\Mvc\\Controller\\MvcController')
70
-			&& $ctrl = new $ctrl_class($module) ) {
71
-			if(method_exists($ctrl, $method)) {
70
+			&& $ctrl = new $ctrl_class($module)) {
71
+			if (method_exists($ctrl, $method)) {
72 72
 			    try {
73 73
 			        call_user_func_array(array($ctrl, $method), array());
74 74
 			    }
75 75
 			    catch (MvcException $ex) {
76
-			        if(!headers_sent()) {
76
+			        if (!headers_sent()) {
77 77
 			            http_response_code($ex->getHttpCode());
78 78
 			        }
79 79
 			        echo $ex->getMessage();			        
Please login to merge, or discard this patch.
src/Webtrees/Mvc/MvcException.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
 class MvcException extends \Exception {
18 18
 
19 19
     /** @var int[] $VALID_HTTP List of valid HTTP codes */
20
-    protected static $VALID_HTTP =  array(
20
+    protected static $VALID_HTTP = array(
21 21
         100, 101,
22 22
         200, 201, 202, 203, 204, 205, 206,
23 23
         300, 301, 302, 303, 304, 305, 306, 307,
@@ -58,9 +58,9 @@  discard block
 block discarded – undo
58 58
      * @throws InvalidArgumentException Thrown if not valid Http code
59 59
      */
60 60
     public function setHttpCode($http_code) {
61
-        if(!in_array($http_code, self::$VALID_HTTP))
61
+        if (!in_array($http_code, self::$VALID_HTTP))
62 62
             throw new \InvalidArgumentException('Invalid HTTP code');
63
-        $this->http_code= $http_code;
63
+        $this->http_code = $http_code;
64 64
     }   
65 65
 
66 66
 }
Please login to merge, or discard this patch.