Passed
Branch master (93b6ae)
by refat
12:48
created

Middleware   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Importance

Changes 1
Bugs 1 Features 0
Metric Value
eloc 4
c 1
b 1
f 0
dl 0
loc 23
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A __get() 0 3 1
1
<?php
2
3
namespace System;
4
5
abstract class Middleware
6
{
7
  /**
8
   * Application Object
9
   *
10
   * @var \System\Application
11
   */
12
  protected $app;
13
14
  public function __construct(Application $app)
15
  {
16
    $this->app = $app;
17
  }
18
19
  /**
20
   * Call shared Application Objects dynamically
21
   *
22
   * @param string $key
23
   * @return mixed
24
   */
25
  public function __get($key)
26
  {
27
    return $this->app->get($key);
28
  }
29
}
30