Skip to content

Commit

Permalink
PHPDoc: Missing returns (#7624)
Browse files Browse the repository at this point in the history
* PHPDoc: Missing returns

* getVersionPreview should return string
  • Loading branch information
blankse committed Dec 1, 2020
1 parent 31ca2e7 commit 5ac36d2
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 3 deletions.
Expand Up @@ -346,6 +346,8 @@ public function getTokens()

/**
* @param array $tokens
*
* @return static
*/
public function setTokens($tokens)
{
Expand Down
Expand Up @@ -90,6 +90,8 @@ class BackendController
/**
* @param Request $request
* @Route("/admin/find-by-external-id")
*
* @return JsonResponse
*/
public function findByWordpressId(Request $request) {
if($id = (int)$request->get('external-id')) {
Expand All @@ -102,4 +104,4 @@ class BackendController
}
}

```
```
6 changes: 5 additions & 1 deletion models/Asset/MetaData/ClassDefinition/Data/Data.php
Expand Up @@ -167,10 +167,12 @@ public function resolveDependencies($data, $params = [])
/**
* @param mixed $value
* @param array $params
*
* @return string
*/
public function getVersionPreview($value, $params = [])
{
return $value;
return (string)$value;
}

/**
Expand All @@ -184,5 +186,7 @@ public function getDataForSearchIndex($data, $params = [])
if (is_scalar($data)) {
return $params['name'] . ':' . $data;
}

return null;
}
}
4 changes: 3 additions & 1 deletion models/Asset/MetaData/ClassDefinition/Data/Date.php
Expand Up @@ -37,9 +37,11 @@ public function marshal($value, $params = [])
/**
* @param mixed $value
* @param array $params
*
* @return string
*/
public function getVersionPreview($value, $params = [])
{
return date('m/d/Y', $value);
return (string)date('m/d/Y', $value);
}
}
2 changes: 2 additions & 0 deletions models/GridConfigFavourite/Listing.php
Expand Up @@ -36,6 +36,8 @@ public function getGridconfigFavourites()

/**
* @param array $gridconfigFavourites
*
* @return static
*/
public function setGridconfigFavourites($gridconfigFavourites)
{
Expand Down
2 changes: 2 additions & 0 deletions models/GridConfigShare/Listing.php
Expand Up @@ -36,6 +36,8 @@ public function getGridconfigShares()

/**
* @param array $gridconfigShares
*
* @return static
*/
public function setGridconfigShares($gridconfigShares)
{
Expand Down
2 changes: 2 additions & 0 deletions models/ImportConfigShare/Listing.php
Expand Up @@ -36,6 +36,8 @@ public function getImportConfigShares(): array

/**
* @param array $importConfigShares
*
* @return static
*/
public function setImportConfigShares(array $importConfigShares)
{
Expand Down

0 comments on commit 5ac36d2

Please sign in to comment.