Completed
Push — feature/controller ( a96d08...2ac518 )
by René
02:38
created
src/Model/Table/Exception/TableNameNotDefinedException.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -9,8 +9,7 @@  discard block
 block discarded – undo
9 9
  *
10 10
  * @package Zortje\MVC\Model\Table\Exception
11 11
  */
12
-class TableNameNotDefinedException extends Exception
13
-{
12
+class TableNameNotDefinedException extends Exception {
14 13
 
15 14
     /**
16 15
      * {@inheritdoc}
@@ -20,8 +19,7 @@  discard block
 block discarded – undo
20 19
     /**
21 20
      * {@inheritdoc}
22 21
      */
23
-    public function __construct($message)
24
-    {
22
+    public function __construct($message) {
25 23
         parent::__construct($message);
26 24
     }
27 25
 }
Please login to merge, or discard this patch.
src/Model/User.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -9,7 +9,6 @@
 block discarded – undo
9 9
  *
10 10
  * @package Zortje\MVC\Model
11 11
  */
12
-class User extends Entity
13
-{
12
+class User extends Entity {
14 13
 
15 14
 }
Please login to merge, or discard this patch.
src/Network/Request.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -7,8 +7,7 @@  discard block
 block discarded – undo
7 7
  *
8 8
  * @package Zortje\MVC\Network
9 9
  */
10
-class Request
11
-{
10
+class Request {
12 11
 
13 12
     /**
14 13
      * @var string Full URL
@@ -25,8 +24,7 @@  discard block
 block discarded – undo
25 24
      *
26 25
      * @return string URL path
27 26
      */
28
-    public function getPath()
29
-    {
27
+    public function getPath() {
30 28
         $path = parse_url($this->url, PHP_URL_PATH);
31 29
 
32 30
         if ($path === false) {
@@ -40,8 +38,7 @@  discard block
 block discarded – undo
40 38
      * @param string $url  URL of the request, trailing slash are removed automatically
41 39
      * @param array  $post URL post fields
42 40
      */
43
-    public function __construct($url, array $post)
44
-    {
41
+    public function __construct($url, array $post) {
45 42
         $this->url  = rtrim($url, '/');
46 43
         $this->post = $post;
47 44
     }
Please login to merge, or discard this patch.
src/Network/Response.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -7,8 +7,7 @@  discard block
 block discarded – undo
7 7
  *
8 8
  * @package Zortje\MVC\Network
9 9
  */
10
-class Response
11
-{
10
+class Response {
12 11
 
13 12
     /**
14 13
      * @var array HTTP headers
@@ -23,8 +22,7 @@  discard block
 block discarded – undo
23 22
     /**
24 23
      * @return array
25 24
      */
26
-    public function output()
27
-    {
25
+    public function output() {
28 26
         return [
29 27
             'headers' => $this->headers,
30 28
             'output'  => $this->output
@@ -35,8 +33,7 @@  discard block
 block discarded – undo
35 33
      * @param array  $headers
36 34
      * @param string $output
37 35
      */
38
-    public function __construct($headers, $output)
39
-    {
36
+    public function __construct($headers, $output) {
40 37
         $this->headers = $headers;
41 38
         $this->output  = $output;
42 39
     }
Please login to merge, or discard this patch.
src/Routing/Dispatcher.php 1 patch
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -20,8 +20,7 @@  discard block
 block discarded – undo
20 20
  *
21 21
  * @package Zortje\MVC\Routing
22 22
  */
23
-class Dispatcher
24
-{
23
+class Dispatcher {
25 24
 
26 25
     /**
27 26
      * @var Router
@@ -53,8 +52,7 @@  discard block
 block discarded – undo
53 52
      *
54 53
      * @param Logger $logger
55 54
      */
56
-    public function setLogger(Logger $logger)
57
-    {
55
+    public function setLogger(Logger $logger) {
58 56
         $this->logger = $logger;
59 57
     }
60 58
 
@@ -65,8 +63,7 @@  discard block
 block discarded – undo
65 63
      *
66 64
      * @throws \Exception If unexpected exception is thrown
67 65
      */
68
-    public function dispatch(Request $request)
69
-    {
66
+    public function dispatch(Request $request) {
70 67
         $controllerFactory = new ControllerFactory($this->pdo, $this->appPath, $this->user);
71 68
 
72 69
         try {
@@ -190,8 +187,7 @@  discard block
 block discarded – undo
190 187
      * @param string    $appPath
191 188
      * @param null|User $user
192 189
      */
193
-    public function __construct(Router $router, \PDO $pdo, $appPath, User $user = null)
194
-    {
190
+    public function __construct(Router $router, \PDO $pdo, $appPath, User $user = null) {
195 191
         $this->router  = $router;
196 192
         $this->pdo     = $pdo;
197 193
         $this->appPath = $appPath;
Please login to merge, or discard this patch.
src/Routing/Exception/RouteAlreadyConnectedException.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -9,8 +9,7 @@  discard block
 block discarded – undo
9 9
  *
10 10
  * @package Zortje\MVC\Routing\Exception
11 11
  */
12
-class RouteAlreadyConnectedException extends Exception
13
-{
12
+class RouteAlreadyConnectedException extends Exception {
14 13
 
15 14
     /**
16 15
      * {@inheritdoc}
@@ -20,8 +19,7 @@  discard block
 block discarded – undo
20 19
     /**
21 20
      * {@inheritdoc}
22 21
      */
23
-    public function __construct($message)
24
-    {
22
+    public function __construct($message) {
25 23
         parent::__construct($message);
26 24
     }
27 25
 }
Please login to merge, or discard this patch.
src/Routing/Exception/RouteNonexistentException.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -9,8 +9,7 @@  discard block
 block discarded – undo
9 9
  *
10 10
  * @package Zortje\MVC\Routing\Exception
11 11
  */
12
-class RouteNonexistentException extends Exception
13
-{
12
+class RouteNonexistentException extends Exception {
14 13
 
15 14
     /**
16 15
      * {@inheritdoc}
@@ -20,8 +19,7 @@  discard block
 block discarded – undo
20 19
     /**
21 20
      * {@inheritdoc}
22 21
      */
23
-    public function __construct($message)
24
-    {
22
+    public function __construct($message) {
25 23
         parent::__construct($message);
26 24
     }
27 25
 }
Please login to merge, or discard this patch.
src/Routing/Router.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -10,8 +10,7 @@  discard block
 block discarded – undo
10 10
  *
11 11
  * @package Zortje\MVC\Routing
12 12
  */
13
-class Router
14
-{
13
+class Router {
15 14
 
16 15
     /**
17 16
      * @var array Routes
@@ -27,8 +26,7 @@  discard block
 block discarded – undo
27 26
      *
28 27
      * @throws RouteAlreadyConnectedException When route is already connected
29 28
      */
30
-    public function connect($route, $controller, $action)
31
-    {
29
+    public function connect($route, $controller, $action) {
32 30
         if (isset($this->routes[$route]) === true) {
33 31
             throw new RouteAlreadyConnectedException([$route]);
34 32
         }
@@ -48,8 +46,7 @@  discard block
 block discarded – undo
48 46
      *
49 47
      * @throws RouteNonexistentException When route is not connected
50 48
      */
51
-    public function route($route)
52
-    {
49
+    public function route($route) {
53 50
         if (isset($this->routes[$route]) === false) {
54 51
             throw new RouteNonexistentException([$route]);
55 52
         }
Please login to merge, or discard this patch.