Completed
Push — master ( 658920...8dc597 )
by Andrey
02:37
created
Application.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -7,23 +7,23 @@
 block discarded – undo
7 7
     private static $config;
8 8
     private static $application = [];
9 9
 
10
-    public function __construct(){
10
+    public function __construct() {
11 11
         self::$config = (new Config)->get();
12 12
     }
13 13
 
14
-    public function __get($name){
15
-        array_push(self::$application,$name);
14
+    public function __get($name) {
15
+        array_push(self::$application, $name);
16 16
         return (new self);
17 17
     }
18 18
 
19
-    public function __call($name,$value){
20
-        array_push(self::$application,$name);
21
-        $file = implode('/',self::$application);
19
+    public function __call($name, $value) {
20
+        array_push(self::$application, $name);
21
+        $file = implode('/', self::$application);
22 22
         $file = self::$config['core']['apps'].'/'.$file.'.php';
23 23
         self::$application = [];
24
-        if(is_file($file)) {
24
+        if (is_file($file)) {
25 25
             $result = require($file);
26
-            if(is_callable($result)) $result = call_user_func_array($result,$value);
26
+            if (is_callable($result)) $result = call_user_func_array($result, $value);
27 27
             return $result;
28 28
         }
29 29
     }
Please login to merge, or discard this patch.
Config.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -5,11 +5,11 @@
 block discarded – undo
5 5
 
6 6
     public static $config = [];
7 7
 
8
-    public function __construct($config=[]){
9
-        self::$config = array_merge(self::$config,$config);
8
+    public function __construct($config = []) {
9
+        self::$config = array_merge(self::$config, $config);
10 10
     }    
11 11
 
12
-    public function get(){
12
+    public function get() {
13 13
         return self::$config;
14 14
     }
15 15
 
Please login to merge, or discard this patch.
Css.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -7,31 +7,31 @@
 block discarded – undo
7 7
     private static $host;
8 8
     private static $config;   
9 9
 
10
-    public function __construct(){
10
+    public function __construct() {
11 11
         # Config
12 12
         self::$config = (new Config)->get();
13 13
         # Host
14 14
         self::$host = parse_url('http://'.$_SERVER['HTTP_HOST']);
15
-        if(isset(self::$host['host'])) self::$host = self::$host['host'];
15
+        if (isset(self::$host['host'])) self::$host = self::$host['host'];
16 16
         else self::$host = '/';
17 17
     }
18 18
 
19
-    public function add($css){
20
-        if(!is_array($css)) $css = [$css];
21
-        self::$list = array_merge(self::$list,$css);
19
+    public function add($css) {
20
+        if (!is_array($css)) $css = [$css];
21
+        self::$list = array_merge(self::$list, $css);
22 22
     }
23 23
 
24
-    public function get(){
24
+    public function get() {
25 25
         $css = array_unique(self::$list);
26 26
         $code = '';
27
-        foreach($css as $name){
27
+        foreach ($css as $name) {
28 28
             $file = self::$config['core']['css'].'/'.$name.'.css';
29
-            if(is_file($file)) $code .= file_get_contents($file);
29
+            if (is_file($file)) $code .= file_get_contents($file);
30 30
         }
31 31
         return "<style>$code</style>";
32 32
     }
33 33
 
34
-    public function compile(){
34
+    public function compile() {
35 35
         # ...
36 36
     }
37 37
 
Please login to merge, or discard this patch.
Description.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -5,19 +5,19 @@
 block discarded – undo
5 5
 
6 6
     private static $memory = [];
7 7
 
8
-    public function add($title){
9
-        if(!is_array($title)) $title = [$title];
10
-        self::$memory = array_merge(self::$memory,$title);
8
+    public function add($title) {
9
+        if (!is_array($title)) $title = [$title];
10
+        self::$memory = array_merge(self::$memory, $title);
11 11
         return $this;
12 12
     }
13 13
 
14
-    public function get(){
14
+    public function get() {
15 15
         self::$memory = array_reverse(self::$memory);
16
-        foreach(self::$memory as $key=>$value){
16
+        foreach (self::$memory as $key=>$value) {
17 17
             $value = urldecode($value);
18 18
             self::$memory[$key] = $value;
19 19
         }
20
-        return '<meta name="description" content="'.implode(' ',self::$memory).'">';
20
+        return '<meta name="description" content="'.implode(' ', self::$memory).'">';
21 21
     }
22 22
 
23 23
 }
Please login to merge, or discard this patch.
Keywords.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -5,19 +5,19 @@
 block discarded – undo
5 5
 
6 6
     private static $memory = [];
7 7
 
8
-    public function add($title){
9
-        if(!is_array($title)) $title = [$title];
10
-        self::$memory = array_merge(self::$memory,$title);
8
+    public function add($title) {
9
+        if (!is_array($title)) $title = [$title];
10
+        self::$memory = array_merge(self::$memory, $title);
11 11
         return $this;
12 12
     }
13 13
 
14
-    public function get(){
14
+    public function get() {
15 15
         self::$memory = array_reverse(self::$memory);
16
-        foreach(self::$memory as $key=>$value){
16
+        foreach (self::$memory as $key=>$value) {
17 17
             $value = urldecode($value);
18 18
             self::$memory[$key] = $value;
19 19
         }
20
-        return '<meta name="keywords" content="'.implode(',',self::$memory).'">';
20
+        return '<meta name="keywords" content="'.implode(',', self::$memory).'">';
21 21
     }
22 22
 
23 23
 }
Please login to merge, or discard this patch.
Title.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -5,19 +5,19 @@
 block discarded – undo
5 5
 
6 6
     private static $memory = [];
7 7
 
8
-    public function add($title){
9
-        if(!is_array($title)) $title = [$title];
10
-        self::$memory = array_merge(self::$memory,$title);
8
+    public function add($title) {
9
+        if (!is_array($title)) $title = [$title];
10
+        self::$memory = array_merge(self::$memory, $title);
11 11
         return $this;
12 12
     }
13 13
 
14
-    public function get(){
14
+    public function get() {
15 15
         self::$memory = array_reverse(self::$memory);
16
-        foreach(self::$memory as $key=>$value){
16
+        foreach (self::$memory as $key=>$value) {
17 17
             $value = urldecode($value);
18 18
             self::$memory[$key] = $value;
19 19
         }
20
-        return '<title>'.implode(' - ',self::$memory).'</title>';
20
+        return '<title>'.implode(' - ', self::$memory).'</title>';
21 21
     }
22 22
 
23 23
 }
Please login to merge, or discard this patch.
View.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@
 block discarded – undo
3 3
 
4 4
 class View {
5 5
 
6
-    public function __get($name){
6
+    public function __get($name) {
7 7
        (new Content)->view($name); 
8 8
     }
9 9
 
Please login to merge, or discard this patch.
Widget.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
     private static $routing;
12 12
     private static $property;
13 13
 
14
-    public function __construct(){
14
+    public function __construct() {
15 15
         # Config
16 16
         self::$config = (new Config)->instance()->config;
17 17
         # Application
@@ -26,15 +26,15 @@  discard block
 block discarded – undo
26 26
         self::$routing = new Routing;
27 27
     }
28 28
 
29
-    public function __get($name){
30
-        self::$property= $name;
29
+    public function __get($name) {
30
+        self::$property = $name;
31 31
         return new self;
32 32
     }
33 33
 
34
-    public function __call($_name,$value){
35
-        if(isset($value[0]) && !empty($value[0]) && is_array($value[0])) extract($value[0]);
34
+    public function __call($_name, $value) {
35
+        if (isset($value[0]) && !empty($value[0]) && is_array($value[0])) extract($value[0]);
36 36
         $file = self::$config['paths']['widget'].'/'.self::$property.'/'.$_name.'.phtml';
37
-        if(is_file($file)) require($file);
37
+        if (is_file($file)) require($file);
38 38
     }
39 39
 
40 40
 }
Please login to merge, or discard this patch.
MinifyHTML.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -5,13 +5,13 @@
 block discarded – undo
5 5
 
6 6
     private $source;
7 7
 
8
-    public function __construct($source){
8
+    public function __construct($source) {
9 9
         $this->source = $source;
10 10
     }
11 11
 
12
-    public function compress(){
12
+    public function compress() {
13 13
         $minify = $this->source;
14
-        $minify = preg_replace('/>[\s]*</Ui','><',$minify);
14
+        $minify = preg_replace('/>[\s]*</Ui', '><', $minify);
15 15
         return $minify;
16 16
     }
17 17
 
Please login to merge, or discard this patch.