Passed
Branch feature/2.0 (2da243)
by Jonathan
05:05
created
src/Webtrees/Module/GeoDispersion/Views/GeoAnalysisTabGenerationsView.php 1 patch
Indentation   +93 added lines, -93 removed lines patch added patch discarded remove patch
@@ -24,89 +24,89 @@  discard block
 block discarded – undo
24 24
 	 * {@inhericDoc}
25 25
 	 * @see \MyArtJaub\Webtrees\Mvc\View\AbstractView::renderContent()
26 26
 	 */
27
-    protected function renderContent() {       
27
+	protected function renderContent() {       
28 28
 
29
-        $max_details_gen = $this->data->get('max_details_gen');
30
-        $analysis_level = $this->data->get('analysis_level');
31
-        $results_by_gen = $this->data->get('results_by_generations');
32
-        $display_all_places = $this->data->get('display_all_places', true);
29
+		$max_details_gen = $this->data->get('max_details_gen');
30
+		$analysis_level = $this->data->get('analysis_level');
31
+		$results_by_gen = $this->data->get('results_by_generations');
32
+		$display_all_places = $this->data->get('display_all_places', true);
33 33
         
34
-        $html = 
35
-        '<div id="geodispersion_gen">
34
+		$html = 
35
+		'<div id="geodispersion_gen">
36 36
         	<table id="geodispersion_gentable" class="center">';
37 37
             
38
-        foreach($results_by_gen as $gen => $genData){
39
-            $html .= 
40
-            '<tr>
38
+		foreach($results_by_gen as $gen => $genData){
39
+			$html .= 
40
+			'<tr>
41 41
                 <td class="descriptionbox">' .
42
-                    I18N::translate("Generation %s", I18N::number($gen)).
43
-                    ($display_all_places ? '<br />' : ' ').
44
-                    I18N::translate('(%s)', I18N::percentage(Functions::safeDivision($genData['sum'] + $genData['other'], $genData['sum'] + $genData['other'] + $genData['unknown']),1)) . 
45
-                '</td>
42
+					I18N::translate("Generation %s", I18N::number($gen)).
43
+					($display_all_places ? '<br />' : ' ').
44
+					I18N::translate('(%s)', I18N::percentage(Functions::safeDivision($genData['sum'] + $genData['other'], $genData['sum'] + $genData['other'] + $genData['unknown']),1)) . 
45
+				'</td>
46 46
                  <td class="optionbox left">'.
47
-                    ($display_all_places ? 
48
-                        $this->htmlGenerationAllPlacesRow($genData, $analysis_level) :
49
-                        $this->htmlGenerationTopPlacesRow($genData, $analysis_level)
50
-                     ) .
51
-                '</ditdv>
47
+					($display_all_places ? 
48
+						$this->htmlGenerationAllPlacesRow($genData, $analysis_level) :
49
+						$this->htmlGenerationTopPlacesRow($genData, $analysis_level)
50
+					 ) .
51
+				'</ditdv>
52 52
             </tr>';
53
-        }       
53
+		}       
54 54
         
55
-        $html.= 
56
-            '</table>
55
+		$html.= 
56
+			'</table>
57 57
             <div class="left">
58 58
                 <strong>' . I18N::translate('Interpretation help:') . '</strong>
59 59
                 <br />'.
60
-                I18N::translate('<strong>Generation X (yy %%)</strong>: The percentage indicates the number of found places compared to the total number of ancestors in this generation.') . 
61
-                '<br />';
62
-        if(!is_null($max_details_gen) && $max_details_gen == 0){
63
-            $html .= I18N::translate('<strong><em>Place</em> or <em>Flag</em> aa (bb %%)</strong>: The first number indicates the total number of ancestors born in this place, the percentage relates this count to the total number of found places. No percentage means it is less than 10%%.').'<br />';
64
-            $html .= I18N::translate('If any, the darker area indicates the number of unknown places within the generation or places outside the analysed area, and its percentage compared to the number of ancestors. No percentage means it is less than 10%%.');
65
-        }
66
-        else{
67
-            $html .= I18N::translate('<strong><em>Place</em> [aa - bb %%]</strong>: The first number indicates the total number of ancestors born in this place, the percentage compares this count to the total number of found places.').'<br />';
68
-            $html .= I18N::translate('Only the %d more frequent places for each generation are displayed.', $max_details_gen);
69
-        }
70
-        $html.= 
71
-            '</div>
60
+				I18N::translate('<strong>Generation X (yy %%)</strong>: The percentage indicates the number of found places compared to the total number of ancestors in this generation.') . 
61
+				'<br />';
62
+		if(!is_null($max_details_gen) && $max_details_gen == 0){
63
+			$html .= I18N::translate('<strong><em>Place</em> or <em>Flag</em> aa (bb %%)</strong>: The first number indicates the total number of ancestors born in this place, the percentage relates this count to the total number of found places. No percentage means it is less than 10%%.').'<br />';
64
+			$html .= I18N::translate('If any, the darker area indicates the number of unknown places within the generation or places outside the analysed area, and its percentage compared to the number of ancestors. No percentage means it is less than 10%%.');
65
+		}
66
+		else{
67
+			$html .= I18N::translate('<strong><em>Place</em> [aa - bb %%]</strong>: The first number indicates the total number of ancestors born in this place, the percentage compares this count to the total number of found places.').'<br />';
68
+			$html .= I18N::translate('Only the %d more frequent places for each generation are displayed.', $max_details_gen);
69
+		}
70
+		$html.= 
71
+			'</div>
72 72
         </div>';
73 73
         
74
-        return $html;
75
-    }
74
+		return $html;
75
+	}
76 76
     
77 77
     
78
-    /**
79
-     * Return the HTML code to display a row with all places found in a generation.
80
-     *
81
-     * @param array $data Data array
82
-     * @param int $analysis_level Level of subdivision of analysis
83
-     * @return string HTML code for all places row
84
-     */
85
-    protected function htmlGenerationAllPlacesRow($data, $analysis_level) {
86
-        $html =
87
-        '<table class="geodispersion_bigrow">
78
+	/**
79
+	 * Return the HTML code to display a row with all places found in a generation.
80
+	 *
81
+	 * @param array $data Data array
82
+	 * @param int $analysis_level Level of subdivision of analysis
83
+	 * @return string HTML code for all places row
84
+	 */
85
+	protected function htmlGenerationAllPlacesRow($data, $analysis_level) {
86
+		$html =
87
+		'<table class="geodispersion_bigrow">
88 88
             <tr>';
89 89
         
90
-        $sum_gen = $data['sum'];
91
-        $unknownother = $data['unknown'] + $data['other'];
92
-        foreach($data['places'] as $placename=> $dataplace){
93
-            $levels = array_map('trim',explode(',', $placename));
94
-            $content = '';
95
-            if(isset($dataplace['flag'])){
96
-                $content .= '<td class="geodispersion_flag">'. FunctionsPrint::htmlPlaceIcon($dataplace['place'], $dataplace['flag']) .'</td><td>';
97
-            }
98
-            else{
99
-                $content .= '<td><span title="'.implode(I18N::$list_separator, array_reverse($levels)).'">'.$levels[$analysis_level-1].'</span><br/>';
100
-            }
101
-            $count = $dataplace['count'];
102
-            $content .= I18N::number($count);
103
-            $perc = Functions::safeDivision($count, $sum_gen + $unknownother);
104
-            $perc2= Functions::safeDivision($count, $sum_gen);
105
-            if($perc2>=0.1) 
106
-                $content.= '<br/><span class="small">('.I18N::percentage($perc2, 1).')</span>';
107
-            $content .= '</td>';
90
+		$sum_gen = $data['sum'];
91
+		$unknownother = $data['unknown'] + $data['other'];
92
+		foreach($data['places'] as $placename=> $dataplace){
93
+			$levels = array_map('trim',explode(',', $placename));
94
+			$content = '';
95
+			if(isset($dataplace['flag'])){
96
+				$content .= '<td class="geodispersion_flag">'. FunctionsPrint::htmlPlaceIcon($dataplace['place'], $dataplace['flag']) .'</td><td>';
97
+			}
98
+			else{
99
+				$content .= '<td><span title="'.implode(I18N::$list_separator, array_reverse($levels)).'">'.$levels[$analysis_level-1].'</span><br/>';
100
+			}
101
+			$count = $dataplace['count'];
102
+			$content .= I18N::number($count);
103
+			$perc = Functions::safeDivision($count, $sum_gen + $unknownother);
104
+			$perc2= Functions::safeDivision($count, $sum_gen);
105
+			if($perc2>=0.1) 
106
+				$content.= '<br/><span class="small">('.I18N::percentage($perc2, 1).')</span>';
107
+			$content .= '</td>';
108 108
                
109
-            $html .= '
109
+			$html .= '
110 110
                 <td class="geodispersion_rowitem" width="'.max(round(100*$perc, 0),1).'%">
111 111
                     <table>
112 112
                         <tr>
@@ -118,46 +118,46 @@  discard block
 block discarded – undo
118 118
                         </tr>
119 119
                     </table>
120 120
                 </td>';
121
-        }
121
+		}
122 122
         
123
-        if($unknownother>0){
124
-            $perc= Functions::safeDivision($unknownother, $sum_gen + $unknownother);
125
-            $html .='<td class="geodispersion_unknownitem left" >'.I18N::number($unknownother);
126
-            if($perc>=0.1) $html.= '<br/><span class="small">('.I18N::percentage($perc, 1).')</span>';
127
-            $html .='</td>';
128
-        }
123
+		if($unknownother>0){
124
+			$perc= Functions::safeDivision($unknownother, $sum_gen + $unknownother);
125
+			$html .='<td class="geodispersion_unknownitem left" >'.I18N::number($unknownother);
126
+			if($perc>=0.1) $html.= '<br/><span class="small">('.I18N::percentage($perc, 1).')</span>';
127
+			$html .='</td>';
128
+		}
129 129
         
130
-        $html .= 
131
-            '</tr>
130
+		$html .= 
131
+			'</tr>
132 132
         </table>';
133
-        return $html;
134
-    }
133
+		return $html;
134
+	}
135 135
     
136 136
 	/**
137 137
 	 * Returns the HTML code fo display a row of the Top Places found for a generation.
138 138
 	 *
139 139
 	 * @param array $data Data array
140
-     * @param int $analysis_level Level of subdivision of analysis
140
+	 * @param int $analysis_level Level of subdivision of analysis
141 141
 	 * @return string HTML code for Top Places row
142 142
 	 */
143
-    protected function htmlGenerationTopPlacesRow($data, $analysis_level) {
144
-        $tmp_places = array();
145
-        $sum_gen = $data['sum'];
146
-        $other = $data['other'];
143
+	protected function htmlGenerationTopPlacesRow($data, $analysis_level) {
144
+		$tmp_places = array();
145
+		$sum_gen = $data['sum'];
146
+		$other = $data['other'];
147 147
         
148
-        foreach($data['places'] as $placename => $count) {
149
-            if($placename != 'other'){
150
-                $levels = array_map('trim',explode(',', $placename));
151
-                $placename = '<span title="'.implode(I18N::$list_separator, array_reverse($levels)).'">'.$levels[$analysis_level-1].'</span>';
152
-            }
153
-            else{
154
-                $placename = I18N::translate('Other places');
155
-            }
156
-            $tmp_places[] = I18N::translate('<strong>%s</strong> [%d - %s]', $placename, $count, I18N::percentage(Functions::safeDivision($count, $sum_gen + $other), 1));         	
157
-        }
148
+		foreach($data['places'] as $placename => $count) {
149
+			if($placename != 'other'){
150
+				$levels = array_map('trim',explode(',', $placename));
151
+				$placename = '<span title="'.implode(I18N::$list_separator, array_reverse($levels)).'">'.$levels[$analysis_level-1].'</span>';
152
+			}
153
+			else{
154
+				$placename = I18N::translate('Other places');
155
+			}
156
+			$tmp_places[] = I18N::translate('<strong>%s</strong> [%d - %s]', $placename, $count, I18N::percentage(Functions::safeDivision($count, $sum_gen + $other), 1));         	
157
+		}
158 158
         
159
-        return implode(I18N::$list_separator, $tmp_places);
160
-    }
159
+		return implode(I18N::$list_separator, $tmp_places);
160
+	}
161 161
     
162 162
 }
163 163
  
164 164
\ No newline at end of file
Please login to merge, or discard this patch.
src/Webtrees/Mvc/Dispatcher.php 1 patch
Indentation   +53 added lines, -53 removed lines patch added patch discarded remove patch
@@ -18,35 +18,35 @@  discard block
 block discarded – undo
18 18
  */
19 19
 class Dispatcher implements DispatcherInterface {
20 20
     
21
-    /**
22
-     * @var Dispatcher $instance Singleton pattern instance
23
-     */
24
-    private static $instance = null;
21
+	/**
22
+	 * @var Dispatcher $instance Singleton pattern instance
23
+	 */
24
+	private static $instance = null;
25 25
     
26
-    /**
27
-     * Returns the *Dispatcher* instance of this class.
28
-     *
29
-     * @return Dispatcher The *Singleton* instance.
30
-     */
31
-    public static function getInstance()
32
-    {
33
-        if (null === static::$instance) {
34
-            static::$instance = new static();
35
-        }
26
+	/**
27
+	 * Returns the *Dispatcher* instance of this class.
28
+	 *
29
+	 * @return Dispatcher The *Singleton* instance.
30
+	 */
31
+	public static function getInstance()
32
+	{
33
+		if (null === static::$instance) {
34
+			static::$instance = new static();
35
+		}
36 36
     
37
-        return static::$instance;
38
-    }    
37
+		return static::$instance;
38
+	}    
39 39
     
40 40
 	/**
41
-     * Protected constructor.
42
-     */
43
-    protected function __construct() {}
41
+	 * Protected constructor.
42
+	 */
43
+	protected function __construct() {}
44 44
     
45
-    /**
46
-     * {@inheritdoc }
47
-     * @see \MyArtJaub\Webtrees\Mvc\DispatcherInterface::handle()
48
-     */
49
-    public function handle(fw\Module\AbstractModule $module, $request) {
45
+	/**
46
+	 * {@inheritdoc }
47
+	 * @see \MyArtJaub\Webtrees\Mvc\DispatcherInterface::handle()
48
+	 */
49
+	public function handle(fw\Module\AbstractModule $module, $request) {
50 50
 		
51 51
 		$fq_modclass_name = get_class($module);
52 52
 		$ctrl_namespace = substr($fq_modclass_name, 0, - strlen('Module')) . '\\';
@@ -66,18 +66,18 @@  discard block
 block discarded – undo
66 66
 		
67 67
 		$ctrl_class = $ctrl_namespace . $ctrl_name . 'Controller';
68 68
 		if(class_exists($ctrl_class) 
69
-		    && is_subclass_of($ctrl_class, '\\MyArtJaub\\Webtrees\\Mvc\\Controller\\MvcController')
69
+			&& is_subclass_of($ctrl_class, '\\MyArtJaub\\Webtrees\\Mvc\\Controller\\MvcController')
70 70
 			&& $ctrl = new $ctrl_class($module) ) {
71 71
 			if(method_exists($ctrl, $method)) {
72
-			    try {
73
-			        call_user_func_array(array($ctrl, $method), array());
74
-			    }
75
-			    catch (MvcException $ex) {
76
-			        if(!headers_sent()) {
77
-			            http_response_code($ex->getHttpCode());
78
-			        }
79
-			        echo $ex->getMessage();			        
80
-			    }
72
+				try {
73
+					call_user_func_array(array($ctrl, $method), array());
74
+				}
75
+				catch (MvcException $ex) {
76
+					if(!headers_sent()) {
77
+						http_response_code($ex->getHttpCode());
78
+					}
79
+					echo $ex->getMessage();			        
80
+				}
81 81
 			}
82 82
 			 else {
83 83
 				 throw new \Exception('The page requested does not exist');
@@ -86,27 +86,27 @@  discard block
 block discarded – undo
86 86
 		 else {
87 87
 			 throw new \Exception('The page requested does not exist');
88 88
 		 }
89
-    }
89
+	}
90 90
 
91
-    /**
92
-     * Private clone method to prevent cloning of the instance of the
93
-     * *Dispatcher* instance.
94
-     *
95
-     * @return void
96
-     */
97
-    private function __clone()
98
-    {
99
-    }
91
+	/**
92
+	 * Private clone method to prevent cloning of the instance of the
93
+	 * *Dispatcher* instance.
94
+	 *
95
+	 * @return void
96
+	 */
97
+	private function __clone()
98
+	{
99
+	}
100 100
     
101
-    /**
102
-     * Private unserialize method to prevent unserializing of the *Dispatcher*
103
-     * instance.
104
-     *
105
-     * @return void
106
-     */
107
-    private function __wakeup()
108
-    {
109
-    }
101
+	/**
102
+	 * Private unserialize method to prevent unserializing of the *Dispatcher*
103
+	 * instance.
104
+	 *
105
+	 * @return void
106
+	 */
107
+	private function __wakeup()
108
+	{
109
+	}
110 110
     
111 111
 }
112 112
 
Please login to merge, or discard this patch.
src/Webtrees/Mvc/MvcException.php 1 patch
Indentation   +41 added lines, -41 removed lines patch added patch discarded remove patch
@@ -16,52 +16,52 @@
 block discarded – undo
16 16
  */
17 17
 class MvcException extends \Exception {
18 18
 
19
-    /** @var int[] $VALID_HTTP List of valid HTTP codes */
20
-    protected static $VALID_HTTP =  array(
21
-        100, 101,
22
-        200, 201, 202, 203, 204, 205, 206,
23
-        300, 301, 302, 303, 304, 305, 306, 307,
24
-        400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417,
25
-        500, 501, 502, 503, 504, 505
26
-    );
19
+	/** @var int[] $VALID_HTTP List of valid HTTP codes */
20
+	protected static $VALID_HTTP =  array(
21
+		100, 101,
22
+		200, 201, 202, 203, 204, 205, 206,
23
+		300, 301, 302, 303, 304, 305, 306, 307,
24
+		400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417,
25
+		500, 501, 502, 503, 504, 505
26
+	);
27 27
     
28
-    /** @var int $http_code */
29
-    protected $http_code;
28
+	/** @var int $http_code */
29
+	protected $http_code;
30 30
     
31
-    /**
32
-     * Constructor for MvcException
33
-     * 
34
-     * @param int $http_code
35
-     * @param string $message
36
-     * @param int $code
37
-     * @param \Throwable $previous
38
-     */
39
-    public function __construct($http_code = 500, $message = "", $code = 0, \Throwable $previous = null) {
40
-        parent::__construct($message, $code, $previous);   
31
+	/**
32
+	 * Constructor for MvcException
33
+	 * 
34
+	 * @param int $http_code
35
+	 * @param string $message
36
+	 * @param int $code
37
+	 * @param \Throwable $previous
38
+	 */
39
+	public function __construct($http_code = 500, $message = "", $code = 0, \Throwable $previous = null) {
40
+		parent::__construct($message, $code, $previous);   
41 41
                 
42
-        $this->http_code = in_array($http_code, self::$VALID_HTTP) ? $http_code : 500;
43
-    }
42
+		$this->http_code = in_array($http_code, self::$VALID_HTTP) ? $http_code : 500;
43
+	}
44 44
     
45
-    /**
46
-     * Get the HTTP code
47
-     * 
48
-     * @return int
49
-     */
50
-    public function getHttpCode() {
51
-        return $this->http_code;
52
-    }
45
+	/**
46
+	 * Get the HTTP code
47
+	 * 
48
+	 * @return int
49
+	 */
50
+	public function getHttpCode() {
51
+		return $this->http_code;
52
+	}
53 53
     
54
-    /**
55
-     * Set the HTTP code
56
-     * 
57
-     * @param int $http_code
58
-     * @throws InvalidArgumentException Thrown if not valid Http code
59
-     */
60
-    public function setHttpCode($http_code) {
61
-        if(!in_array($http_code, self::$VALID_HTTP))
62
-            throw new \InvalidArgumentException('Invalid HTTP code');
63
-        $this->http_code= $http_code;
64
-    }   
54
+	/**
55
+	 * Set the HTTP code
56
+	 * 
57
+	 * @param int $http_code
58
+	 * @throws InvalidArgumentException Thrown if not valid Http code
59
+	 */
60
+	public function setHttpCode($http_code) {
61
+		if(!in_array($http_code, self::$VALID_HTTP))
62
+			throw new \InvalidArgumentException('Invalid HTTP code');
63
+		$this->http_code= $http_code;
64
+	}   
65 65
 
66 66
 }
67 67
 
Please login to merge, or discard this patch.
src/Webtrees/Module/HooksModule.php 1 patch
Indentation   +45 added lines, -45 removed lines patch added patch discarded remove patch
@@ -19,59 +19,59 @@
 block discarded – undo
19 19
  * Hooks Module.
20 20
  */
21 21
 class HooksModule extends AbstractModule implements ModuleConfigInterface, DependentInterface {
22
-    // How to update the database schema for this module
23
-    const SCHEMA_TARGET_VERSION   = 1;
24
-    const SCHEMA_SETTING_NAME     = 'MAJ_HOOKS_SCHEMA_VERSION';
25
-    const SCHEMA_MIGRATION_PREFIX = '\MyArtJaub\Webtrees\Module\Hooks\Schema';
22
+	// How to update the database schema for this module
23
+	const SCHEMA_TARGET_VERSION   = 1;
24
+	const SCHEMA_SETTING_NAME     = 'MAJ_HOOKS_SCHEMA_VERSION';
25
+	const SCHEMA_MIGRATION_PREFIX = '\MyArtJaub\Webtrees\Module\Hooks\Schema';
26 26
     
27
-    /** @var string For custom modules - link for support, upgrades, etc. */
28
-    const CUSTOM_WEBSITE = 'https://github.com/jon48/webtrees-lib';
27
+	/** @var string For custom modules - link for support, upgrades, etc. */
28
+	const CUSTOM_WEBSITE = 'https://github.com/jon48/webtrees-lib';
29 29
     
30
-    /**
31
-     * {@inhericDoc}
32
-     */
33
-    public function getTitle() {
34
-        return /* I18N: Name of the “Hooks” module */ I18N::translate('Hooks');
35
-    }
30
+	/**
31
+	 * {@inhericDoc}
32
+	 */
33
+	public function getTitle() {
34
+		return /* I18N: Name of the “Hooks” module */ I18N::translate('Hooks');
35
+	}
36 36
     
37
-    /**
38
-     * {@inhericDoc}
39
-     */
40
-    public function getDescription() {
41
-        return /* I18N: Description of the “Hooks” module */ I18N::translate('Implements hooks management.');
42
-    }
37
+	/**
38
+	 * {@inhericDoc}
39
+	 */
40
+	public function getDescription() {
41
+		return /* I18N: Description of the “Hooks” module */ I18N::translate('Implements hooks management.');
42
+	}
43 43
     
44
-    /**
45
-     * {@inhericDoc}
46
-     */
47
-    public function modAction($mod_action) {
48
-        Database::updateSchema(self::SCHEMA_MIGRATION_PREFIX, self::SCHEMA_SETTING_NAME, self::SCHEMA_TARGET_VERSION);
44
+	/**
45
+	 * {@inhericDoc}
46
+	 */
47
+	public function modAction($mod_action) {
48
+		Database::updateSchema(self::SCHEMA_MIGRATION_PREFIX, self::SCHEMA_SETTING_NAME, self::SCHEMA_TARGET_VERSION);
49 49
         
50
-        \MyArtJaub\Webtrees\Mvc\Dispatcher::getInstance()->handle($this, $mod_action);
51
-    }
50
+		\MyArtJaub\Webtrees\Mvc\Dispatcher::getInstance()->handle($this, $mod_action);
51
+	}
52 52
     
53
-    /**
54
-     * {@inhericDoc}
55
-     * @see \Fisharebest\Webtrees\Module\ModuleConfigInterface::getConfigLink()
56
-     */
57
-    public function getConfigLink() {
58
-        Database::updateSchema(self::SCHEMA_MIGRATION_PREFIX, self::SCHEMA_SETTING_NAME, self::SCHEMA_TARGET_VERSION);
53
+	/**
54
+	 * {@inhericDoc}
55
+	 * @see \Fisharebest\Webtrees\Module\ModuleConfigInterface::getConfigLink()
56
+	 */
57
+	public function getConfigLink() {
58
+		Database::updateSchema(self::SCHEMA_MIGRATION_PREFIX, self::SCHEMA_SETTING_NAME, self::SCHEMA_TARGET_VERSION);
59 59
         
60
-        return 'module.php?mod=' . $this->getName() . '&amp;mod_action=AdminConfig';
61
-    }
60
+		return 'module.php?mod=' . $this->getName() . '&amp;mod_action=AdminConfig';
61
+	}
62 62
     
63
-    /**
64
-     * {@inheritDoc}
65
-     * @see \MyArtJaub\Webtrees\Module\DependentInterface::validatePrerequisites()
66
-     */
67
-    public function validatePrerequisites() {
68
-        try {
69
-            Database::updateSchema(self::SCHEMA_MIGRATION_PREFIX, self::SCHEMA_SETTING_NAME, self::SCHEMA_TARGET_VERSION);
70
-            return true;
71
-        }
72
-        catch (\Exception $ex) { }
73
-        return false;
74
-    }
63
+	/**
64
+	 * {@inheritDoc}
65
+	 * @see \MyArtJaub\Webtrees\Module\DependentInterface::validatePrerequisites()
66
+	 */
67
+	public function validatePrerequisites() {
68
+		try {
69
+			Database::updateSchema(self::SCHEMA_MIGRATION_PREFIX, self::SCHEMA_SETTING_NAME, self::SCHEMA_TARGET_VERSION);
70
+			return true;
71
+		}
72
+		catch (\Exception $ex) { }
73
+		return false;
74
+	}
75 75
     
76 76
 
77 77
 }
Please login to merge, or discard this patch.
src/Webtrees/Module/Sosa/Views/SosaConfigView.php 1 patch
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -24,9 +24,9 @@  discard block
 block discarded – undo
24 24
 	 * {@inhericDoc}
25 25
 	 * @see \MyArtJaub\Webtrees\Mvc\View\AbstractView::renderContent()
26 26
 	 */
27
-    protected function renderContent() {
27
+	protected function renderContent() {
28 28
         
29
-        ?>        
29
+		?>        
30 30
         
31 31
         <div id="maj-sosa-config-page">
32 32
 			<h2><?php echo $this->data->get('title'); ?></h2>
@@ -46,9 +46,9 @@  discard block
 block discarded – undo
46 46
         			</div>
47 47
         			<div class="value">
48 48
         				<?php 
49
-        				    $users = $this->data->get('users_settings');
50
-        				    if(count($users) == 1) {
51
-        				        $root_indi = $users[0]['rootid'];  ?>
49
+							$users = $this->data->get('users_settings');
50
+							if(count($users) == 1) {
51
+								$root_indi = $users[0]['rootid'];  ?>
52 52
         					<label>
53 53
         						<input id="maj_sosa_input_userid" type="hidden" name="userid" value="<?php echo $users[0]['user']->getUserId(); ?>" />
54 54
         						<?php echo $users[0]['user']->getRealNameHtml() ?>
@@ -56,8 +56,8 @@  discard block
 block discarded – undo
56 56
         				<?php  } else if(count($users) > 1) { ?>
57 57
         					<select id='maj-sosa-config-select' name="userid">
58 58
         					<?php 
59
-        					   $root_indi = $users[0]['rootid'];
60
-        					   foreach ($this->data->get('users_settings') as $user) { ?>
59
+							   $root_indi = $users[0]['rootid'];
60
+							   foreach ($this->data->get('users_settings') as $user) { ?>
61 61
         						<option value="<?php echo $user['user']->getUserId(); ?>"><?php echo $user['user']->getRealNameHtml() ?></option>
62 62
         					<?php  } ?>
63 63
         					</select>
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
 			</form>	
81 81
 		
82 82
 		<?php        
83
-    }
83
+	}
84 84
     
85 85
 }
86 86
  
87 87
\ No newline at end of file
Please login to merge, or discard this patch.
src/Webtrees/Controller/JsonController.php 1 patch
Indentation   +41 added lines, -41 removed lines patch added patch discarded remove patch
@@ -18,50 +18,50 @@
 block discarded – undo
18 18
  */
19 19
 class JsonController extends BaseController {
20 20
     
21
-    /**
22
-     * {@inheritDoc}
23
-     * @see \Fisharebest\Webtrees\Controller\BaseController::pageHeader()
24
-     */
25
-    public function pageHeader() {        
26
-        header('Content-Type: application/json');
27
-        header('Cache-Control: no-cache, must-revalidate');
28
-        header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
29
-        // We've displayed the header - display the footer automatically
30
-        register_shutdown_function(array($this, 'pageFooter'));
21
+	/**
22
+	 * {@inheritDoc}
23
+	 * @see \Fisharebest\Webtrees\Controller\BaseController::pageHeader()
24
+	 */
25
+	public function pageHeader() {        
26
+		header('Content-Type: application/json');
27
+		header('Cache-Control: no-cache, must-revalidate');
28
+		header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
29
+		// We've displayed the header - display the footer automatically
30
+		register_shutdown_function(array($this, 'pageFooter'));
31 31
         
32
-        return $this;
33
-    }
32
+		return $this;
33
+	}
34 34
     
35
-    /**
36
-     * {@inheritDoc}
37
-     * @see \Fisharebest\Webtrees\Controller\BaseController::pageFooter()
38
-     */
39
-    public function pageFooter() {
40
-        return $this;
41
-    }
35
+	/**
36
+	 * {@inheritDoc}
37
+	 * @see \Fisharebest\Webtrees\Controller\BaseController::pageFooter()
38
+	 */
39
+	public function pageFooter() {
40
+		return $this;
41
+	}
42 42
     
43
-    /**
44
-     * Restrict access.
45
-     *
46
-     * @param bool $condition
47
-     *
48
-     * @return $this
49
-     */
50
-    public function restrictAccess($condition) {
51
-        if ($condition !== true) {
52
-            throw new MvcException(403);
53
-        }
43
+	/**
44
+	 * Restrict access.
45
+	 *
46
+	 * @param bool $condition
47
+	 *
48
+	 * @return $this
49
+	 */
50
+	public function restrictAccess($condition) {
51
+		if ($condition !== true) {
52
+			throw new MvcException(403);
53
+		}
54 54
     
55
-        return $this;
56
-    }
55
+		return $this;
56
+	}
57 57
     
58
-    /**
59
-     * Encode the data to JSON format.
60
-     * 
61
-     * @param array $data Data to encode
62
-     * @param number $options JSON options mask. See http://php.net/manual/fr/json.constants.php
63
-     */
64
-    public function encode(array $data, $options = 0) {
65
-        echo json_encode($data, $options);
66
-    }
58
+	/**
59
+	 * Encode the data to JSON format.
60
+	 * 
61
+	 * @param array $data Data to encode
62
+	 * @param number $options JSON options mask. See http://php.net/manual/fr/json.constants.php
63
+	 */
64
+	public function encode(array $data, $options = 0) {
65
+		echo json_encode($data, $options);
66
+	}
67 67
 }
Please login to merge, or discard this patch.
src/Webtrees/Functions/FunctionsPrintLists.php 1 patch
Indentation   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -17,27 +17,27 @@
 block discarded – undo
17 17
  */
18 18
 class FunctionsPrintLists {
19 19
     
20
-    /**
21
-     * Copy of core function, which is not public.
22
-     *
23
-     * @param Individual $individual
24
-     *
25
-     * @return string[]
26
-     * @see \Fisharebest\Webtrees\Functions\FunctionsPrintLists
27
-     */
28
-    public static function sortableNames(Individual $individual) {
29
-        $names   = $individual->getAllNames();
30
-        $primary = $individual->getPrimaryName();
20
+	/**
21
+	 * Copy of core function, which is not public.
22
+	 *
23
+	 * @param Individual $individual
24
+	 *
25
+	 * @return string[]
26
+	 * @see \Fisharebest\Webtrees\Functions\FunctionsPrintLists
27
+	 */
28
+	public static function sortableNames(Individual $individual) {
29
+		$names   = $individual->getAllNames();
30
+		$primary = $individual->getPrimaryName();
31 31
 
32
-        list($surn, $givn) = explode(',', $names[$primary]['sort']);
32
+		list($surn, $givn) = explode(',', $names[$primary]['sort']);
33 33
 
34
-        $givn = str_replace('@P.N.', 'AAAA', $givn);
35
-        $surn = str_replace('@N.N.', 'AAAA', $surn);
34
+		$givn = str_replace('@P.N.', 'AAAA', $givn);
35
+		$surn = str_replace('@N.N.', 'AAAA', $surn);
36 36
 
37
-        return array(
38
-            $surn . 'AAAA' . $givn,
39
-            $givn . 'AAAA' . $surn,
40
-        );
41
-    }
37
+		return array(
38
+			$surn . 'AAAA' . $givn,
39
+			$givn . 'AAAA' . $surn,
40
+		);
41
+	}
42 42
 
43 43
 }
44 44
\ No newline at end of file
Please login to merge, or discard this patch.
src/Webtrees/Module/Certificates/Views/CertificatesListView.php 1 patch
Indentation   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -24,12 +24,12 @@  discard block
 block discarded – undo
24 24
 	 * {@inhericDoc}
25 25
 	 * @see \MyArtJaub\Webtrees\Mvc\View\AbstractView::renderContent()
26 26
 	 */
27
-    protected function renderContent() {
27
+	protected function renderContent() {
28 28
         
29
-        $cities = $this->data->get('cities');
30
-        $selected_city = $this->data->get('selected_city');
29
+		$cities = $this->data->get('cities');
30
+		$selected_city = $this->data->get('selected_city');
31 31
         
32
-        ?>                
32
+		?>                
33 33
         <div id="maj-cert-list-page" class="center">
34 34
 			<h2><?= $this->data->get('title') ?></h2>
35 35
 			
@@ -58,8 +58,8 @@  discard block
 block discarded – undo
58 58
     				</thead>
59 59
     				<tbody>
60 60
     				<?php foreach ($this->data->get('certificate_list') as $certificate) { 
61
-    				    /** @var \MyArtJaub\Webtrees\Module\Certificates\Model\Certificate $certificate */
62
-    				    ?>
61
+						/** @var \MyArtJaub\Webtrees\Module\Certificates\Model\Certificate $certificate */
62
+						?>
63 63
     					<tr>
64 64
     						<!-- Certificate date -->
65 65
     						<?php if($date = $certificate->getCertificateDate()) { ?>
@@ -71,12 +71,12 @@  discard block
 block discarded – undo
71 71
     						<td><?= Filter::escapeHtml($certificate->getCertificateType() ?: '') ?></td>
72 72
     						<!--  Certificate Name -->
73 73
     						<?php 
74
-    						$name = $certificate->getCertificateDetails() ?: '';
75
-    						$sortname = "";
76
-    						$ct_names=preg_match("/([A-Z]{2,})/", $name, $match);
77
-    						if($ct_names > 0) $sortname = $match[1].'_';
78
-    						$sortname .= $name;
79
-    						?>
74
+							$name = $certificate->getCertificateDetails() ?: '';
75
+							$sortname = "";
76
+							$ct_names=preg_match("/([A-Z]{2,})/", $name, $match);
77
+							if($ct_names > 0) $sortname = $match[1].'_';
78
+							$sortname .= $name;
79
+							?>
80 80
     						<td data-sort="<?= Filter::escapeHtml($sortname) ?>">
81 81
     							<a href="<?= $certificate->getHtmlUrl() ?>"><?= Filter::escapeHtml($name) ?></a>
82 82
     						</td>
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
     	</div>
90 90
     	
91 91
     	<?php 
92
-    }
92
+	}
93 93
     
94 94
 }
95 95
  
96 96
\ No newline at end of file
Please login to merge, or discard this patch.
src/Webtrees/Hook/HookInterfaces/RecordNameTextExtenderInterface.php 1 patch
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -1,13 +1,13 @@
 block discarded – undo
1 1
 <?php
2 2
  /**
3
- * webtrees-lib: MyArtJaub library for webtrees
4
- *
5
- * @package MyArtJaub\Webtrees
6
- * @subpackage Hook
7
- * @author Jonathan Jaubart <[email protected]>
8
- * @copyright Copyright (c) 2011-2016, Jonathan Jaubart
9
- * @license http://www.gnu.org/licenses/gpl.html GNU General Public License, version 3
10
- */
3
+  * webtrees-lib: MyArtJaub library for webtrees
4
+  *
5
+  * @package MyArtJaub\Webtrees
6
+  * @subpackage Hook
7
+  * @author Jonathan Jaubart <[email protected]>
8
+  * @copyright Copyright (c) 2011-2016, Jonathan Jaubart
9
+  * @license http://www.gnu.org/licenses/gpl.html GNU General Public License, version 3
10
+  */
11 11
 namespace MyArtJaub\Webtrees\Hook\HookInterfaces;
12 12
 
13 13
 use Fisharebest\Webtrees\GedcomRecord;
Please login to merge, or discard this patch.