Passed
Branch develop (61f351)
by Alexey
01:52
created
src/GPlayApps.php 1 patch
Spacing   +27 added lines, -29 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
     public const DEFAULT_COUNTRY = 'us'; // Affected price
60 60
 
61 61
     public const GOOGLE_PLAY_URL = 'https://play.google.com';
62
-    public const GOOGLE_PLAY_APPS_URL = self::GOOGLE_PLAY_URL . '/store/apps';
62
+    public const GOOGLE_PLAY_APPS_URL = self::GOOGLE_PLAY_URL.'/store/apps';
63 63
     public const MAX_SEARCH_RESULTS = 250;
64 64
 
65 65
     public const REQ_PARAM_LOCALE = 'hl';
@@ -328,7 +328,7 @@  discard block
 block discarded – undo
328 328
         }
329 329
 
330 330
         $preferredApp = $list[$preferredLocale];
331
-        $list = array_filter($list, static function (AppDetail $app, string $locale) use ($preferredApp, $list) {
331
+        $list = array_filter($list, static function(AppDetail $app, string $locale) use ($preferredApp, $list) {
332 332
             // deletes locales in which there is no translation added, but automatic translation by Google Translate is used.
333 333
             if ($preferredApp->getLocale() === $locale || !$preferredApp->equals($app)) {
334 334
                 if (($pos = strpos($locale, '_')) !== false) {
@@ -352,7 +352,7 @@  discard block
 block discarded – undo
352 352
         // sorting array keys; the first key is the preferred locale
353 353
         uksort(
354 354
             $list,
355
-            static function (
355
+            static function(
356 356
                 /** @noinspection PhpUnusedParameterInspection */
357 357
                 string $a,
358 358
                 string $b
@@ -376,7 +376,7 @@  discard block
 block discarded – undo
376 376
         $requestApp = $this->castToRequestApp($requestApp);
377 377
 
378 378
         try {
379
-            return (bool)$this->getHttpClient()->request(
379
+            return (bool) $this->getHttpClient()->request(
380 380
                 'HEAD',
381 381
                 $requestApp->getFullUrl(),
382 382
                 [
@@ -452,8 +452,7 @@  discard block
 block discarded – undo
452 452
         try {
453 453
             do {
454 454
                 $count = $limit === -1 ?
455
-                    PlayStoreUiRequest::LIMIT_REVIEW_ON_PAGE :
456
-                    min(PlayStoreUiRequest::LIMIT_REVIEW_ON_PAGE, max($limit - $allCount, 1));
455
+                    PlayStoreUiRequest::LIMIT_REVIEW_ON_PAGE : min(PlayStoreUiRequest::LIMIT_REVIEW_ON_PAGE, max($limit - $allCount, 1));
457 456
 
458 457
                 $request = PlayStoreUiRequest::getReviewsRequest($requestApp, $count, $sort, $token);
459 458
 
@@ -540,8 +539,7 @@  discard block
 block discarded – undo
540 539
 
541 540
             while ($token !== null && ($limit === -1 || $allCount < $limit)) {
542 541
                 $count = $limit === -1 ?
543
-                    PlayStoreUiRequest::LIMIT_APPS_ON_PAGE :
544
-                    min(PlayStoreUiRequest::LIMIT_APPS_ON_PAGE, max($limit - $allCount, 1));
542
+                    PlayStoreUiRequest::LIMIT_APPS_ON_PAGE : min(PlayStoreUiRequest::LIMIT_APPS_ON_PAGE, max($limit - $allCount, 1));
545 543
 
546 544
                 $request = PlayStoreUiRequest::getAppsRequest($locale, $country, $count, $token);
547 545
 
@@ -572,7 +570,7 @@  discard block
 block discarded – undo
572 570
     {
573 571
         $requestApp = $this->castToRequestApp($requestApp);
574 572
 
575
-        $url = self::GOOGLE_PLAY_URL . '/store/xhr/getdoc?authuser=0';
573
+        $url = self::GOOGLE_PLAY_URL.'/store/xhr/getdoc?authuser=0';
576 574
         try {
577 575
             return $this->getHttpClient()->request(
578 576
                 'POST',
@@ -638,7 +636,7 @@  discard block
 block discarded – undo
638 636
         $urls = [];
639 637
         $url = self::GOOGLE_PLAY_APPS_URL;
640 638
         foreach ($locales as $locale) {
641
-            $urls[$locale] = $url . '?' . http_build_query([
639
+            $urls[$locale] = $url.'?'.http_build_query([
642 640
                     self::REQ_PARAM_LOCALE => $locale,
643 641
                 ]);
644 642
         }
@@ -685,7 +683,7 @@  discard block
 block discarded – undo
685 683
         }
686 684
 
687 685
         $locale = LocaleHelper::getNormalizeLocale($locale ?? $this->defaultLocale);
688
-        $url = self::GOOGLE_PLAY_APPS_URL . '/dev';
686
+        $url = self::GOOGLE_PLAY_APPS_URL.'/dev';
689 687
         try {
690 688
             return $this->getHttpClient()->request(
691 689
                 'GET',
@@ -716,7 +714,7 @@  discard block
 block discarded – undo
716 714
             return $developerId->getId();
717 715
         }
718 716
         if (is_int($developerId)) {
719
-            return (string)$developerId;
717
+            return (string) $developerId;
720 718
         }
721 719
         return $developerId;
722 720
     }
@@ -743,9 +741,9 @@  discard block
 block discarded – undo
743 741
         }
744 742
 
745 743
         $urls = [];
746
-        $url = self::GOOGLE_PLAY_APPS_URL . '/dev';
744
+        $url = self::GOOGLE_PLAY_APPS_URL.'/dev';
747 745
         foreach ($locales as $locale) {
748
-            $urls[$locale] = $url . '?' . http_build_query([
746
+            $urls[$locale] = $url.'?'.http_build_query([
749 747
                     self::REQ_PARAM_ID => $id,
750 748
                     self::REQ_PARAM_LOCALE => $locale,
751 749
                 ]);
@@ -780,7 +778,7 @@  discard block
 block discarded – undo
780 778
         $preferredLocale = self::DEFAULT_LOCALE;
781 779
 
782 780
         $preferredInfo = $list[$preferredLocale];
783
-        $list = array_filter($list, static function (Developer $info, string $locale) use ($preferredInfo, $preferredLocale) {
781
+        $list = array_filter($list, static function(Developer $info, string $locale) use ($preferredInfo, $preferredLocale) {
784 782
             return $locale === $preferredLocale || $preferredInfo->equals($info);
785 783
         }, ARRAY_FILTER_USE_BOTH);
786 784
 
@@ -828,7 +826,7 @@  discard block
 block discarded – undo
828 826
         ];
829 827
 
830 828
         if (is_numeric($developerId)) {
831
-            $developerUrl = self::GOOGLE_PLAY_APPS_URL . '/dev?' . http_build_query($query);
829
+            $developerUrl = self::GOOGLE_PLAY_APPS_URL.'/dev?'.http_build_query($query);
832 830
             try {
833 831
                 /**
834 832
                  * @var string|null $developerUrl
@@ -843,13 +841,13 @@  discard block
 block discarded – undo
843 841
                 if ($developerUrl === null) {
844 842
                     return [];
845 843
                 }
846
-                $developerUrl .= '&' . self::REQ_PARAM_LOCALE . '=' . urlencode($locale) .
847
-                    '&' . self::REQ_PARAM_COUNTRY . '=' . urlencode($country);
844
+                $developerUrl .= '&'.self::REQ_PARAM_LOCALE.'='.urlencode($locale).
845
+                    '&'.self::REQ_PARAM_COUNTRY.'='.urlencode($country);
848 846
             } catch (GuzzleException $e) {
849 847
                 throw new GooglePlayException($e->getMessage(), $e->getCode(), $e);
850 848
             }
851 849
         } else {
852
-            $developerUrl = self::GOOGLE_PLAY_APPS_URL . '/developer?' . http_build_query($query);
850
+            $developerUrl = self::GOOGLE_PLAY_APPS_URL.'/developer?'.http_build_query($query);
853 851
         }
854 852
 
855 853
         return $this->getAppsFromClusterPage(
@@ -903,7 +901,7 @@  discard block
 block discarded – undo
903 901
                         public function __invoke(RequestInterface $request, ResponseInterface $response)
904 902
                         {
905 903
                             $json = \GuzzleHttp\json_decode($response->getBody()->getContents(), true);
906
-                            return array_map(static function (array $v) {
904
+                            return array_map(static function(array $v) {
907 905
                                 return $v['s'];
908 906
                             }, $json);
909 907
                         }
@@ -953,7 +951,7 @@  discard block
 block discarded – undo
953 951
             'gl' => $country,
954 952
             'price' => $price->value(),
955 953
         ];
956
-        $clusterPageUrl = self::GOOGLE_PLAY_URL . '/store/search?' . http_build_query($params);
954
+        $clusterPageUrl = self::GOOGLE_PLAY_URL.'/store/search?'.http_build_query($params);
957 955
 
958 956
         return $this->getAppsFromClusterPage($clusterPageUrl, $locale, $country, $limit);
959 957
     }
@@ -995,11 +993,11 @@  discard block
 block discarded – undo
995 993
         $locale = LocaleHelper::getNormalizeLocale($locale ?? $this->defaultLocale);
996 994
         $country = $country ?? $this->defaultCountry;
997 995
 
998
-        $url = self::GOOGLE_PLAY_APPS_URL . '';
996
+        $url = self::GOOGLE_PLAY_APPS_URL.'';
999 997
         if ($category !== null) {
1000
-            $url .= '/category/' . $category->value();
998
+            $url .= '/category/'.$category->value();
1001 999
         }
1002
-        $url .= '/collection/' . $collection->value();
1000
+        $url .= '/collection/'.$collection->value();
1003 1001
 
1004 1002
         $offset = 0;
1005 1003
 
@@ -1068,14 +1066,14 @@  discard block
 block discarded – undo
1068 1066
         $mapping = [];
1069 1067
         foreach ($images as $image) {
1070 1068
             if (!$image instanceof GoogleImage) {
1071
-                throw new \InvalidArgumentException('An array of ' . GoogleImage::class . ' objects is expected.');
1069
+                throw new \InvalidArgumentException('An array of '.GoogleImage::class.' objects is expected.');
1072 1070
             }
1073 1071
             $destPath = $destPathFn($image);
1074 1072
             $mapping[$destPath] = $image->getUrl();
1075 1073
         }
1076 1074
 
1077 1075
         $httpClient = $this->getHttpClient();
1078
-        $promises = (static function () use ($mapping, $overwrite, $httpClient) {
1076
+        $promises = (static function() use ($mapping, $overwrite, $httpClient) {
1079 1077
             foreach ($mapping as $destPath => $url) {
1080 1078
                 if (!$overwrite && is_file($destPath)) {
1081 1079
                     yield $destPath => new FulfilledPromise($url);
@@ -1090,7 +1088,7 @@  discard block
 block discarded – undo
1090 1088
                             RequestOptions::SINK => $destPath,
1091 1089
                             RequestOptions::HTTP_ERRORS => true,
1092 1090
                         ])
1093
-                        ->then(static function (
1091
+                        ->then(static function(
1094 1092
                             /** @noinspection PhpUnusedParameterInspection */
1095 1093
                             ResponseInterface $response
1096 1094
                         ) use ($url) {
@@ -1106,10 +1104,10 @@  discard block
 block discarded – undo
1106 1104
         $imageInfoList = [];
1107 1105
         (new EachPromise($promises, [
1108 1106
             'concurrency' => $this->concurrency,
1109
-            'fulfilled' => static function (string $url, string $destPath) use (&$imageInfoList) {
1107
+            'fulfilled' => static function(string $url, string $destPath) use (&$imageInfoList) {
1110 1108
                 $imageInfoList[] = new ImageInfo($url, $destPath);
1111 1109
             },
1112
-            'rejected' => static function (\Throwable $reason, string $key) use ($mapping) {
1110
+            'rejected' => static function(\Throwable $reason, string $key) use ($mapping) {
1113 1111
                 $exceptionUrl = $mapping[$key];
1114 1112
                 foreach ($mapping as $destPath => $url) {
1115 1113
                     if (is_file($destPath)) {
Please login to merge, or discard this patch.
src/Scraper/FindDevAppsUrlScraper.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@
 block discarded – undo
36 36
         }
37 37
 
38 38
         if (isset($scriptDataApps[0][1][0][0][3][4][2])) {
39
-            return GPlayApps::GOOGLE_PLAY_URL . $scriptDataApps[0][1][0][0][3][4][2];
39
+            return GPlayApps::GOOGLE_PLAY_URL.$scriptDataApps[0][1][0][0][3][4][2];
40 40
         }
41 41
         return null;
42 42
     }
Please login to merge, or discard this patch.
src/Scraper/FindSimilarAppsUrlScraper.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -37,9 +37,9 @@
 block discarded – undo
37 37
         $scriptData = ScraperUtil::extractScriptData($response->getBody()->getContents());
38 38
         foreach ($scriptData as $key => $scriptValue) {
39 39
             if (isset($scriptValue[1][1][0][0][3][4][2])) {
40
-                return GPlayApps::GOOGLE_PLAY_URL . $scriptValue[1][1][0][0][3][4][2] .
41
-                    '&' . GPlayApps::REQ_PARAM_LOCALE . '=' . urlencode($this->requestApp->getLocale()) .
42
-                    '&' . GPlayApps::REQ_PARAM_COUNTRY . '=' . urlencode($this->requestApp->getCountry());
40
+                return GPlayApps::GOOGLE_PLAY_URL.$scriptValue[1][1][0][0][3][4][2].
41
+                    '&'.GPlayApps::REQ_PARAM_LOCALE.'='.urlencode($this->requestApp->getLocale()).
42
+                    '&'.GPlayApps::REQ_PARAM_COUNTRY.'='.urlencode($this->requestApp->getCountry());
43 43
                 break;
44 44
             }
45 45
         }
Please login to merge, or discard this patch.
src/Scraper/CategoryAppsScraper.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
     {
45 45
         $doc = new \DOMDocument();
46 46
         $internalErrors = libxml_use_internal_errors(true);
47
-        if (!$doc->loadHTML('<?xml encoding="utf-8" ?>' . $response->getBody()->getContents())) {
47
+        if (!$doc->loadHTML('<?xml encoding="utf-8" ?>'.$response->getBody()->getContents())) {
48 48
             throw new \RuntimeException('error load html');
49 49
         }
50 50
         libxml_use_internal_errors($internalErrors);
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
                 throw (new GooglePlayException('Error parse app list'))
77 77
                     ->setUrl($request->getUri()->__toString());
78 78
             }
79
-            $url = GPlayApps::GOOGLE_PLAY_URL . $nodeTitle->attributes->getNamedItem('href')->textContent;
79
+            $url = GPlayApps::GOOGLE_PLAY_URL.$nodeTitle->attributes->getNamedItem('href')->textContent;
80 80
             $name = trim($nodeTitle->attributes->getNamedItem('title')->textContent);
81 81
         }
82 82
 
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
                 ->setUrl($request->getUri()->__toString());
130 130
         }
131 131
         $developerName = trim($developerNode->textContent);
132
-        $developerUrl = GPlayApps::GOOGLE_PLAY_URL . $developerNode->attributes->getNamedItem('href')->textContent;
132
+        $developerUrl = GPlayApps::GOOGLE_PLAY_URL.$developerNode->attributes->getNamedItem('href')->textContent;
133 133
         $developerId = parse_query(parse_url($developerUrl, PHP_URL_QUERY))[GPlayApps::REQ_PARAM_ID];
134 134
         $developer = new Developer(
135 135
             Developer::newBuilder()
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
             throw (new GooglePlayException('Error parse app list icon node'))
155 155
                 ->setUrl($request->getUri()->__toString());
156 156
         }
157
-        $icon = new GoogleImage('https:' . $iconNode->textContent);
157
+        $icon = new GoogleImage('https:'.$iconNode->textContent);
158 158
         $icon->reset();
159 159
         return $icon;
160 160
     }
Please login to merge, or discard this patch.
src/Scraper/DeveloperInfoScraper.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -27,10 +27,10 @@
 block discarded – undo
27 27
         $urlComponents = parse_url($url);
28 28
         $query = parse_query($urlComponents['query']);
29 29
         $developerId = $query[GPlayApps::REQ_PARAM_ID];
30
-        $url = $urlComponents['scheme'] . '://'
30
+        $url = $urlComponents['scheme'].'://'
31 31
             . $urlComponents['host']
32 32
             . $urlComponents['path']
33
-            . '?' . http_build_query([GPlayApps::REQ_PARAM_ID => $developerId]);
33
+            . '?'.http_build_query([GPlayApps::REQ_PARAM_ID => $developerId]);
34 34
 
35 35
         $scriptData = ScraperUtil::extractScriptData($response->getBody()->getContents());
36 36
 
Please login to merge, or discard this patch.
src/Scraper/Extractor/AppsExtractor.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
     {
21 21
         $name = $data[2];
22 22
         $appId = $data[12][0];
23
-        $url = GPlayApps::GOOGLE_PLAY_URL . $data[9][4][2];
23
+        $url = GPlayApps::GOOGLE_PLAY_URL.$data[9][4][2];
24 24
         $icon = new GoogleImage($data[1][1][0][3][2]);
25 25
         $developer = self::extractDeveloper($data);
26 26
         $price = $data[7][0][3][2][1][0][2];
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
     private static function extractDeveloper(array $data): Developer
49 49
     {
50 50
         $developerName = $data[4][0][0][0];
51
-        $developerPage = GPlayApps::GOOGLE_PLAY_URL . $data[4][0][0][1][4][2];
51
+        $developerPage = GPlayApps::GOOGLE_PLAY_URL.$data[4][0][0][1][4][2];
52 52
         $developerId = parse_query(parse_url($developerPage, PHP_URL_QUERY))[GPlayApps::REQ_PARAM_ID];
53 53
         $developer = new Developer(
54 54
             Developer::newBuilder()
Please login to merge, or discard this patch.
src/Scraper/Extractor/ReviewsExtractor.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
         $reviews = [];
22 22
         foreach ($data as $reviewData) {
23 23
             $reviewId = $reviewData[0];
24
-            $reviewUrl = $requestApp->getUrl() . '&reviewId=' . urlencode($reviewId);
24
+            $reviewUrl = $requestApp->getUrl().'&reviewId='.urlencode($reviewId);
25 25
             $userName = $reviewData[1][0];
26 26
             $avatar = new GoogleImage($reviewData[1][1][3][2]);
27 27
             $date = null;
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
                 $date = DateStringFormatter::unixTimeToDateTime($reviewData[5][0]);
30 30
             }
31 31
             $score = $reviewData[2] ?? 0;
32
-            $text = (string)($reviewData[4] ?? '');
32
+            $text = (string) ($reviewData[4] ?? '');
33 33
             $likeCount = $reviewData[6];
34 34
 
35 35
             $reply = self::extractReplyReview($reviewData);
Please login to merge, or discard this patch.
src/Scraper/AppDetailScraper.php 1 patch
Spacing   +11 added lines, -12 removed lines patch added patch discarded remove patch
@@ -86,9 +86,9 @@  discard block
 block discarded – undo
86 86
             ScraperUtil::html2text($scriptDataInfo[0][10][1][1]);
87 87
 
88 88
         $installs = $scriptDataInfo[0][12][9][2] ?? 0;
89
-        $score = (float)($scriptDataRating[0][6][0][1] ?? 0);
90
-        $numberVoters = (int)($scriptDataRating[0][6][2][1] ?? 0);
91
-        $reviewsCount = (int)($scriptDataRating[0][6][3][1] ?? 0);
89
+        $score = (float) ($scriptDataRating[0][6][0][1] ?? 0);
90
+        $numberVoters = (int) ($scriptDataRating[0][6][2][1] ?? 0);
91
+        $reviewsCount = (int) ($scriptDataRating[0][6][3][1] ?? 0);
92 92
         $histogram = $scriptDataRating[0][6][1] ?? null;
93 93
 
94 94
         $histogramRating = new HistogramRating(
@@ -100,12 +100,11 @@  discard block
 block discarded – undo
100 100
         );
101 101
 
102 102
         $price = isset($scriptDataPrice[0][2][0][0][0][1][0][0]) ?
103
-            (float)($scriptDataPrice[0][2][0][0][0][1][0][0] / 1000000) :
104
-            0;
103
+            (float) ($scriptDataPrice[0][2][0][0][0][1][0][0] / 1000000) : 0;
105 104
         $currency = $scriptDataPrice[0][2][0][0][0][1][0][1];
106 105
         $priceText = $scriptDataPrice[0][2][0][0][0][1][0][2] ?: 'Free';
107 106
         $offersIAPCost = $scriptDataInfo[0][12][12][0] ?? null;
108
-        $adSupported = (bool)$scriptDataInfo[0][12][14][0];
107
+        $adSupported = (bool) $scriptDataInfo[0][12][14][0];
109 108
 
110 109
         [$size, $appVersion, $androidVersion] = $scriptDataVersion;
111 110
         if (LocaleHelper::isDependOnDevice($locale, $size)) {
@@ -208,7 +207,7 @@  discard block
 block discarded – undo
208 207
      */
209 208
     private function extractDeveloper(array $scriptDataInfo): Developer
210 209
     {
211
-        $developerPage = GPlayApps::GOOGLE_PLAY_URL . $scriptDataInfo[0][12][5][5][4][2];
210
+        $developerPage = GPlayApps::GOOGLE_PLAY_URL.$scriptDataInfo[0][12][5][5][4][2];
212 211
         $developerId = parse_query(parse_url($developerPage, PHP_URL_QUERY))[GPlayApps::REQ_PARAM_ID];
213 212
         $developerName = $scriptDataInfo[0][12][5][1];
214 213
         $developerEmail = $scriptDataInfo[0][12][5][2][0];
@@ -234,8 +233,8 @@  discard block
 block discarded – undo
234 233
     private function extractCategory(array $data): ?Category
235 234
     {
236 235
         if (isset($data[0]) && $data[0] !== null && $data[2] !== null) {
237
-            $genreId = (string)$data[2];
238
-            $genreName = (string)$data[0];
236
+            $genreId = (string) $data[2];
237
+            $genreName = (string) $data[0];
239 238
             return new Category($genreId, $genreName);
240 239
         }
241 240
         return null;
@@ -247,7 +246,7 @@  discard block
 block discarded – undo
247 246
      */
248 247
     private function extractScreenshots(array $scriptDataInfo): array
249 248
     {
250
-        return !empty($scriptDataInfo[0][12][0]) ? array_map(static function (array $v) {
249
+        return !empty($scriptDataInfo[0][12][0]) ? array_map(static function(array $v) {
251 250
             return new GoogleImage($v[3][2]);
252 251
         }, $scriptDataInfo[0][12][0]) : [];
253 252
     }
@@ -263,8 +262,8 @@  discard block
 block discarded – undo
263 262
             $scriptDataInfo[0][12][3][0][3][2] !== null &&
264 263
             $scriptDataInfo[0][12][3][1][3][2] !== null
265 264
         ) {
266
-            $videoThumb = (string)$scriptDataInfo[0][12][3][1][3][2];
267
-            $videoUrl = (string)$scriptDataInfo[0][12][3][0][3][2];
265
+            $videoThumb = (string) $scriptDataInfo[0][12][3][1][3][2];
266
+            $videoUrl = (string) $scriptDataInfo[0][12][3][0][3][2];
268 267
 
269 268
             return new Video($videoThumb, $videoUrl);
270 269
         }
Please login to merge, or discard this patch.
src/Util/DateStringFormatter.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1184,7 +1184,7 @@  discard block
 block discarded – undo
1184 1184
 
1185 1185
             $dateTime = \DateTimeImmutable::createFromFormat(
1186 1186
                 'Y.m.d',
1187
-                $year . '.' . $month . '.' . $day,
1187
+                $year.'.'.$month.'.'.$day,
1188 1188
                 new \DateTimeZone('UTC')
1189 1189
             );
1190 1190
             if ($dateTime !== false) {
@@ -1202,7 +1202,7 @@  discard block
 block discarded – undo
1202 1202
     {
1203 1203
         $dateTime = \DateTimeImmutable::createFromFormat(
1204 1204
             'U',
1205
-            (string)$unixTime,
1205
+            (string) $unixTime,
1206 1206
             new \DateTimeZone('UTC')
1207 1207
         );
1208 1208
         return $dateTime === false ? null : $dateTime;
Please login to merge, or discard this patch.