Completed
Push — master ( c6b6e7...10cdc0 )
by Tim
15:27
created
Classes/ViewHelpers/Loop/MonthsInYearViewHelper.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@  discard block
 block discarded – undo
3 3
 /**
4 4
  * Months in year view Helper.
5 5
  */
6
-declare(strict_types=1);
6
+declare(strict_types = 1);
7 7
 
8 8
 namespace HDNET\Calendarize\ViewHelpers\Loop;
9 9
 
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
     protected function getItems(\DateTime $date)
23 23
     {
24 24
         $months = [];
25
-        $date->setDate((int) $date->format('Y'), (int) $date->format('n'), 1);
25
+        $date->setDate((int)$date->format('Y'), (int)$date->format('n'), 1);
26 26
         for ($i = 0; $i < 12; ++$i) {
27 27
             $months[$date->format('n')] = [
28 28
                 'week' => $date->format('n'),
Please login to merge, or discard this patch.
Classes/Controller/CalendarController.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@  discard block
 block discarded – undo
3 3
 /**
4 4
  * Calendar.
5 5
  */
6
-declare(strict_types=1);
6
+declare(strict_types = 1);
7 7
 
8 8
 namespace HDNET\Calendarize\Controller;
9 9
 
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
             $configuration = ExtensionConfigurationUtility::get($configurationName);
74 74
 
75 75
             // get Event by Configuration and Uid
76
-            $event = EventUtility::getOriginalRecordByConfiguration($configuration, (int) $this->request->getArgument('event'));
76
+            $event = EventUtility::getOriginalRecordByConfiguration($configuration, (int)$this->request->getArgument('event'));
77 77
             $index = $this->indexRepository->findByEventTraversing($event, true, false, 1)->getFirst();
78 78
 
79 79
             // if there is a valid index in the event
@@ -255,7 +255,7 @@  discard block
 block discarded – undo
255 255
 
256 256
         $this->slotExtendedAssignMultiple([
257 257
             'date' => $date,
258
-            'indices' => $this->indexRepository->findMonth((int) $date->format('Y'), (int) $date->format('n')),
258
+            'indices' => $this->indexRepository->findMonth((int)$date->format('Y'), (int)$date->format('n')),
259 259
         ], __CLASS__, __FUNCTION__);
260 260
     }
261 261
 
@@ -274,8 +274,8 @@  discard block
 block discarded – undo
274 274
         if (null === $week) {
275 275
             $week = $now->format('W');
276 276
         }
277
-        $weekStart = (int) $this->settings['weekStart'];
278
-        $firstDay = DateTimeUtility::convertWeekYear2DayMonthYear((int) $week, $year, $weekStart);
277
+        $weekStart = (int)$this->settings['weekStart'];
278
+        $firstDay = DateTimeUtility::convertWeekYear2DayMonthYear((int)$week, $year, $weekStart);
279 279
         $timezone = DateTimeUtility::getTimeZone();
280 280
         $firstDay->setTimezone($timezone);
281 281
         $firstDay->setTime(0, 0, 0);
@@ -335,7 +335,7 @@  discard block
 block discarded – undo
335 335
         if (null === $index) {
336 336
             // handle fallback for "strange language settings"
337 337
             if ($this->request->hasArgument('index')) {
338
-                $indexId = (int) $this->request->getArgument('index');
338
+                $indexId = (int)$this->request->getArgument('index');
339 339
                 if ($indexId > 0) {
340 340
                     $index = $this->indexRepository->findByUid($indexId);
341 341
                 }
@@ -343,7 +343,7 @@  discard block
 block discarded – undo
343 343
 
344 344
             if (null === $index) {
345 345
                 if (!MathUtility::canBeInterpretedAsInteger($this->settings['listPid'])) {
346
-                    return (string) TranslateUtility::get('noEventDetailView');
346
+                    return (string)TranslateUtility::get('noEventDetailView');
347 347
                 }
348 348
                 $this->slottedRedirect(__CLASS__, __FUNCTION__ . 'noEvent');
349 349
             }
@@ -459,18 +459,18 @@  discard block
 block discarded – undo
459 459
         } elseif (MathUtility::canBeInterpretedAsInteger($year) && MathUtility::canBeInterpretedAsInteger($month) && MathUtility::canBeInterpretedAsInteger($day)) {
460 460
             $indices = $this->indexRepository->findDay($year, $month, $day);
461 461
         } elseif (MathUtility::canBeInterpretedAsInteger($year) && MathUtility::canBeInterpretedAsInteger($month)) {
462
-            $indices = $this->indexRepository->findMonth((int) $year, (int) $month);
462
+            $indices = $this->indexRepository->findMonth((int)$year, (int)$month);
463 463
         } elseif (MathUtility::canBeInterpretedAsInteger($year) && MathUtility::canBeInterpretedAsInteger($week)) {
464 464
             $indices = $this->indexRepository->findWeek($year, $week, $this->settings['weekStart']);
465 465
         } elseif (MathUtility::canBeInterpretedAsInteger($year)) {
466 466
             $indices = $this->indexRepository->findYear($year);
467 467
         } else {
468
-            $overrideStartDate = (int) $this->settings['overrideStartdate'];
469
-            $overrideEndDate = (int) $this->settings['overrideEnddate'];
468
+            $overrideStartDate = (int)$this->settings['overrideStartdate'];
469
+            $overrideEndDate = (int)$this->settings['overrideEnddate'];
470 470
             $indices = $this->indexRepository->findList(
471
-                (int) $this->settings['limit'],
471
+                (int)$this->settings['limit'],
472 472
                 $this->settings['listStartTime'],
473
-                (int) $this->settings['listStartTimeOffsetHours'],
473
+                (int)$this->settings['listStartTimeOffsetHours'],
474 474
                 $overrideStartDate,
475 475
                 $overrideEndDate
476 476
             );
Please login to merge, or discard this patch.
Classes/Hooks/CmsLayout.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@  discard block
 block discarded – undo
3 3
 /**
4 4
  * Render the CMS layout.
5 5
  */
6
-declare(strict_types=1);
6
+declare(strict_types = 1);
7 7
 
8 8
 namespace HDNET\Calendarize\Hooks;
9 9
 
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
 
65 65
         $actions = $this->flexFormService->get('switchableControllerActions', 'main');
66 66
         $parts = GeneralUtility::trimExplode(';', $actions, true);
67
-        $parts = \array_map(function ($element) {
67
+        $parts = \array_map(function($element) {
68 68
             $split = \explode('->', $element);
69 69
 
70 70
             return \ucfirst($split[1]);
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
 
74 74
         $this->layoutService->addRow(TranslateUtility::get('mode'), TranslateUtility::get('mode.' . $actionKey));
75 75
 
76
-        $pluginConfiguration = (int) $this->flexFormService->get('settings.pluginConfiguration', 'main');
76
+        $pluginConfiguration = (int)$this->flexFormService->get('settings.pluginConfiguration', 'main');
77 77
         if ($pluginConfiguration) {
78 78
             $table = 'tx_calendarize_domain_model_pluginconfiguration';
79 79
             $row = HelperUtility::getDatabaseConnection()->exec_SELECTgetSingleRow(
@@ -87,21 +87,21 @@  discard block
 block discarded – undo
87 87
             );
88 88
         }
89 89
 
90
-        if ('' !== \trim((string) $this->flexFormService->get('settings.configuration', 'general'))) {
90
+        if ('' !== \trim((string)$this->flexFormService->get('settings.configuration', 'general'))) {
91 91
             $this->layoutService->addRow(
92 92
                 TranslateUtility::get('configuration'),
93 93
                 $this->flexFormService->get('settings.configuration', 'general')
94 94
             );
95 95
         }
96 96
 
97
-        if ((bool) $this->flexFormService->get('settings.hidePagination', 'main')) {
97
+        if ((bool)$this->flexFormService->get('settings.hidePagination', 'main')) {
98 98
             $this->layoutService->addRow(TranslateUtility::get('hide.pagination.teaser'), '!!!');
99 99
         }
100
-        $overrideStartDate = (int) $this->flexFormService->get('settings.overrideStartdate', 'main');
100
+        $overrideStartDate = (int)$this->flexFormService->get('settings.overrideStartdate', 'main');
101 101
         if ($overrideStartDate) {
102 102
             $this->layoutService->addRow('OverrideStartdate', \date('d.m.y H:i', $overrideStartDate));
103 103
         }
104
-        $overrideEndDate = (int) $this->flexFormService->get('settings.overrideEnddate', 'main');
104
+        $overrideEndDate = (int)$this->flexFormService->get('settings.overrideEnddate', 'main');
105 105
         if ($overrideEndDate) {
106 106
             $this->layoutService->addRow('OverrideEndDate', \date('d.m.y H:i', $overrideEndDate));
107 107
         }
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
             'bookingPid',
127 127
         ];
128 128
         foreach ($pageIdsNames as $pageIdName) {
129
-            $pageId = (int) $this->flexFormService->get('settings.' . $pageIdName, 'pages');
129
+            $pageId = (int)$this->flexFormService->get('settings.' . $pageIdName, 'pages');
130 130
             $pageRow = BackendUtility::getRecord('pages', $pageId);
131 131
             if ($pageRow) {
132 132
                 $this->layoutService->addRow(
Please login to merge, or discard this patch.
Classes/Utility/DateTimeUtility.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@  discard block
 block discarded – undo
3 3
 /**
4 4
  * DateTime Utility.
5 5
  */
6
-declare(strict_types=1);
6
+declare(strict_types = 1);
7 7
 
8 8
 namespace HDNET\Calendarize\Utility;
9 9
 
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
      */
66 66
     public static function convertWeekYear2DayMonthYear($week, $year, $startDay = 1): \DateTime
67 67
     {
68
-        $week = \str_pad((string) $week, 2, '0', STR_PAD_LEFT);
68
+        $week = \str_pad((string)$week, 2, '0', STR_PAD_LEFT);
69 69
 
70 70
         return self::normalizeDateTimeSingle(\strtotime($year . '-W' . $week . '-' . $startDay));
71 71
     }
@@ -91,10 +91,10 @@  discard block
 block discarded – undo
91 91
      */
92 92
     public static function getDaySecondsOfDateTime(\DateTime $dateTime): int
93 93
     {
94
-        $hours = (int) $dateTime->format('G');
95
-        $minutes = $hours * self::SECONDS_MINUTE + (int) $dateTime->format('i');
94
+        $hours = (int)$dateTime->format('G');
95
+        $minutes = $hours * self::SECONDS_MINUTE + (int)$dateTime->format('i');
96 96
 
97
-        return $minutes * self::SECONDS_MINUTE + (int) $dateTime->format('s');
97
+        return $minutes * self::SECONDS_MINUTE + (int)$dateTime->format('s');
98 98
     }
99 99
 
100 100
     /**
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
         if (!MathUtility::canBeInterpretedAsInteger($day)) {
119 119
             $day = $date->format('d');
120 120
         }
121
-        $date->setDate((int) $year, (int) $month, (int) $day);
121
+        $date->setDate((int)$year, (int)$month, (int)$day);
122 122
         $date->setTime(0, 0, 0);
123 123
         if ($date->format('m') > $month) {
124 124
             $date->modify('last day of last month');
@@ -179,7 +179,7 @@  discard block
 block discarded – undo
179 179
     {
180 180
         // NOTE that new \DateTime('@timestamp') does NOT work - @see comment in normalizeDateTimeSingle()
181 181
         // So we create a date string with timezone information first, and a \DateTime in the current server timezone then.
182
-        return new \DateTime(\date(\DateTime::ATOM, (int) $GLOBALS['SIM_ACCESS_TIME']));
182
+        return new \DateTime(\date(\DateTime::ATOM, (int)$GLOBALS['SIM_ACCESS_TIME']));
183 183
     }
184 184
 
185 185
     /**
Please login to merge, or discard this patch.