Completed
Push — master ( 1011bb...99713d )
by Stefano
05:07
created
classes/Shell.php 3 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@
 block discarded – undo
32 32
                   $w[] = '--'.$value;                      
33 33
                 } else {
34 34
                   if(is_bool($value)){
35
-                     if($value) $w[] = '--'.$key;
35
+                      if($value) $w[] = '--'.$key;
36 36
                   } else { 
37 37
                     $w[] = '--'.$key.'='.escapeshellarg($value);  
38 38
                   }                    
Please login to merge, or discard this patch.
Spacing   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -22,17 +22,17 @@  discard block
 block discarded – undo
22 22
      * @param array $params 
23 23
      * @return string
24 24
      */
25
-    protected static function _compileCommand($command,array $params){
25
+    protected static function _compileCommand($command, array $params) {
26 26
         $s = $w = [];
27 27
         foreach ($params as $p) {
28 28
             if ($p instanceof static) {
29 29
               $s[] = '$('.$p->getShellCommand().')';
30 30
             } else if (is_array($p)) foreach ($p as $key => $value) {
31
-                if(is_numeric($key)){
31
+                if (is_numeric($key)) {
32 32
                   $w[] = '--'.$value;                      
33 33
                 } else {
34
-                  if(is_bool($value)){
35
-                     if($value) $w[] = '--'.$key;
34
+                  if (is_bool($value)) {
35
+                     if ($value) $w[] = '--'.$key;
36 36
                   } else { 
37 37
                     $w[] = '--'.$key.'='.escapeshellarg($value);  
38 38
                   }                    
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
             }
43 43
         }
44 44
         return trim(
45
-            '/usr/bin/env '.$command.' '.implode(' ',array_merge($w,$s))
45
+            '/usr/bin/env '.$command.' '.implode(' ', array_merge($w, $s))
46 46
         );
47 47
     }
48 48
  
@@ -50,68 +50,68 @@  discard block
 block discarded – undo
50 50
      * Returns the compiled shell command
51 51
      * @return string
52 52
      */
53
-    public function getShellCommand(){
53
+    public function getShellCommand() {
54 54
         return $this->command;
55 55
     }
56 56
 
57
-    public static function __callStatic($command,$params){
57
+    public static function __callStatic($command, $params) {
58 58
         // Check if is an alias
59
-        if (isset(static::$aliases[$command])){
60
-            if(!$results = call_user_func_array(static::$aliases[$command],$params))
59
+        if (isset(static::$aliases[$command])) {
60
+            if (!$results = call_user_func_array(static::$aliases[$command], $params))
61 61
                 throw new Exception('Shell aliases must return a Shell class or a command string.');
62
-            return $results instanceof static? $results : new static($results);
62
+            return $results instanceof static ? $results : new static($results);
63 63
         } else {
64
-            return new static($command,$params);
64
+            return new static($command, $params);
65 65
         }
66 66
     }
67 67
     
68
-    public function __construct($command,$params=null){
69
-        $this->command = $params?static::_compileCommand($command,$params):$command;
68
+    public function __construct($command, $params = null) {
69
+        $this->command = $params ? static::_compileCommand($command, $params) : $command;
70 70
     }
71 71
     
72
-    public function __toString(){
72
+    public function __toString() {
73 73
         $output = [];
74
-        exec($this->command,$output,$error_code);
75
-        return empty($output)?'':implode(PHP_EOL,$output);
74
+        exec($this->command, $output, $error_code);
75
+        return empty($output) ? '' : implode(PHP_EOL, $output);
76 76
     }
77 77
 
78 78
     /**
79 79
      * Concatenate multiple shell commands via piping
80 80
      * @return Shell The piped shell command
81 81
      */
82
-    public static function pipe(/* ... */){
82
+    public static function pipe(/* ... */) {
83 83
         $cmd = [];
84 84
         foreach (func_get_args() as $item) {
85
-            $cmd[] = ($item instanceof static)?$item->getShellCommand():$item;
85
+            $cmd[] = ($item instanceof static) ? $item->getShellCommand() : $item;
86 86
         }
87
-        return new static(implode(' | ',$cmd));
87
+        return new static(implode(' | ', $cmd));
88 88
     }
89 89
 
90 90
     /**
91 91
      * Concatenate multiple shell commands via logical implication ( && )
92 92
      * @return Shell The concatenated shell command
93 93
      */
94
-    public static function sequence(/* ... */){
94
+    public static function sequence(/* ... */) {
95 95
         $cmd = [];
96 96
         foreach (func_get_args() as $item) {
97
-            $cmd[] = ($item instanceof static)?$item->getShellCommand():$item;
97
+            $cmd[] = ($item instanceof static) ? $item->getShellCommand() : $item;
98 98
         }
99
-        return new static(implode(' && ',$cmd));
99
+        return new static(implode(' && ', $cmd));
100 100
     }
101 101
 
102
-    public static function execCommand($command,$params){
103
-        return new static($command,$params);
102
+    public static function execCommand($command, $params) {
103
+        return new static($command, $params);
104 104
     }
105 105
 
106
-    public static function alias($command,callable $callback){
106
+    public static function alias($command, callable $callback) {
107 107
         static::$aliases[$command] = $callback;
108 108
     }
109 109
 
110
-    public static function escape($arg){
110
+    public static function escape($arg) {
111 111
         return escapeshellarg($arg);
112 112
     }
113 113
 
114
-    public function run(){
114
+    public function run() {
115 115
         return $this->__toString();
116 116
     }
117 117
 
Please login to merge, or discard this patch.
Braces   +24 added lines, -19 removed lines patch added patch discarded remove patch
@@ -22,18 +22,22 @@  discard block
 block discarded – undo
22 22
      * @param array $params 
23 23
      * @return string
24 24
      */
25
-    protected static function _compileCommand($command,array $params){
25
+    protected static function _compileCommand($command,array $params) {
26 26
         $s = $w = [];
27 27
         foreach ($params as $p) {
28 28
             if ($p instanceof static) {
29 29
               $s[] = '$('.$p->getShellCommand().')';
30
-            } else if (is_array($p)) foreach ($p as $key => $value) {
30
+            } else if (is_array($p)) {
31
+              foreach ($p as $key => $value) {
31 32
                 if(is_numeric($key)){
32
-                  $w[] = '--'.$value;                      
33
+                  $w[] = '--'.$value;
34
+            }
33 35
                 } else {
34
-                  if(is_bool($value)){
35
-                     if($value) $w[] = '--'.$key;
36
-                  } else { 
36
+                  if(is_bool($value)) {
37
+                     if($value) {
38
+                       $w[] = '--'.$key;
39
+                     }
40
+                  } else {
37 41
                     $w[] = '--'.$key.'='.escapeshellarg($value);  
38 42
                   }                    
39 43
                 }
@@ -50,26 +54,27 @@  discard block
 block discarded – undo
50 54
      * Returns the compiled shell command
51 55
      * @return string
52 56
      */
53
-    public function getShellCommand(){
57
+    public function getShellCommand() {
54 58
         return $this->command;
55 59
     }
56 60
 
57
-    public static function __callStatic($command,$params){
61
+    public static function __callStatic($command,$params) {
58 62
         // Check if is an alias
59
-        if (isset(static::$aliases[$command])){
60
-            if(!$results = call_user_func_array(static::$aliases[$command],$params))
61
-                throw new Exception('Shell aliases must return a Shell class or a command string.');
63
+        if (isset(static::$aliases[$command])) {
64
+            if(!$results = call_user_func_array(static::$aliases[$command],$params)) {
65
+                            throw new Exception('Shell aliases must return a Shell class or a command string.');
66
+            }
62 67
             return $results instanceof static? $results : new static($results);
63 68
         } else {
64 69
             return new static($command,$params);
65 70
         }
66 71
     }
67 72
     
68
-    public function __construct($command,$params=null){
73
+    public function __construct($command,$params=null) {
69 74
         $this->command = $params?static::_compileCommand($command,$params):$command;
70 75
     }
71 76
     
72
-    public function __toString(){
77
+    public function __toString() {
73 78
         $output = [];
74 79
         exec($this->command,$output,$error_code);
75 80
         return empty($output)?'':implode(PHP_EOL,$output);
@@ -79,7 +84,7 @@  discard block
 block discarded – undo
79 84
      * Concatenate multiple shell commands via piping
80 85
      * @return Shell The piped shell command
81 86
      */
82
-    public static function pipe(/* ... */){
87
+    public static function pipe(/* ... */) {
83 88
         $cmd = [];
84 89
         foreach (func_get_args() as $item) {
85 90
             $cmd[] = ($item instanceof static)?$item->getShellCommand():$item;
@@ -91,7 +96,7 @@  discard block
 block discarded – undo
91 96
      * Concatenate multiple shell commands via logical implication ( && )
92 97
      * @return Shell The concatenated shell command
93 98
      */
94
-    public static function sequence(/* ... */){
99
+    public static function sequence(/* ... */) {
95 100
         $cmd = [];
96 101
         foreach (func_get_args() as $item) {
97 102
             $cmd[] = ($item instanceof static)?$item->getShellCommand():$item;
@@ -99,19 +104,19 @@  discard block
 block discarded – undo
99 104
         return new static(implode(' && ',$cmd));
100 105
     }
101 106
 
102
-    public static function execCommand($command,$params){
107
+    public static function execCommand($command,$params) {
103 108
         return new static($command,$params);
104 109
     }
105 110
 
106
-    public static function alias($command,callable $callback){
111
+    public static function alias($command,callable $callback) {
107 112
         static::$aliases[$command] = $callback;
108 113
     }
109 114
 
110
-    public static function escape($arg){
115
+    public static function escape($arg) {
111 116
         return escapeshellarg($arg);
112 117
     }
113 118
 
114
-    public function run(){
119
+    public function run() {
115 120
         return $this->__toString();
116 121
     }
117 122
 
Please login to merge, or discard this patch.
classes/FileSystem/Native.php 3 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -28,6 +28,9 @@
 block discarded – undo
28 28
       return $this->exists($path) ? file_get_contents($this->realPath($path)) : false;
29 29
   }
30 30
 
31
+  /**
32
+   * @param string|false $data
33
+   */
31 34
   public function write($path, $data){
32 35
       $r_path = $this->realPath($path);
33 36
       if ( ! is_dir($r_dir = dirname($r_path)) ) @mkdir($r_dir,0775,true);
Please login to merge, or discard this patch.
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -17,42 +17,42 @@  discard block
 block discarded – undo
17 17
   protected $root;
18 18
 
19 19
   public function __construct(array $options = []) {
20
-      $this->root = empty($options['root'])?'/':(rtrim($options['root'],'/').'/');
20
+      $this->root = empty($options['root']) ? '/' : (rtrim($options['root'], '/').'/');
21 21
   }
22 22
 
23
-  public function exists($path){
23
+  public function exists($path) {
24 24
       return file_exists($this->realPath($path));
25 25
   }
26 26
 
27
-  public function read($path){
27
+  public function read($path) {
28 28
       return $this->exists($path) ? file_get_contents($this->realPath($path)) : false;
29 29
   }
30 30
 
31
-  public function write($path, $data){
31
+  public function write($path, $data) {
32 32
       $r_path = $this->realPath($path);
33
-      if ( ! is_dir($r_dir = dirname($r_path)) ) @mkdir($r_dir,0775,true);
33
+      if (!is_dir($r_dir = dirname($r_path))) @mkdir($r_dir, 0775, true);
34 34
       return file_put_contents($r_path, $data);
35 35
   }
36 36
 
37
-  public function append($path, $data){
37
+  public function append($path, $data) {
38 38
       return file_put_contents($this->realPath($path), $data, FILE_APPEND);
39 39
   }
40 40
 
41
-  public function move($old, $new){
41
+  public function move($old, $new) {
42 42
       // Atomic
43
-      if($this->exists($old)){
44
-          return $this->write($new,$this->read($old)) && $this->delete($old);
43
+      if ($this->exists($old)) {
44
+          return $this->write($new, $this->read($old)) && $this->delete($old);
45 45
       } else return false;
46 46
   }
47 47
 
48
-  public function delete($path){
48
+  public function delete($path) {
49 49
       return $this->exists($path) ? unlink($this->realPath($path)) : false;
50 50
   }
51 51
 
52
-  public function search($pattern, $recursive=true){
52
+  public function search($pattern, $recursive = true) {
53 53
       $results    = [];
54 54
       $root_len   = strlen($this->root);
55
-      $rx_pattern = '('.strtr($pattern,['.'=>'\.','*'=>'.*','?'=>'.']).')Ai';
55
+      $rx_pattern = '('.strtr($pattern, ['.'=>'\.', '*'=>'.*', '?'=>'.']).')Ai';
56 56
 
57 57
       /*
58 58
       $files = new \RegexIterator(new \RecursiveDirectoryIterator($this->root,
@@ -68,12 +68,12 @@  discard block
 block discarded – undo
68 68
               new \RecursiveDirectoryIterator(
69 69
                   $this->root,
70 70
                   \RecursiveDirectoryIterator::SKIP_DOTS)),
71
-                  $rx_pattern,\RegexIterator::GET_MATCH);
71
+                  $rx_pattern, \RegexIterator::GET_MATCH);
72 72
 
73 73
       $fileList = [];
74
-      foreach($tree as $group) {
75
-          foreach($group as $path) {
76
-              $results[] = trim(substr($path, $root_len),'/');
74
+      foreach ($tree as $group) {
75
+          foreach ($group as $path) {
76
+              $results[] = trim(substr($path, $root_len), '/');
77 77
           }
78 78
       }
79 79
 
@@ -81,8 +81,8 @@  discard block
 block discarded – undo
81 81
 
82 82
   }
83 83
 
84
-  protected function realPath($path){
85
-      return $this->root . $path;
84
+  protected function realPath($path) {
85
+      return $this->root.$path;
86 86
   }
87 87
 
88 88
 }
Please login to merge, or discard this patch.
Braces   +15 added lines, -11 removed lines patch added patch discarded remove patch
@@ -20,36 +20,40 @@  discard block
 block discarded – undo
20 20
       $this->root = empty($options['root'])?'/':(rtrim($options['root'],'/').'/');
21 21
   }
22 22
 
23
-  public function exists($path){
23
+  public function exists($path) {
24 24
       return file_exists($this->realPath($path));
25 25
   }
26 26
 
27
-  public function read($path){
27
+  public function read($path) {
28 28
       return $this->exists($path) ? file_get_contents($this->realPath($path)) : false;
29 29
   }
30 30
 
31
-  public function write($path, $data){
31
+  public function write($path, $data) {
32 32
       $r_path = $this->realPath($path);
33
-      if ( ! is_dir($r_dir = dirname($r_path)) ) @mkdir($r_dir,0775,true);
33
+      if ( ! is_dir($r_dir = dirname($r_path)) ) {
34
+        @mkdir($r_dir,0775,true);
35
+      }
34 36
       return file_put_contents($r_path, $data);
35 37
   }
36 38
 
37
-  public function append($path, $data){
39
+  public function append($path, $data) {
38 40
       return file_put_contents($this->realPath($path), $data, FILE_APPEND);
39 41
   }
40 42
 
41
-  public function move($old, $new){
43
+  public function move($old, $new) {
42 44
       // Atomic
43
-      if($this->exists($old)){
45
+      if($this->exists($old)) {
44 46
           return $this->write($new,$this->read($old)) && $this->delete($old);
45
-      } else return false;
47
+      } else {
48
+        return false;
49
+      }
46 50
   }
47 51
 
48
-  public function delete($path){
52
+  public function delete($path) {
49 53
       return $this->exists($path) ? unlink($this->realPath($path)) : false;
50 54
   }
51 55
 
52
-  public function search($pattern, $recursive=true){
56
+  public function search($pattern, $recursive=true) {
53 57
       $results    = [];
54 58
       $root_len   = strlen($this->root);
55 59
       $rx_pattern = '('.strtr($pattern,['.'=>'\.','*'=>'.*','?'=>'.']).')Ai';
@@ -81,7 +85,7 @@  discard block
 block discarded – undo
81 85
 
82 86
   }
83 87
 
84
-  protected function realPath($path){
88
+  protected function realPath($path) {
85 89
       return $this->root . $path;
86 90
   }
87 91
 
Please login to merge, or discard this patch.
classes/View/PHP.php 4 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -56,6 +56,9 @@
 block discarded – undo
56 56
 class PHPContext {
57 57
   protected $data = [];
58 58
 
59
+  /**
60
+   * @param string $path
61
+   */
59 62
   public function __construct($data=[], $path=null){
60 63
       $this->data = $data;
61 64
   }
Please login to merge, or discard this patch.
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
   const EXTENSION = 'php';
18 18
 
19 19
   protected static $templatePath,
20
-                   $globals = [];
20
+                    $globals = [];
21 21
 
22 22
   public function __construct($path=null,$options=[]){
23 23
       self::$templatePath = ($path ? rtrim($path,'/') : __DIR__) . '/';
Please login to merge, or discard this patch.
Braces   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -19,27 +19,27 @@  discard block
 block discarded – undo
19 19
   protected static $templatePath,
20 20
                    $globals = [];
21 21
 
22
-  public function __construct($path=null,$options=[]){
22
+  public function __construct($path=null,$options=[]) {
23 23
       self::$templatePath = ($path ? rtrim($path,'/') : __DIR__) . '/';
24 24
   }
25 25
 
26
-  public static function exists($path){
26
+  public static function exists($path) {
27 27
       return is_file(self::$templatePath.$path.'.php');
28 28
   }
29 29
 
30
-  public static function addGlobal($key,$val){
30
+  public static function addGlobal($key,$val) {
31 31
     self::$globals[$key] = $val;
32 32
   }
33 33
 
34
-  public static function addGlobals(array $defs){
34
+  public static function addGlobals(array $defs) {
35 35
     foreach ((array)$defs as $key=>$val) {
36 36
         self::$globals[$key] = $val;
37 37
     }
38 38
   }
39 39
 
40
-  public function render($template, $data=[]){
40
+  public function render($template, $data=[]) {
41 41
       $template_path = self::$templatePath . trim($template,'/') . '.php';
42
-      $sandbox = function() use ($template_path){
42
+      $sandbox = function() use ($template_path) {
43 43
           ob_start();
44 44
           include($template_path);
45 45
           $__buffer__ = ob_get_contents();
@@ -56,11 +56,11 @@  discard block
 block discarded – undo
56 56
 class PHPContext {
57 57
   protected $data = [];
58 58
 
59
-  public function __construct($data=[], $path=null){
59
+  public function __construct($data=[], $path=null) {
60 60
       $this->data = $data;
61 61
   }
62 62
 
63
-  public function partial($template, $vars=[]){
63
+  public function partial($template, $vars=[]) {
64 64
       return \View::from($template,array_merge($this->data,$vars));
65 65
   }
66 66
 
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
 
69 69
   public function __unset($n){}
70 70
 
71
-  public function __get($n){
71
+  public function __get($n) {
72 72
     return empty($this->data[$n]) ? '' : $this->data[$n];
73 73
   }
74 74
 }
Please login to merge, or discard this patch.
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -19,26 +19,26 @@  discard block
 block discarded – undo
19 19
   protected static $templatePath,
20 20
                    $globals = [];
21 21
 
22
-  public function __construct($path=null,$options=[]){
23
-      self::$templatePath = ($path ? rtrim($path,'/') : __DIR__) . '/';
22
+  public function __construct($path = null, $options = []) {
23
+      self::$templatePath = ($path ? rtrim($path, '/') : __DIR__).'/';
24 24
   }
25 25
 
26
-  public static function exists($path){
27
-      return is_file(self::$templatePath . $path . static::EXTENSION);
26
+  public static function exists($path) {
27
+      return is_file(self::$templatePath.$path.static::EXTENSION);
28 28
   }
29 29
 
30
-  public static function addGlobal($key,$val){
30
+  public static function addGlobal($key, $val) {
31 31
     self::$globals[$key] = $val;
32 32
   }
33 33
 
34
-  public static function addGlobals(array $defs){
35
-    foreach ((array)$defs as $key=>$val) {
34
+  public static function addGlobals(array $defs) {
35
+    foreach ((array) $defs as $key=>$val) {
36 36
         self::$globals[$key] = $val;
37 37
     }
38 38
   }
39 39
 
40
-  public function render($template, $data=[]){
41
-      $template_path = self::$templatePath . trim($template,'/') . static::EXTENSION;
40
+  public function render($template, $data = []) {
41
+      $template_path = self::$templatePath.trim($template, '/').static::EXTENSION;
42 42
       $sandbox = function() use ($template_path){
43 43
           ob_start();
44 44
           include($template_path);
@@ -56,19 +56,19 @@  discard block
 block discarded – undo
56 56
 class PHPContext {
57 57
   protected $data = [];
58 58
 
59
-  public function __construct($data=[], $path=null){
59
+  public function __construct($data = [], $path = null) {
60 60
       $this->data = $data;
61 61
   }
62 62
 
63
-  public function partial($template, $vars=[]){
64
-      return \View::from($template,array_merge($this->data,$vars));
63
+  public function partial($template, $vars = []) {
64
+      return \View::from($template, array_merge($this->data, $vars));
65 65
   }
66 66
 
67
-  public function __isset($n){ return true; }
67
+  public function __isset($n) { return true;}
68 68
 
69
-  public function __unset($n){}
69
+  public function __unset($n) {}
70 70
 
71
-  public function __get($n){
71
+  public function __get($n) {
72 72
     return empty($this->data[$n]) ? '' : $this->data[$n];
73 73
   }
74 74
 }
Please login to merge, or discard this patch.
classes/FileSystem/ZIP.php 2 patches
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -19,50 +19,50 @@
 block discarded – undo
19 19
             $fileCache;
20 20
 
21 21
   public function __construct(array $options = []) {
22
-      $this->path    = empty($options['root'])?(tempnam(sys_get_temp_dir(), 'CFZ_').'.zip'):rtrim($options['root']);
22
+      $this->path    = empty($options['root']) ? (tempnam(sys_get_temp_dir(), 'CFZ_').'.zip') : rtrim($options['root']);
23 23
       $this->zipfile = new \ZipArchive();
24
-      if ( !$this->zipfile->open($this->path, \ZipArchive::CREATE) ){
24
+      if (!$this->zipfile->open($this->path, \ZipArchive::CREATE)) {
25 25
           throw new \Exception("File::ZIP Cannot open or create ".$this->path);
26 26
       }
27 27
   }
28 28
 
29
-  public function exists($path){
29
+  public function exists($path) {
30 30
       return false !== $this->zipfile->locateName($path);
31 31
   }
32 32
 
33
-  public function read($path){
33
+  public function read($path) {
34 34
       if (isset($this->fileCache[$path])) return $this->fileCache[$path];
35 35
       return $this->exists($path) ? $this->zipfile->getFromName($path) : false;
36 36
   }
37 37
 
38
-  public function write($path, $data){
38
+  public function write($path, $data) {
39 39
       // This is needed because we cant write and read from the same archive.
40 40
       $this->fileCache[$path] = $data;
41 41
       return $this->zipfile->addFromString($path, $data);
42 42
   }
43 43
 
44
-  public function append($path, $data){
45
-      return $this->write($path, ($this->read($path) ?: '') . $data);
44
+  public function append($path, $data) {
45
+      return $this->write($path, ($this->read($path) ?: '').$data);
46 46
   }
47 47
 
48
-  public function delete($path){
48
+  public function delete($path) {
49 49
       return $this->exists($path) ? $this->zipfile->deleteName($path) : false;
50 50
   }
51 51
 
52
-  public function move($old, $new){
52
+  public function move($old, $new) {
53 53
       // Atomic rename
54 54
       // This is needed because we cant write and read from the same archive.
55
-      return $this->write($new,$this->read($old)) && $this->delete($old);
55
+      return $this->write($new, $this->read($old)) && $this->delete($old);
56 56
       // return $this->zipfile->renameName($old, $new);
57 57
   }
58 58
 
59
-  public function search($pattern, $recursive=true){
59
+  public function search($pattern, $recursive = true) {
60 60
       $results = [];
61
-      $rx_pattern = '('.strtr($pattern,['.'=>'\.','*'=>'.*','?'=>'.']).')Ai';
61
+      $rx_pattern = '('.strtr($pattern, ['.'=>'\.', '*'=>'.*', '?'=>'.']).')Ai';
62 62
 
63
-      for( $i = 0, $c = $this->zipfile->numFiles; $i < $c; $i++ ){
64
-          $stat = $this->zipfile->statIndex( $i );
65
-          if (preg_match($rx_pattern,$stat['name'])) $results[] = $stat['name'];
63
+      for ($i = 0, $c = $this->zipfile->numFiles;$i < $c;$i++) {
64
+          $stat = $this->zipfile->statIndex($i);
65
+          if (preg_match($rx_pattern, $stat['name'])) $results[] = $stat['name'];
66 66
       }
67 67
 
68 68
       return $results;
Please login to merge, or discard this patch.
Braces   +15 added lines, -11 removed lines patch added patch discarded remove patch
@@ -21,48 +21,52 @@
 block discarded – undo
21 21
   public function __construct(array $options = []) {
22 22
       $this->path    = empty($options['root'])?(tempnam(sys_get_temp_dir(), 'CFZ_').'.zip'):rtrim($options['root']);
23 23
       $this->zipfile = new \ZipArchive();
24
-      if ( !$this->zipfile->open($this->path, \ZipArchive::CREATE) ){
24
+      if ( !$this->zipfile->open($this->path, \ZipArchive::CREATE) ) {
25 25
           throw new \Exception("File::ZIP Cannot open or create ".$this->path);
26 26
       }
27 27
   }
28 28
 
29
-  public function exists($path){
29
+  public function exists($path) {
30 30
       return false !== $this->zipfile->locateName($path);
31 31
   }
32 32
 
33
-  public function read($path){
34
-      if (isset($this->fileCache[$path])) return $this->fileCache[$path];
33
+  public function read($path) {
34
+      if (isset($this->fileCache[$path])) {
35
+        return $this->fileCache[$path];
36
+      }
35 37
       return $this->exists($path) ? $this->zipfile->getFromName($path) : false;
36 38
   }
37 39
 
38
-  public function write($path, $data){
40
+  public function write($path, $data) {
39 41
       // This is needed because we cant write and read from the same archive.
40 42
       $this->fileCache[$path] = $data;
41 43
       return $this->zipfile->addFromString($path, $data);
42 44
   }
43 45
 
44
-  public function append($path, $data){
46
+  public function append($path, $data) {
45 47
       return $this->write($path, ($this->read($path) ?: '') . $data);
46 48
   }
47 49
 
48
-  public function delete($path){
50
+  public function delete($path) {
49 51
       return $this->exists($path) ? $this->zipfile->deleteName($path) : false;
50 52
   }
51 53
 
52
-  public function move($old, $new){
54
+  public function move($old, $new) {
53 55
       // Atomic rename
54 56
       // This is needed because we cant write and read from the same archive.
55 57
       return $this->write($new,$this->read($old)) && $this->delete($old);
56 58
       // return $this->zipfile->renameName($old, $new);
57 59
   }
58 60
 
59
-  public function search($pattern, $recursive=true){
61
+  public function search($pattern, $recursive=true) {
60 62
       $results = [];
61 63
       $rx_pattern = '('.strtr($pattern,['.'=>'\.','*'=>'.*','?'=>'.']).')Ai';
62 64
 
63
-      for( $i = 0, $c = $this->zipfile->numFiles; $i < $c; $i++ ){
65
+      for( $i = 0, $c = $this->zipfile->numFiles; $i < $c; $i++ ) {
64 66
           $stat = $this->zipfile->statIndex( $i );
65
-          if (preg_match($rx_pattern,$stat['name'])) $results[] = $stat['name'];
67
+          if (preg_match($rx_pattern,$stat['name'])) {
68
+            $results[] = $stat['name'];
69
+          }
66 70
       }
67 71
 
68 72
       return $results;
Please login to merge, or discard this patch.
classes/View/Adapter.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -13,9 +13,9 @@
 block discarded – undo
13 13
 namespace View;
14 14
 
15 15
 interface Adapter {
16
-    public function __construct($path=null, $options=[]);
17
-    public function render($template,$data=[]);
16
+    public function __construct($path = null, $options = []);
17
+    public function render($template, $data = []);
18 18
     public static function exists($path);
19
-    public static function addGlobal($key,$val);
19
+    public static function addGlobal($key, $val);
20 20
     public static function addGlobals(array $defs);
21 21
 }
Please login to merge, or discard this patch.
classes/Deferred.php 3 patches
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -12,12 +12,12 @@  discard block
 block discarded – undo
12 12
 
13 13
 class Deferred {
14 14
 
15
-	protected $callback,
15
+  protected $callback,
16 16
             $enabled = true;
17 17
 
18
-	public function __construct( callable $callback ) {
19
-		$this->callback = $callback;
20
-	}
18
+  public function __construct( callable $callback ) {
19
+    $this->callback = $callback;
20
+  }
21 21
 
22 22
   public function disarm() {
23 23
     $this->enabled = false;
@@ -27,8 +27,8 @@  discard block
 block discarded – undo
27 27
     $this->enabled = true;
28 28
   }
29 29
 
30
-	public function __destruct() {
31
-		if ( $this->enabled ) call_user_func( $this->callback );
32
-	}
30
+  public function __destruct() {
31
+    if ( $this->enabled ) call_user_func( $this->callback );
32
+  }
33 33
 
34 34
 }
35 35
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
 	protected $callback,
16 16
             $enabled = true;
17 17
 
18
-	public function __construct( callable $callback ) {
18
+	public function __construct(callable $callback) {
19 19
 		$this->callback = $callback;
20 20
 	}
21 21
 
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
   }
29 29
 
30 30
 	public function __destruct() {
31
-		if ( $this->enabled ) call_user_func( $this->callback );
31
+		if ($this->enabled) call_user_func($this->callback);
32 32
 	}
33 33
 
34 34
 }
35 35
\ No newline at end of file
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,9 @@
 block discarded – undo
28 28
   }
29 29
 
30 30
 	public function __destruct() {
31
-		if ( $this->enabled ) call_user_func( $this->callback );
31
+		if ( $this->enabled ) {
32
+		  call_user_func( $this->callback );
33
+		}
32 34
 	}
33 35
 
34 36
 }
35 37
\ No newline at end of file
Please login to merge, or discard this patch.
classes/Filter.php 2 patches
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -15,8 +15,8 @@  discard block
 block discarded – undo
15 15
 
16 16
     protected static $_modders = [];
17 17
 
18
-    public static function add($name,callable $modder = null){
19
-        if( is_array($name) ) {
18
+    public static function add($name, callable $modder = null) {
19
+        if (is_array($name)) {
20 20
             foreach ($name as $key => $value) {
21 21
                 static::$_modders[$key][] = $value;
22 22
             }
@@ -25,26 +25,26 @@  discard block
 block discarded – undo
25 25
         }
26 26
     }
27 27
 
28
-    public static function single($name,callable $modder){
28
+    public static function single($name, callable $modder) {
29 29
         static::$_modders[$name] = [$modder];
30 30
     }
31 31
 
32
-    public static function remove($name,callable $modder = null){
33
-        if($modder === null) {
32
+    public static function remove($name, callable $modder = null) {
33
+        if ($modder === null) {
34 34
             unset(static::$_modders[$name]);
35 35
         } else {
36
-            if ($idx = array_search($modder,static::$_modders[$name],true))
36
+            if ($idx = array_search($modder, static::$_modders[$name], true))
37 37
                 unset(static::$_modders[$name][$idx]);
38 38
         }
39 39
     }
40 40
 
41
-    public static function with($names, $default){
42
-      foreach ((array)$names as $name) {
41
+    public static function with($names, $default) {
42
+      foreach ((array) $names as $name) {
43 43
         if (!empty(static::$_modders[$name])) {
44 44
             $value = $default;
45
-            $args = array_slice( func_get_args(), 2 );
45
+            $args = array_slice(func_get_args(), 2);
46 46
             foreach (static::$_modders[$name] as $modder) {
47
-                $value = call_user_func( $modder,$value,$args );
47
+                $value = call_user_func($modder, $value, $args);
48 48
             }
49 49
             return $value;
50 50
         }
Please login to merge, or discard this patch.
Braces   +7 added lines, -6 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
 
16 16
     protected static $_modders = [];
17 17
 
18
-    public static function add($name,callable $modder = null){
18
+    public static function add($name,callable $modder = null) {
19 19
         if( is_array($name) ) {
20 20
             foreach ($name as $key => $value) {
21 21
                 static::$_modders[$key][] = $value;
@@ -25,20 +25,21 @@  discard block
 block discarded – undo
25 25
         }
26 26
     }
27 27
 
28
-    public static function single($name,callable $modder){
28
+    public static function single($name,callable $modder) {
29 29
         static::$_modders[$name] = [$modder];
30 30
     }
31 31
 
32
-    public static function remove($name,callable $modder = null){
32
+    public static function remove($name,callable $modder = null) {
33 33
         if($modder === null) {
34 34
             unset(static::$_modders[$name]);
35 35
         } else {
36
-            if ($idx = array_search($modder,static::$_modders[$name],true))
37
-                unset(static::$_modders[$name][$idx]);
36
+            if ($idx = array_search($modder,static::$_modders[$name],true)) {
37
+                            unset(static::$_modders[$name][$idx]);
38
+            }
38 39
         }
39 40
     }
40 41
 
41
-    public static function with($names, $default){
42
+    public static function with($names, $default) {
42 43
       foreach ((array)$names as $name) {
43 44
         if (!empty(static::$_modders[$name])) {
44 45
             $value = $default;
Please login to merge, or discard this patch.
classes/Text.php 3 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@
 block discarded – undo
26 26
    * @param mixed $t  The text template
27 27
    * @param mixed $v (default: null)  The array of values exposed in template.
28 28
    * @return string
29
-  */
29
+   */
30 30
   public static function render($t,$v=null){
31 31
     if (empty($v)) return preg_replace('/{{[^}]+}}/','',$t);
32 32
     for(  // Init
Please login to merge, or discard this patch.
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -27,19 +27,19 @@  discard block
 block discarded – undo
27 27
    * @param mixed $v (default: null)  The array of values exposed in template.
28 28
    * @return string
29 29
   */
30
-  public static function render($t,$v=null){
31
-    if (empty($v)) return preg_replace('/{{[^}]+}}/','',$t);
32
-    for(  // Init
30
+  public static function render($t, $v = null) {
31
+    if (empty($v)) return preg_replace('/{{[^}]+}}/', '', $t);
32
+    for (  // Init
33 33
           $r = $ox = $x = false;
34 34
           // While
35
-          false !== ($x = $y = strpos($t,'{{',$x));
35
+          false !== ($x = $y = strpos($t, '{{', $x));
36 36
           // Do
37
-          $r .= substr($t, $ox, $x-$ox),
38
-          $c  = substr($t, $x += 2, $l = ( $y = strpos($t,'}}', $x) ) - $x),
37
+          $r .= substr($t, $ox, $x - $ox),
38
+          $c  = substr($t, $x += 2, $l = ($y = strpos($t, '}}', $x)) - $x),
39 39
           $ox = $x += $l + 2,
40
-          $r .= Object::fetch(trim($c),$v)?:''
40
+          $r .= Object::fetch(trim($c), $v) ?: ''
41 41
     );
42
-    return $r===false ? $t : $r.substr($t,$ox);
42
+    return $r === false ? $t : $r.substr($t, $ox);
43 43
   }
44 44
 
45 45
   /**
@@ -54,9 +54,9 @@  discard block
 block discarded – undo
54 54
    * @param  string $text The text to slugify
55 55
    * @return string       The slug.
56 56
    */
57
-  public static function slugify($text){
57
+  public static function slugify($text) {
58 58
     return preg_replace(
59
-      ['(\s+)','([^a-z0-9-])i','(-+)'],['-','','-'],
59
+      ['(\s+)', '([^a-z0-9-])i', '(-+)'], ['-', '', '-'],
60 60
       strtolower(self::removeAccents($text)));
61 61
   }
62 62
 
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
    * @param  string $text The text to translit
73 73
    * @return string       The translited text
74 74
    */
75
-  public static function removeAccents($text){
75
+  public static function removeAccents($text) {
76 76
     static $diac;
77 77
     return strtr(
78 78
       utf8_decode($text),
Please login to merge, or discard this patch.
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -27,8 +27,10 @@  discard block
 block discarded – undo
27 27
    * @param mixed $v (default: null)  The array of values exposed in template.
28 28
    * @return string
29 29
   */
30
-  public static function render($t,$v=null){
31
-    if (empty($v)) return preg_replace('/{{[^}]+}}/','',$t);
30
+  public static function render($t,$v=null) {
31
+    if (empty($v)) {
32
+      return preg_replace('/{{[^}]+}}/','',$t);
33
+    }
32 34
     for(  // Init
33 35
           $r = $ox = $x = false;
34 36
           // While
@@ -54,7 +56,7 @@  discard block
 block discarded – undo
54 56
    * @param  string $text The text to slugify
55 57
    * @return string       The slug.
56 58
    */
57
-  public static function slugify($text){
59
+  public static function slugify($text) {
58 60
     return preg_replace(
59 61
       ['(\s+)','([^a-z0-9-])i','(-+)'],['-','','-'],
60 62
       strtolower(self::removeAccents($text)));
@@ -72,7 +74,7 @@  discard block
 block discarded – undo
72 74
    * @param  string $text The text to translit
73 75
    * @return string       The translited text
74 76
    */
75
-  public static function removeAccents($text){
77
+  public static function removeAccents($text) {
76 78
     static $diac;
77 79
     return strtr(
78 80
       utf8_decode($text),
Please login to merge, or discard this patch.
classes/Map.php 2 patches
Spacing   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -29,11 +29,11 @@  discard block
 block discarded – undo
29 29
      * @param  mixed $default (optional) The default value. If is a callable it will executed and the return value will be used.
30 30
      * @return mixed The value of the key or the default (resolved) value if the key not existed.
31 31
      */
32
-    public function get($key, $default=null){
33
-        if ($ptr =& $this->find($key,false)){
32
+    public function get($key, $default = null) {
33
+        if ($ptr = & $this->find($key, false)) {
34 34
             return $ptr;
35 35
         } else {
36
-            if ($default !== null){
36
+            if ($default !== null) {
37 37
                 return $this->set($key, is_callable($default) ? call_user_func($default) : $default);
38 38
             } else {
39 39
                 return null;
@@ -47,11 +47,11 @@  discard block
 block discarded – undo
47 47
      * @param  mixed $value (optional) The value. If is a callable it will executed and the return value will be used.
48 48
      * @return mixed The value of the key or the default (resolved) value if the key not existed.
49 49
      */
50
-    public function set($key, $value=null){
50
+    public function set($key, $value = null) {
51 51
         if (is_array($key)) {
52 52
             return $this->merge($key);
53 53
         } else {
54
-            $ptr =& $this->find($key, true);
54
+            $ptr = & $this->find($key, true);
55 55
             return $ptr = $value;
56 56
         }
57 57
     }
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
      * @param  string $key The key path in dot notation
62 62
      * @param  boolean $compact (optional) Compact map removing empty paths.
63 63
      */
64
-    public function delete($key, $compact=true){
64
+    public function delete($key, $compact = true) {
65 65
         $this->set($key, null);
66 66
         if ($compact) $this->compact();
67 67
     }
@@ -71,18 +71,18 @@  discard block
 block discarded – undo
71 71
      * @param  string $key The key path in dot notation
72 72
      * @return boolean
73 73
      */
74
-    public function exists($key){
74
+    public function exists($key) {
75 75
         return null !== $this->find($key, false);
76 76
     }
77 77
 
78 78
     /**
79 79
      * Clear all key path in map.
80 80
      */
81
-    public function clear(){
81
+    public function clear() {
82 82
         $this->fields = [];
83 83
     }
84 84
 
85
-    public function __construct($fields=null){
85
+    public function __construct($fields = null) {
86 86
         $this->load($fields);
87 87
     }
88 88
 
@@ -90,8 +90,8 @@  discard block
 block discarded – undo
90 90
      * Load an associative array/object as the map source.
91 91
      * @param  string $fields The array to merge
92 92
      */
93
-    public function load($fields){
94
-        if ($fields) $this->fields = (array)$fields;
93
+    public function load($fields) {
94
+        if ($fields) $this->fields = (array) $fields;
95 95
     }
96 96
 
97 97
     /**
@@ -99,17 +99,17 @@  discard block
 block discarded – undo
99 99
      * @param  array   $array The array to merge
100 100
      * @param  boolean $merge_back If `true` merge the map over the $array, if `false` (default) the reverse.
101 101
      */
102
-    public function merge($array, $merge_back=false){
102
+    public function merge($array, $merge_back = false) {
103 103
         $this->fields = $merge_back
104
-            ? array_replace_recursive((array)$array, $this->fields)
105
-            : array_replace_recursive($this->fields, (array)$array);
104
+            ? array_replace_recursive((array) $array, $this->fields)
105
+            : array_replace_recursive($this->fields, (array) $array);
106 106
     }
107 107
 
108 108
     /**
109 109
      * Compact map removing empty paths
110 110
      */
111 111
 
112
-    public function compact(){
112
+    public function compact() {
113 113
 
114 114
         $array_filter_rec = function($input, $callback = null) use (&$array_filter_rec) {
115 115
             foreach ($input as &$value) {
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
             return array_filter($input, $callback);
121 121
         };
122 122
 
123
-        $this->fields = $array_filter_rec($this->fields,function($a){ return $a !== null; });
123
+        $this->fields = $array_filter_rec($this->fields, function($a) { return $a !== null;});
124 124
     }
125 125
 
126 126
     /**
@@ -130,18 +130,18 @@  discard block
 block discarded – undo
130 130
      * @param  callable  If passed this callback will be applied to the founded value.
131 131
      * @return mixed The founded value.
132 132
      */
133
-    public function & find($path, $create=false, callable $operation=null) {
134
-        $tok = strtok($path,'.');
135
-        if ( $create ) {
136
-            $value =& $this->fields;
133
+    public function & find($path, $create = false, callable $operation = null) {
134
+        $tok = strtok($path, '.');
135
+        if ($create) {
136
+            $value = & $this->fields;
137 137
         } else {
138 138
             $value = $this->fields;
139 139
         }
140
-        while ( $tok !== false ){
141
-            $value =& $value[$tok];
140
+        while ($tok !== false) {
141
+            $value = & $value[$tok];
142 142
             $tok = strtok('.');
143 143
         }
144
-        if ( is_callable($operation) ) $operation($value);
144
+        if (is_callable($operation)) $operation($value);
145 145
         return $value;
146 146
     }
147 147
 
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
      *
153 153
      * @return string        The json object
154 154
      */
155
-    public function jsonSerialize(){
155
+    public function jsonSerialize() {
156 156
       return $this->fields;
157 157
     }
158 158
 
Please login to merge, or discard this patch.
Braces   +22 added lines, -16 removed lines patch added patch discarded remove patch
@@ -29,11 +29,11 @@  discard block
 block discarded – undo
29 29
      * @param  mixed $default (optional) The default value. If is a callable it will executed and the return value will be used.
30 30
      * @return mixed The value of the key or the default (resolved) value if the key not existed.
31 31
      */
32
-    public function get($key, $default=null){
33
-        if ($ptr =& $this->find($key,false)){
32
+    public function get($key, $default=null) {
33
+        if ($ptr =& $this->find($key,false)) {
34 34
             return $ptr;
35 35
         } else {
36
-            if ($default !== null){
36
+            if ($default !== null) {
37 37
                 return $this->set($key, is_callable($default) ? call_user_func($default) : $default);
38 38
             } else {
39 39
                 return null;
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
      * @param  mixed $value (optional) The value. If is a callable it will executed and the return value will be used.
48 48
      * @return mixed The value of the key or the default (resolved) value if the key not existed.
49 49
      */
50
-    public function set($key, $value=null){
50
+    public function set($key, $value=null) {
51 51
         if (is_array($key)) {
52 52
             return $this->merge($key);
53 53
         } else {
@@ -61,9 +61,11 @@  discard block
 block discarded – undo
61 61
      * @param  string $key The key path in dot notation
62 62
      * @param  boolean $compact (optional) Compact map removing empty paths.
63 63
      */
64
-    public function delete($key, $compact=true){
64
+    public function delete($key, $compact=true) {
65 65
         $this->set($key, null);
66
-        if ($compact) $this->compact();
66
+        if ($compact) {
67
+          $this->compact();
68
+        }
67 69
     }
68 70
 
69 71
     /**
@@ -71,18 +73,18 @@  discard block
 block discarded – undo
71 73
      * @param  string $key The key path in dot notation
72 74
      * @return boolean
73 75
      */
74
-    public function exists($key){
76
+    public function exists($key) {
75 77
         return null !== $this->find($key, false);
76 78
     }
77 79
 
78 80
     /**
79 81
      * Clear all key path in map.
80 82
      */
81
-    public function clear(){
83
+    public function clear() {
82 84
         $this->fields = [];
83 85
     }
84 86
 
85
-    public function __construct($fields=null){
87
+    public function __construct($fields=null) {
86 88
         $this->load($fields);
87 89
     }
88 90
 
@@ -90,8 +92,10 @@  discard block
 block discarded – undo
90 92
      * Load an associative array/object as the map source.
91 93
      * @param  string $fields The array to merge
92 94
      */
93
-    public function load($fields){
94
-        if ($fields) $this->fields = (array)$fields;
95
+    public function load($fields) {
96
+        if ($fields) {
97
+          $this->fields = (array)$fields;
98
+        }
95 99
     }
96 100
 
97 101
     /**
@@ -99,7 +103,7 @@  discard block
 block discarded – undo
99 103
      * @param  array   $array The array to merge
100 104
      * @param  boolean $merge_back If `true` merge the map over the $array, if `false` (default) the reverse.
101 105
      */
102
-    public function merge($array, $merge_back=false){
106
+    public function merge($array, $merge_back=false) {
103 107
         $this->fields = $merge_back
104 108
             ? array_replace_recursive((array)$array, $this->fields)
105 109
             : array_replace_recursive($this->fields, (array)$array);
@@ -109,7 +113,7 @@  discard block
 block discarded – undo
109 113
      * Compact map removing empty paths
110 114
      */
111 115
 
112
-    public function compact(){
116
+    public function compact() {
113 117
 
114 118
         $array_filter_rec = function($input, $callback = null) use (&$array_filter_rec) {
115 119
             foreach ($input as &$value) {
@@ -137,11 +141,13 @@  discard block
 block discarded – undo
137 141
         } else {
138 142
             $value = $this->fields;
139 143
         }
140
-        while ( $tok !== false ){
144
+        while ( $tok !== false ) {
141 145
             $value =& $value[$tok];
142 146
             $tok = strtok('.');
143 147
         }
144
-        if ( is_callable($operation) ) $operation($value);
148
+        if ( is_callable($operation) ) {
149
+          $operation($value);
150
+        }
145 151
         return $value;
146 152
     }
147 153
 
@@ -152,7 +158,7 @@  discard block
 block discarded – undo
152 158
      *
153 159
      * @return string        The json object
154 160
      */
155
-    public function jsonSerialize(){
161
+    public function jsonSerialize() {
156 162
       return $this->fields;
157 163
     }
158 164
 
Please login to merge, or discard this patch.