@@ -13,7 +13,7 @@ |
||
| 13 | 13 | public function __construct($actionId, callable $handles, callable $parameters = null) { |
| 14 | 14 | $this->actionId = $actionId; |
| 15 | 15 | $this->handles = $handles; |
| 16 | - $this->parameters = $parameters ?: function () { |
|
| 16 | + $this->parameters = $parameters ?: function() { |
|
| 17 | 17 | return []; |
| 18 | 18 | }; |
| 19 | 19 | } |
@@ -11,9 +11,9 @@ |
||
| 11 | 11 | * @param string $identifierKey |
| 12 | 12 | */ |
| 13 | 13 | public function __construct($target, $actionId, $identifierKey) { |
| 14 | - parent::__construct($actionId, function ($object) { |
|
| 14 | + parent::__construct($actionId, function($object) { |
|
| 15 | 15 | return $object instanceof Identifier; |
| 16 | - }, function (Identifier $object) use ($identifierKey) { |
|
| 16 | + }, function(Identifier $object) use ($identifierKey) { |
|
| 17 | 17 | return [$identifierKey => $object->getId()]; |
| 18 | 18 | }); |
| 19 | 19 | } |
@@ -28,7 +28,7 @@ |
||
| 28 | 28 | |
| 29 | 29 | if ($objects) { |
| 30 | 30 | $reader = new PropertyReader($types, get_class($objects[0])); |
| 31 | - $this->properties = $reader->readInterface($objects[0])->filter(function (Property $property) { |
|
| 31 | + $this->properties = $reader->readInterface($objects[0])->filter(function(Property $property) { |
|
| 32 | 32 | return $property->canGet(); |
| 33 | 33 | }); |
| 34 | 34 | } |
@@ -54,7 +54,7 @@ discard block |
||
| 54 | 54 | return null; |
| 55 | 55 | } |
| 56 | 56 | |
| 57 | - return $this->parser->parse(implode("\n", array_map(function ($line) { |
|
| 57 | + return $this->parser->parse(implode("\n", array_map(function($line) { |
|
| 58 | 58 | return ltrim($line, " *\r\n\t"); |
| 59 | 59 | }, array_slice(explode("\n", $docComment), 1, -1)))); |
| 60 | 60 | } |
@@ -100,7 +100,7 @@ discard block |
||
| 100 | 100 | |
| 101 | 101 | protected function createInstance(array $parameters) { |
| 102 | 102 | $injector = new Injector(new Factory()); |
| 103 | - $instance = $injector->injectConstructor($this->class->name, $parameters, function () { |
|
| 103 | + $instance = $injector->injectConstructor($this->class->name, $parameters, function() { |
|
| 104 | 104 | return false; |
| 105 | 105 | }); |
| 106 | 106 | |
@@ -74,7 +74,7 @@ |
||
| 74 | 74 | * @throws \Exception |
| 75 | 75 | */ |
| 76 | 76 | public function parameters() { |
| 77 | - return array_map(function (Parameter $parameter) { |
|
| 77 | + return array_map(function(Parameter $parameter) { |
|
| 78 | 78 | if (array_key_exists($parameter->getName(), $this->paramMap)) { |
| 79 | 79 | return call_user_func($this->paramMap[$parameter->getName()], $parameter); |
| 80 | 80 | } |
@@ -19,10 +19,10 @@ |
||
| 19 | 19 | ->setCaption(parent::caption()) |
| 20 | 20 | ->setDescription(parent::description()) |
| 21 | 21 | ->setParameters(parent::parameters()) |
| 22 | - ->setExecute(function ($parameters) { |
|
| 22 | + ->setExecute(function($parameters) { |
|
| 23 | 23 | return parent::execute($parameters); |
| 24 | 24 | }) |
| 25 | - ->setFill(function ($parameters) { |
|
| 25 | + ->setFill(function($parameters) { |
|
| 26 | 26 | return $parameters; |
| 27 | 27 | }); |
| 28 | 28 | } |
@@ -19,10 +19,10 @@ |
||
| 19 | 19 | ->setCaption(parent::caption()) |
| 20 | 20 | ->setDescription(parent::description()) |
| 21 | 21 | ->setParameters(parent::parameters()) |
| 22 | - ->setExecute(function ($parameters) { |
|
| 22 | + ->setExecute(function($parameters) { |
|
| 23 | 23 | return parent::execute($parameters); |
| 24 | 24 | }) |
| 25 | - ->setFill(function ($parameters) { |
|
| 25 | + ->setFill(function($parameters) { |
|
| 26 | 26 | return $parameters; |
| 27 | 27 | }); |
| 28 | 28 | } |
@@ -28,7 +28,7 @@ discard block |
||
| 28 | 28 | header('X-Accel-Buffering: no'); |
| 29 | 29 | ob_end_flush(); |
| 30 | 30 | |
| 31 | - $value->setPrinter(function ($string) { |
|
| 31 | + $value->setPrinter(function($string) { |
|
| 32 | 32 | echo $string; |
| 33 | 33 | |
| 34 | 34 | $length = strlen($string); |
@@ -39,14 +39,14 @@ discard block |
||
| 39 | 39 | flush(); |
| 40 | 40 | ob_flush(); |
| 41 | 41 | }); |
| 42 | - $value->setExceptionHandler(function (\Exception $exception) { |
|
| 42 | + $value->setExceptionHandler(function(\Exception $exception) { |
|
| 43 | 43 | echo '</pre>'; |
| 44 | 44 | echo new Element('div', ['class' => 'alert alert-danger'], [ |
| 45 | 45 | htmlentities($exception->getMessage()) |
| 46 | 46 | ]); |
| 47 | 47 | }); |
| 48 | 48 | |
| 49 | - return new DelayedOutput(function () use ($value) { |
|
| 49 | + return new DelayedOutput(function() use ($value) { |
|
| 50 | 50 | $value->write('<pre>'); |
| 51 | 51 | $value->__toString(); |
| 52 | 52 | $value->write('</pre>'); |
@@ -31,19 +31,19 @@ discard block |
||
| 31 | 31 | public function __construct(WebField $field) { |
| 32 | 32 | $this->field = $field; |
| 33 | 33 | |
| 34 | - $this->handles = function (Parameter $parameter) { |
|
| 34 | + $this->handles = function(Parameter $parameter) { |
|
| 35 | 35 | return $this->field->handles($parameter); |
| 36 | 36 | }; |
| 37 | - $this->beforeRender = function ($value) { |
|
| 37 | + $this->beforeRender = function($value) { |
|
| 38 | 38 | return $value; |
| 39 | 39 | }; |
| 40 | - $this->afterInflate = function ($value) { |
|
| 40 | + $this->afterInflate = function($value) { |
|
| 41 | 41 | return $value; |
| 42 | 42 | }; |
| 43 | - $this->afterHeadElements = function ($elements) { |
|
| 43 | + $this->afterHeadElements = function($elements) { |
|
| 44 | 44 | return $elements; |
| 45 | 45 | }; |
| 46 | - $this->transformParameter = function ($parameter) { |
|
| 46 | + $this->transformParameter = function($parameter) { |
|
| 47 | 47 | return $parameter; |
| 48 | 48 | }; |
| 49 | 49 | } |
@@ -105,7 +105,7 @@ discard block |
||
| 105 | 105 | * @return static |
| 106 | 106 | */ |
| 107 | 107 | public function setHandlesParameterName($name) { |
| 108 | - $this->setHandles(function (Parameter $parameter) use ($name) { |
|
| 108 | + $this->setHandles(function(Parameter $parameter) use ($name) { |
|
| 109 | 109 | return $parameter->getName() == $name; |
| 110 | 110 | }); |
| 111 | 111 | return $this; |