Completed
Push — master ( b0071f...70260c )
by Jacob
03:06
created
controller/portfolio/DefaultPageController.class.inc.php 1 patch
Indentation   +52 added lines, -52 removed lines patch added patch discarded remove patch
@@ -5,56 +5,56 @@
 block discarded – undo
5 5
 abstract class DefaultPageController extends PageController
6 6
 {
7 7
 
8
-    public function __construct()
9
-    {
10
-        parent::__construct();
11
-
12
-        $this->add_css('reset');
13
-        $this->add_css('portfolio', 4);
14
-    }
15
-
16
-    protected function set_body_data()
17
-    {
18
-        $this->set_body('header_data', [
19
-            'menu' => $this->get_menu(),
20
-            'home_link' => Loader::getRootURL(),
21
-        ]);
22
-        $this->set_body('activity_array', $this->get_recent_activity());
23
-
24
-        $this->set_body_view('Page');
25
-    }
26
-
27
-    protected function get_menu()
28
-    {
29
-        $menu = [
30
-            [
31
-                'name' => 'About',
32
-                'link' => Loader::getRootURL(),
33
-            ],
34
-            [
35
-                'name' => 'Projects',
36
-                'link' => Loader::getRootURL() . 'projects/',
37
-            ],
38
-            [
39
-                'name' => 'Résumé',
40
-                'link' => Loader::getRootURL() . 'resume/',
41
-            ],
42
-            [
43
-                'name' => 'Contact',
44
-                'link' => Loader::getRootURL() . 'contact/',
45
-            ],
46
-        ];
47
-
48
-        if (!URLDecode::getPiece(1)) {
49
-            $active_page = 'About';
50
-        } else {
51
-            $active_page = ucfirst(URLDecode::getPiece(1));
52
-        }
53
-
54
-        return array_map(function ($row) use ($active_page) {
55
-            $row = (object) $row;
56
-            $row->active = ($row->name == $active_page);
57
-            return $row;
58
-        }, $menu);
59
-    }
8
+	public function __construct()
9
+	{
10
+		parent::__construct();
11
+
12
+		$this->add_css('reset');
13
+		$this->add_css('portfolio', 4);
14
+	}
15
+
16
+	protected function set_body_data()
17
+	{
18
+		$this->set_body('header_data', [
19
+			'menu' => $this->get_menu(),
20
+			'home_link' => Loader::getRootURL(),
21
+		]);
22
+		$this->set_body('activity_array', $this->get_recent_activity());
23
+
24
+		$this->set_body_view('Page');
25
+	}
26
+
27
+	protected function get_menu()
28
+	{
29
+		$menu = [
30
+			[
31
+				'name' => 'About',
32
+				'link' => Loader::getRootURL(),
33
+			],
34
+			[
35
+				'name' => 'Projects',
36
+				'link' => Loader::getRootURL() . 'projects/',
37
+			],
38
+			[
39
+				'name' => 'Résumé',
40
+				'link' => Loader::getRootURL() . 'resume/',
41
+			],
42
+			[
43
+				'name' => 'Contact',
44
+				'link' => Loader::getRootURL() . 'contact/',
45
+			],
46
+		];
47
+
48
+		if (!URLDecode::getPiece(1)) {
49
+			$active_page = 'About';
50
+		} else {
51
+			$active_page = ucfirst(URLDecode::getPiece(1));
52
+		}
53
+
54
+		return array_map(function ($row) use ($active_page) {
55
+			$row = (object) $row;
56
+			$row->active = ($row->name == $active_page);
57
+			return $row;
58
+		}, $menu);
59
+	}
60 60
 }
Please login to merge, or discard this patch.