@@ -67,7 +67,7 @@ |
||
| 67 | 67 | $value = (array) $value; |
| 68 | 68 | $return = array(); |
| 69 | 69 | $separator = $this->separator; |
| 70 | - array_walk_recursive($value, function ($item) use (&$return, $separator) { |
|
| 70 | + array_walk_recursive($value, function($item) use (&$return, $separator) { |
|
| 71 | 71 | if (is_string($item)) { |
| 72 | 72 | $item = explode($separator, $item); |
| 73 | 73 | } |
@@ -28,7 +28,7 @@ |
||
| 28 | 28 | $namespace = '\\Tacone\\Bees\\Field'; |
| 29 | 29 | $fields = ['string', 'integer', 'float', 'boolean']; |
| 30 | 30 | foreach ($fields as $class) { |
| 31 | - App::bind("bees.$class", function ($app, $arguments) use ($class, $namespace) { |
|
| 31 | + App::bind("bees.$class", function($app, $arguments) use ($class, $namespace) { |
|
| 32 | 32 | $class = Str::studly($class).'Field'; |
| 33 | 33 | $reflect = new ReflectionClass($namespace."\\$class"); |
| 34 | 34 | $instance = $reflect->newInstanceArgs($arguments); |
@@ -6,19 +6,19 @@ |
||
| 6 | 6 | { |
| 7 | 7 | public static function toString() |
| 8 | 8 | { |
| 9 | - return function ($value) { |
|
| 9 | + return function($value) { |
|
| 10 | 10 | return (string) $value; |
| 11 | 11 | }; |
| 12 | 12 | } |
| 13 | 13 | public static function toInteger() |
| 14 | 14 | { |
| 15 | - return function ($value) { |
|
| 15 | + return function($value) { |
|
| 16 | 16 | return (int) $value; |
| 17 | 17 | }; |
| 18 | 18 | } |
| 19 | 19 | public static function toFloat() |
| 20 | 20 | { |
| 21 | - return function ($value) { |
|
| 21 | + return function($value) { |
|
| 22 | 22 | return (float) $value; |
| 23 | 23 | }; |
| 24 | 24 | } |
@@ -9,6 +9,10 @@ |
||
| 9 | 9 | protected $path; |
| 10 | 10 | protected $default; |
| 11 | 11 | |
| 12 | + /** |
|
| 13 | + * @param \Tacone\Bees\Field\Field $object |
|
| 14 | + * @param string $path |
|
| 15 | + */ |
|
| 12 | 16 | protected function __construct($object, &$storage, $path) |
| 13 | 17 | { |
| 14 | 18 | $this->object = $object; |
@@ -6,6 +6,6 @@ |
||
| 6 | 6 | { |
| 7 | 7 | public function cast() |
| 8 | 8 | { |
| 9 | - return (boolean)$this->value(); |
|
| 9 | + return (boolean) $this->value(); |
|
| 10 | 10 | } |
| 11 | 11 | } |
@@ -7,6 +7,6 @@ |
||
| 7 | 7 | |
| 8 | 8 | public function cast() |
| 9 | 9 | { |
| 10 | - return (string)$this->value(); |
|
| 10 | + return (string) $this->value(); |
|
| 11 | 11 | } |
| 12 | 12 | } |
@@ -7,6 +7,6 @@ |
||
| 7 | 7 | |
| 8 | 8 | public function cast() |
| 9 | 9 | { |
| 10 | - return (integer)$this->value(); |
|
| 10 | + return (integer) $this->value(); |
|
| 11 | 11 | } |
| 12 | 12 | } |