Skip to content

Commit

Permalink
Add missing type hints
Browse files Browse the repository at this point in the history
  • Loading branch information
rok-povsic committed Oct 22, 2018
1 parent 66c2601 commit 9b35c34
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 26 deletions.
2 changes: 1 addition & 1 deletion src/Clarifai/API/ClarifaiClientInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ public function searchConcepts($query);
/**
* Adds inputs.
*
* @param $inputs
* @param ClarifaiClient|ClarifaiInput[] $inputs
* @return AddInputsRequest A new instance.
*/
public function addInputs($inputs);
Expand Down
55 changes: 30 additions & 25 deletions src/Clarifai/DTOs/Outputs/ClarifaiOutput.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,48 @@
use Clarifai\DTOs\Predictions\Focus;
use Clarifai\DTOs\Predictions\Frame;
use Clarifai\DTOs\Predictions\Logo;
use Clarifai\DTOs\Predictions\PredictionInterface;
use Clarifai\Exceptions\ClarifaiException;
use Clarifai\Internal\_Data;
use Clarifai\Internal\_Output;

class ClarifaiOutput
{
private $id;
/**
* @return string
*/
public function id() { return $this->id; }

private $createdAt;
/**
* @return \DateTime
*/
public function createdAt() { return $this->createdAt; }

private $model;
/**
* @return Model
*/
public function model() { return $this->model; }

private $input;
/**
* @return ClarifaiInput
*/
public function input() { return $this->input; }

private $predictions;
/**
* @return PredictionInterface[]
*/
public function data() { return $this->predictions; }

private $status;
/**
* @return ClarifaiStatus
*/
public function status() { return $this->status; }

protected function __construct($id, $createdAt, $model, $input, $predictions, $status)
{
Expand All @@ -39,31 +69,6 @@ protected function __construct($id, $createdAt, $model, $input, $predictions, $s
$this->status = $status;
}

public function id()
{
return $this->id;
}

public function createdAt() {
return $this->createdAt;
}

public function model() {
return $this->model;
}

public function input() {
return $this->input;
}

public function data() {
return $this->predictions;
}

public function status() {
return $this->status;
}

/**
* @param ClarifaiHttpClientInterface $client
* @param ModelType $modelType
Expand Down

0 comments on commit 9b35c34

Please sign in to comment.