| @@ -29,7 +29,7 @@ discard block | ||
| 29 | 29 | |
| 30 | 30 | protected $default; | 
| 31 | 31 | |
| 32 | - protected $label; | |
| 32 | + protected $label; | |
| 33 | 33 | |
| 34 | 34 | protected $rules; | 
| 35 | 35 | |
| @@ -43,7 +43,7 @@ discard block | ||
| 43 | 43 | 'required' => false, | 
| 44 | 44 | 'nullable' => false, | 
| 45 | 45 | 'default' => '', | 
| 46 | - 'label' => $name, | |
| 46 | + 'label' => $name, | |
| 47 | 47 | ]; | 
| 48 | 48 | $rules += $defaults; | 
| 49 | 49 | |
| @@ -66,17 +66,17 @@ discard block | ||
| 66 | 66 | return isset($this->$key) || isset($this->rules[$key]); | 
| 67 | 67 | } | 
| 68 | 68 | |
| 69 | -    public function toArray() { | |
| 70 | - return [ | |
| 71 | - 'name' => $this->name, | |
| 72 | - 'type' => $this->type, | |
| 73 | - 'required' => $this->required, | |
| 74 | - 'nullable' => $this->nullable, | |
| 75 | - 'default' => $this->default, | |
| 76 | - 'label' => $this->label, | |
| 77 | - 'rules' => $this->rules, | |
| 78 | - ]; | |
| 79 | - } | |
| 69 | +	public function toArray() { | |
| 70 | + return [ | |
| 71 | + 'name' => $this->name, | |
| 72 | + 'type' => $this->type, | |
| 73 | + 'required' => $this->required, | |
| 74 | + 'nullable' => $this->nullable, | |
| 75 | + 'default' => $this->default, | |
| 76 | + 'label' => $this->label, | |
| 77 | + 'rules' => $this->rules, | |
| 78 | + ]; | |
| 79 | + } | |
| 80 | 80 | |
| 81 | 81 |  	public function isNumeric() { | 
| 82 | 82 | return in_array($this->type, [ | 
| @@ -335,7 +335,7 @@ discard block | ||
| 335 | 335 | $this->required = $rules['required']; | 
| 336 | 336 | $this->nullable = $rules['nullable']; | 
| 337 | 337 | $this->default = $rules['default']; | 
| 338 | - $this->label = $rules['label']; | |
| 338 | + $this->label = $rules['label']; | |
| 339 | 339 | |
| 340 | 340 | unset( | 
| 341 | 341 | $rules['required'], | 
| @@ -46,9 +46,9 @@ discard block | ||
| 46 | 46 |  			new \Twig_SimpleFilter('md5', 'md5'), | 
| 47 | 47 |  			new \Twig_SimpleFilter('sha1', 'sha1'), | 
| 48 | 48 |  			new \Twig_SimpleFilter('truncate', function( $str, $length, $replace = '...' ) { | 
| 49 | - if( isset($str) ) | |
| 50 | - return strlen($str) <= $length ? $str : substr($str, 0, $length - strip_tags($replace)) . $replace; | |
| 51 | - return null; | |
| 49 | + if( isset($str) ) | |
| 50 | + return strlen($str) <= $length ? $str : substr($str, 0, $length - strip_tags($replace)) . $replace; | |
| 51 | + return null; | |
| 52 | 52 | }), | 
| 53 | 53 |  			new \Twig_SimpleFilter('sum', 'array_sum'), | 
| 54 | 54 |  			new \Twig_SimpleFilter('shuffle', 'shuffle'), | 
| @@ -76,18 +76,18 @@ discard block | ||
| 76 | 76 | |
| 77 | 77 |  	public function getFunctions() { | 
| 78 | 78 | |
| 79 | - $functions = [ | |
| 80 | -            new \Twig_SimpleFunction('ceil', 'ceil'), | |
| 81 | -            new \Twig_SimpleFunction('floor', 'floor'), | |
| 82 | - ]; | |
| 79 | + $functions = [ | |
| 80 | +			new \Twig_SimpleFunction('ceil', 'ceil'), | |
| 81 | +			new \Twig_SimpleFunction('floor', 'floor'), | |
| 82 | + ]; | |
| 83 | 83 | |
| 84 | 84 | // include some helpful shit from yolk-core/StringHelper if we have it available | 
| 85 | -        if( class_exists ('\\yolk\\helpers\\StringHelper') ) { | |
| 85 | +		if( class_exists ('\\yolk\\helpers\\StringHelper') ) { | |
| 86 | 86 | $functions = array_merge( | 
| 87 | 87 | $functions, | 
| 88 | 88 | [ | 
| 89 | -		            new \Twig_SimpleFunction('randomHex', ['\\yolk\\helpers\\StringHelper', 'randomHex']), | |
| 90 | -		            new \Twig_SimpleFunction('randomString', ['\\yolk\\helpers\\StringHelper', 'randomString']), | |
| 89 | +					new \Twig_SimpleFunction('randomHex', ['\\yolk\\helpers\\StringHelper', 'randomHex']), | |
| 90 | +					new \Twig_SimpleFunction('randomString', ['\\yolk\\helpers\\StringHelper', 'randomString']), | |
| 91 | 91 | ] | 
| 92 | 92 | ); | 
| 93 | 93 | } |