for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
use Slim\Slim;
class Xhgui_Controller_Import extends Xhgui_Controller
{
/**
* @var Xhgui_Saver_Interface
*/
private $saver;
public function __construct(Slim $app, Xhgui_Saver_Interface $saver)
parent::__construct($app);
$this->saver = $saver;
}
public function import()
$request = $this->app->request();
$response = $this->app->response();
$data = json_decode($request->getBody(), true);
$this->saver->save($data);
$response['Content-Type'] = 'application/json';
$response->body(json_encode(['ok' => true]));
body
$response
array<string,string,{"Content-Type":"string"}>
Methods can only be called on objects. This check looks for methods being called on variables that have been inferred to never be objects.
Methods can only be called on objects. This check looks for methods being called on variables that have been inferred to never be objects.