Completed
Branch develop (6d735e)
by Timothy
07:48
created
src/API/Kitsu/Transformer/AnimeListTransformer.php 2 patches
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@  discard block
 block discarded – undo
1
-<?php declare(strict_types=1);
1
+<?php declare(strict_types = 1);
2 2
 /**
3 3
  * Anime List Client
4 4
  *
@@ -41,10 +41,10 @@  discard block
 block discarded – undo
41 41
 		$genres = array_column($anime['relationships']['genres'], 'name') ?? [];
42 42
 		sort($genres);
43 43
 		
44
-		$rating = (int) 2 * $item['attributes']['rating'];
44
+		$rating = (int)2 * $item['attributes']['rating'];
45 45
 
46
-		$total_episodes = array_key_exists('episodeCount', $anime) && (int) $anime['episodeCount'] !== 0
47
-			? (int) $anime['episodeCount']
46
+		$total_episodes = array_key_exists('episodeCount', $anime) && (int)$anime['episodeCount'] !== 0
47
+			? (int)$anime['episodeCount']
48 48
 			: '-';
49 49
 		
50 50
 		$MALid = NULL;
@@ -69,8 +69,8 @@  discard block
 block discarded – undo
69 69
 			'id' => $item['id'],
70 70
 			'mal_id' => $MALid,
71 71
 			'episodes' => [
72
-				'watched' => (int) $item['attributes']['progress'] !== '0'
73
-					? (int) $item['attributes']['progress']
72
+				'watched' => (int)$item['attributes']['progress'] !== '0'
73
+					? (int)$item['attributes']['progress']
74 74
 					: '-',
75 75
 				'total' => $total_episodes,
76 76
 				'length' => $anime['episodeLength'],
@@ -92,10 +92,10 @@  discard block
 block discarded – undo
92 92
 			],
93 93
 			'watching_status' => $item['attributes']['status'],
94 94
 			'notes' => $item['attributes']['notes'],
95
-			'rewatching' => (bool) $item['attributes']['reconsuming'],
96
-			'rewatched' => (int) $item['attributes']['reconsumeCount'],
97
-			'user_rating' => ($rating === 0) ? '-' : (int) $rating,
98
-			'private' => (bool) $item['attributes']['private'] ?? false,
95
+			'rewatching' => (bool)$item['attributes']['reconsuming'],
96
+			'rewatched' => (int)$item['attributes']['reconsumeCount'],
97
+			'user_rating' => ($rating === 0) ? '-' : (int)$rating,
98
+			'private' => (bool)$item['attributes']['private'] ?? false,
99 99
 		];
100 100
 	}
101 101
 
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
 			]
126 126
 		];
127 127
 
128
-		if ((int) $untransformed['data']['rating'] === 0)
128
+		if ((int)$untransformed['data']['rating'] === 0)
129 129
 		{
130 130
 			unset($untransformed['data']['rating']);
131 131
 		}
Please login to merge, or discard this patch.
Upper-Lower-Casing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
 			'rewatching' => (bool) $item['attributes']['reconsuming'],
96 96
 			'rewatched' => (int) $item['attributes']['reconsumeCount'],
97 97
 			'user_rating' => ($rating === 0) ? '-' : (int) $rating,
98
-			'private' => (bool) $item['attributes']['private'] ?? false,
98
+			'private' => (bool) $item['attributes']['private'] ?? FALSE,
99 99
 		];
100 100
 	}
101 101
 
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
 
114 114
 		$untransformed = [
115 115
 			'id' => $item['id'],
116
-			'mal_id' => $item['mal_id'] ?? null,
116
+			'mal_id' => $item['mal_id'] ?? NULL,
117 117
 			'data' => [
118 118
 				'status' => $item['watching_status'],
119 119
 				'rating' => $item['user_rating'] / 2,
Please login to merge, or discard this patch.
src/API/Kitsu/Transformer/MangaTransformer.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@  discard block
 block discarded – undo
1
-<?php declare(strict_types=1);
1
+<?php declare(strict_types = 1);
2 2
 /**
3 3
  * Anime List Client
4 4
  *
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
 	{
35 35
 		$genres = [];
36 36
 		
37
-		foreach($item['included'] as $included)
37
+		foreach ($item['included'] as $included)
38 38
 		{
39 39
 			if ($included['type'] === 'genres')
40 40
 			{
Please login to merge, or discard this patch.
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@
 block discarded – undo
58 58
 		];
59 59
 	}
60 60
 
61
-	private function count(int $value = null)
61
+	private function count(int $value = NULL)
62 62
 	{
63 63
 		return ((int)$value === 0)
64 64
 			? '-'
Please login to merge, or discard this patch.
src/API/Kitsu/Transformer/AnimeTransformer.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@
 block discarded – undo
1
-<?php declare(strict_types=1);
1
+<?php declare(strict_types = 1);
2 2
 /**
3 3
  * Anime List Client
4 4
  *
Please login to merge, or discard this patch.
src/API/Kitsu/Transformer/MangaListTransformer.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@  discard block
 block discarded – undo
1
-<?php declare(strict_types=1);
1
+<?php declare(strict_types = 1);
2 2
 /**
3 3
  * Anime List Client
4 4
  *
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
 	public function transform($item)
37 37
 	{
38 38
 /*?><pre><?= print_r($item, TRUE) ?></pre><?php*/
39
-		$manga =& $item['manga'];
39
+		$manga = & $item['manga'];
40 40
 
41 41
 		$rating = (is_numeric($item['attributes']['rating']))
42 42
 			? intval(2 * $item['attributes']['rating'])
Please login to merge, or discard this patch.
src/API/MAL/Model.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@  discard block
 block discarded – undo
1
-<?php declare(strict_types=1);
1
+<?php declare(strict_types = 1);
2 2
 /**
3 3
  * Anime List Client
4 4
  *
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
 			]
70 70
 		]);
71 71
 
72
-		return $list;//['anime'];
72
+		return $list; //['anime'];
73 73
 	}
74 74
 
75 75
 	public function getListItem(string $listId): array
Please login to merge, or discard this patch.
src/API/MAL/ListItem.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@
 block discarded – undo
1
-<?php declare(strict_types=1);
1
+<?php declare(strict_types = 1);
2 2
 /**
3 3
  * Anime List Client
4 4
  *
Please login to merge, or discard this patch.
src/API/MAL/Enum/MangaReadingStatus.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@
 block discarded – undo
1
-<?php declare(strict_types=1);
1
+<?php declare(strict_types = 1);
2 2
 /**
3 3
  * Anime List Client
4 4
  *
Please login to merge, or discard this patch.
src/API/MAL/Enum/AnimeWatchingStatus.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@
 block discarded – undo
1
-<?php declare(strict_types=1);
1
+<?php declare(strict_types = 1);
2 2
 /**
3 3
  * Anime List Client
4 4
  *
Please login to merge, or discard this patch.
src/API/MAL/Transformer/AnimeListTransformer.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@  discard block
 block discarded – undo
1
-<?php declare(strict_types=1);
1
+<?php declare(strict_types = 1);
2 2
 /**
3 3
  * Anime List Client
4 4
  *
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
 			'data' => [
42 42
 				'status' => self::statusMap[$item['watching_status']],
43 43
 				'rating' => $item['user_rating'],
44
-				'rewatch_value' => (int) $rewatching,
44
+				'rewatch_value' => (int)$rewatching,
45 45
 				'times_rewatched' => $item['rewatched'],
46 46
 				'comments' => $item['notes'],
47 47
 				'episode' => $item['episodes_watched']
Please login to merge, or discard this patch.