Automatically fix some docblocks
All checks were successful
timw4mail/HummingBirdAnimeClient/develop This commit looks good

This commit is contained in:
Timothy Warren 2019-12-09 14:41:04 -05:00
parent acd3b84b55
commit 698025146f
6 changed files with 18 additions and 7 deletions

View File

@ -29,7 +29,7 @@ if ( ! function_exists('glob_recursive'))
} }
} }
function get_text_to_replace($tokens) function get_text_to_replace(array $tokens): string
{ {
$output = ''; $output = '';
@ -57,7 +57,7 @@ function get_text_to_replace($tokens)
return $output; return $output;
} }
function get_tokens($source) function get_tokens($source): array
{ {
return token_get_all($source); return token_get_all($source);
} }

View File

@ -179,7 +179,8 @@ final class Model
* *
* @param string $malId - The unique identifier of that list item * @param string $malId - The unique identifier of that list item
* @param string $type - Them media type (anime/manga) * @param string $type - Them media type (anime/manga)
* @return mixed *
* @return array
*/ */
public function getListItem(string $malId, string $type): array public function getListItem(string $malId, string $type): array
{ {

View File

@ -26,7 +26,10 @@ use Aviat\Ion\Transformer\AbstractTransformer;
*/ */
final class CharacterTransformer extends AbstractTransformer { final class CharacterTransformer extends AbstractTransformer {
public function transform($characterData): Character /**
* @param array $characterData
*/
public function transform(array $characterData): Character
{ {
$data = JsonAPI::organizeData($characterData); $data = JsonAPI::organizeData($characterData);
$attributes = $data[0]['attributes']; $attributes = $data[0]['attributes'];

View File

@ -25,7 +25,7 @@ use Aviat\Ion\Transformer\AbstractTransformer;
*/ */
final class PersonTransformer extends AbstractTransformer { final class PersonTransformer extends AbstractTransformer {
public function transform($personData): Person public function transform(array $personData): Person
{ {
$data = JsonAPI::organizeData($personData); $data = JsonAPI::organizeData($personData);
$included = JsonAPI::organizeIncludes($personData['included']); $included = JsonAPI::organizeIncludes($personData['included']);

View File

@ -26,7 +26,7 @@ use Aviat\Ion\Transformer\AbstractTransformer;
* Transform user profile data for display * Transform user profile data for display
*/ */
final class UserTransformer extends AbstractTransformer { final class UserTransformer extends AbstractTransformer {
public function transform($profileData): User public function transform(array $profileData): User
{ {
$orgData = JsonAPI::organizeData($profileData)[0]; $orgData = JsonAPI::organizeData($profileData)[0];
$attributes = $orgData['attributes']; $attributes = $orgData['attributes'];
@ -132,7 +132,7 @@ final class UserTransformer extends AbstractTransformer {
return $output; return $output;
} }
private function organizeStats($stats, $data = []): array private function organizeStats(array $stats, $data = []): array
{ {
$animeStats = []; $animeStats = [];
$mangaStats = []; $mangaStats = [];

View File

@ -167,6 +167,8 @@ final class AnimeCollection extends Collection {
* Verify that an item was added * Verify that an item was added
* *
* @param $data * @param $data
* @param array|null|object $data
*
* @return bool * @return bool
*/ */
public function wasAdded($data): bool public function wasAdded($data): bool
@ -205,6 +207,8 @@ final class AnimeCollection extends Collection {
* Verify that the collection item was updated * Verify that the collection item was updated
* *
* @param $data * @param $data
* @param array|null|object $data
*
* @return bool * @return bool
*/ */
public function wasUpdated($data): bool public function wasUpdated($data): bool
@ -243,6 +247,9 @@ final class AnimeCollection extends Collection {
->delete('anime_set'); ->delete('anime_set');
} }
/**
* @param array|null|object $data
*/
public function wasDeleted($data): bool public function wasDeleted($data): bool
{ {
$animeRow = $this->get($data['hummingbird_id']); $animeRow = $this->get($data['hummingbird_id']);