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

Middleware::__get()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 1 Features 0
Metric Value
cc 1
eloc 1
c 1
b 1
f 0
nc 1
nop 1
dl 0
loc 3
rs 10
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