for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php namespace Understand\UnderstandLaravel5\Handlers;
class CallbackHandler extends BaseHandler
{
/**
* Callback
*
* @var callable
*/
protected $callback;
* Set callback
* @param type $callback
* @return void
@return
Adding a @return annotation to a constructor is not recommended, since a constructor does not have a meaningful return value.
Please refer to the PHP core documentation on constructors.
public function __construct($callback)
$this->callback = $callback;
}
* Call user defined callback with request data
* @param mixed $requestData
* @return mixed
protected function send($requestData)
return call_user_func_array($this->callback, [$requestData]);
Adding a
@return
annotation to a constructor is not recommended, since a constructor does not have a meaningful return value.Please refer to the PHP core documentation on constructors.