@@ -36,10 +36,10 @@ discard block  | 
                                                    ||
| 36 | 36 |      { | 
                                                        
| 37 | 37 |          echo("<h1>$title - Couses123</h1>"); | 
                                                        
| 38 | 38 |          echo("<div style='display: flex'>"); | 
                                                        
| 39 | -        echo("<div style='margin-right: 10px'><a href='". URL_BASE . "/'>Home</a></div>"); | 
                                                        |
| 40 | -        echo("<div style='margin-right: 10px'><a href='". URL_BASE . "/courses'>Courses</a></div>"); | 
                                                        |
| 41 | -        echo("<div style='margin-right: 10px'><a href='". URL_BASE . "/about'>About</a></div>"); | 
                                                        |
| 42 | -        echo("<div style='margin-right: 10px'><a href='". URL_BASE . "/contact'>Contact</a></div>"); | 
                                                        |
| 39 | +        echo("<div style='margin-right: 10px'><a href='" . URL_BASE . "/'>Home</a></div>"); | 
                                                        |
| 40 | +        echo("<div style='margin-right: 10px'><a href='" . URL_BASE . "/courses'>Courses</a></div>"); | 
                                                        |
| 41 | +        echo("<div style='margin-right: 10px'><a href='" . URL_BASE . "/about'>About</a></div>"); | 
                                                        |
| 42 | +        echo("<div style='margin-right: 10px'><a href='" . URL_BASE . "/contact'>Contact</a></div>"); | 
                                                        |
| 43 | 43 |          echo("</div>"); | 
                                                        
| 44 | 44 |          echo("<hr/>"); | 
                                                        
| 45 | 45 | }  | 
                                                        
@@ -52,8 +52,8 @@ discard block  | 
                                                    ||
| 52 | 52 | |
| 53 | 53 | public function getCourse($id)  | 
                                                        
| 54 | 54 |      { | 
                                                        
| 55 | -        foreach($this->cousers as $course) { | 
                                                        |
| 56 | -            if(array_key_exists('id', $course) && $course['id'] == $id) return $course; | 
                                                        |
| 55 | +        foreach ($this->cousers as $course) { | 
                                                        |
| 56 | +            if (array_key_exists('id', $course) && $course['id'] == $id) return $course; | 
                                                        |
| 57 | 57 | }  | 
                                                        
| 58 | 58 | return null;  | 
                                                        
| 59 | 59 | }  | 
                                                        
@@ -91,10 +91,10 @@ discard block  | 
                                                    ||
| 91 | 91 |          $this->header("Courses"); | 
                                                        
| 92 | 92 |          echo("<h2>Page Courses</h2>"); | 
                                                        
| 93 | 93 | |
| 94 | -        echo("<div style='margin-right: 10px'>COURSE: <a href='". URL_BASE . "/course/2101'>Course HTML</a></div>"); | 
                                                        |
| 95 | -        echo("<div style='margin-right: 10px'>COURSE: <a href='". URL_BASE . "/course/2102'>Course CSS</a></div>"); | 
                                                        |
| 96 | -        echo("<div style='margin-right: 10px'>COURSE: <a href='". URL_BASE . "/course/2103'>Course JavaScript</a></div>"); | 
                                                        |
| 97 | -        echo("<div style='margin-right: 10px'>COURSE: <a href='". URL_BASE . "/course/2104'>Course PHP</a></div>"); | 
                                                        |
| 94 | +        echo("<div style='margin-right: 10px'>COURSE: <a href='" . URL_BASE . "/course/2101'>Course HTML</a></div>"); | 
                                                        |
| 95 | +        echo("<div style='margin-right: 10px'>COURSE: <a href='" . URL_BASE . "/course/2102'>Course CSS</a></div>"); | 
                                                        |
| 96 | +        echo("<div style='margin-right: 10px'>COURSE: <a href='" . URL_BASE . "/course/2103'>Course JavaScript</a></div>"); | 
                                                        |
| 97 | +        echo("<div style='margin-right: 10px'>COURSE: <a href='" . URL_BASE . "/course/2104'>Course PHP</a></div>"); | 
                                                        |
| 98 | 98 | |
| 99 | 99 |          echo("<p>Lorem ipsum dolor sit, amet consectetur adipisicing elit. Aut doloribus esse ea est itaque enim tenetur vero nulla in ut eius qui, veritatis nam, nisi labore aliquam sequi aspernatur ducimus.</p>"); | 
                                                        
| 100 | 100 |          echo("<p>Lorem ipsum dolor, sit amet consectetur adipisicing elit. Veniam exercitationem, vel at officia sed quos. In ea et vitae cupiditate a nobis excepturi! Illum porro eius iusto ducimus, deserunt dolorem.</p>"); | 
                                                        
@@ -108,12 +108,12 @@ discard block  | 
                                                    ||
| 108 | 108 | |
| 109 | 109 |          $this->header("Courses"); | 
                                                        
| 110 | 110 | |
| 111 | -        if($course !== null){ | 
                                                        |
| 111 | +        if ($course !== null) { | 
                                                        |
| 112 | 112 |              echo("<h2>" . $course['title'] . "</h2>"); | 
                                                        
| 113 | - echo "<p>". $course['description'] ."</p>";  | 
                                                        |
| 113 | + echo "<p>" . $course['description'] . "</p>";  | 
                                                        |
| 114 | 114 | echo "<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. A nihil ea molestiae, labore eligendi neque doloremque ab odit, harum officia deserunt, perspiciatis cupiditate pariatur. Eum harum mollitia dolor nam a.</p>";  | 
                                                        
| 115 | 115 |          } else { | 
                                                        
| 116 | -            header("Location: ". URL_BASE ."/error/404"); | 
                                                        |
| 116 | +            header("Location: " . URL_BASE . "/error/404"); | 
                                                        |
| 117 | 117 | }  | 
                                                        
| 118 | 118 | $this->footer();  | 
                                                        
| 119 | 119 | }  | 
                                                        
@@ -53,7 +53,9 @@  | 
                                                    ||
| 53 | 53 | public function getCourse($id)  | 
                                                        
| 54 | 54 |      { | 
                                                        
| 55 | 55 |          foreach($this->cousers as $course) { | 
                                                        
| 56 | -            if(array_key_exists('id', $course) && $course['id'] == $id) return $course; | 
                                                        |
| 56 | +            if(array_key_exists('id', $course) && $course['id'] == $id) { | 
                                                        |
| 57 | + return $course;  | 
                                                        |
| 58 | + }  | 
                                                        |
| 57 | 59 | }  | 
                                                        
| 58 | 60 | return null;  | 
                                                        
| 59 | 61 | }  |