Completed
Push — chore/php-8-migration ( 83422f )
by Vladimir
09:57
created
src/Console/Command/BuildCommand.php 1 patch
Braces   +20 added lines, -9 removed lines patch added patch discarded remove patch
@@ -62,7 +62,8 @@  discard block
 block discarded – undo
62 62
         $this->handleDeprecations($input, $output);
63 63
         $this->setRunTimeOptions($input);
64 64
 
65
-        try {
65
+        try
66
+        {
66 67
             $this->configureConfigurationFile($input);
67 68
 
68 69
             $website = $this->getContainer()->get(Website::class);
@@ -74,7 +75,9 @@  discard block
 block discarded – undo
74 75
             ));
75 76
 
76 77
             return 0;
77
-        } catch (FileAwareException $e) {
78
+        }
79
+        catch (FileAwareException $e)
80
+        {
78 81
             $output->writeln(StrUtils::interpolate(
79 82
                 "Your website failed to build with the following error in file '{file}'{line}: {message}",
80 83
                 [
@@ -83,7 +86,9 @@  discard block
 block discarded – undo
83 86
                     'message' => $e->getMessage(),
84 87
                 ]
85 88
             ));
86
-        } catch (Exception $e) {
89
+        }
90
+        catch (Exception $e)
91
+        {
87 92
             $output->writeln(sprintf(
88 93
                 'Your website failed to build with the following error: %s',
89 94
                 $e->getMessage()
@@ -111,33 +116,39 @@  discard block
 block discarded – undo
111 116
 
112 117
     protected function setRunTimeOptions(InputInterface $input): void
113 118
     {
114
-        if ($input->getOption(self::NO_CLEAN)) {
119
+        if ($input->getOption(self::NO_CLEAN))
120
+        {
115 121
             Service::setRuntimeFlag(RuntimeStatus::BOOT_WITHOUT_CLEAN);
116 122
         }
117 123
 
118
-        if ($input->getOption(self::USE_DRAFTS)) {
124
+        if ($input->getOption(self::USE_DRAFTS))
125
+        {
119 126
             Service::setRuntimeFlag(RuntimeStatus::USING_DRAFTS);
120 127
         }
121 128
 
122
-        if ($input->getOption(self::USE_CACHE)) {
129
+        if ($input->getOption(self::USE_CACHE))
130
+        {
123 131
             Service::setRuntimeFlag(RuntimeStatus::USING_CACHE);
124 132
         }
125 133
 
126
-        if ($input->getOption(self::SAFE_MODE)) {
134
+        if ($input->getOption(self::SAFE_MODE))
135
+        {
127 136
             // Caches could be maliciously manipulated so disable reading the cache in safe mode
128 137
             Service::removeRuntimeFlag(RuntimeStatus::USING_CACHE);
129 138
 
130 139
             Service::setRuntimeFlag(RuntimeStatus::IN_SAFE_MODE);
131 140
         }
132 141
 
133
-        if ($input->getOption(self::BUILD_PROFILE)) {
142
+        if ($input->getOption(self::BUILD_PROFILE))
143
+        {
134 144
             Service::setRuntimeFlag(RuntimeStatus::IN_PROFILE_MODE);
135 145
         }
136 146
     }
137 147
 
138 148
     protected function handleDeprecations(InputInterface $input, OutputInterface $output): void
139 149
     {
140
-        if ($input->getOption(self::NO_CONF)) {
150
+        if ($input->getOption(self::NO_CONF))
151
+        {
141 152
             $output->writeln('Deprecation: The "--no-conf" option is no longer supported. You must have a configuration file.');
142 153
         }
143 154
     }
Please login to merge, or discard this patch.
src/Console/Command/ContainerAwareCommand.php 1 patch
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -17,11 +17,13 @@
 block discarded – undo
17 17
 
18 18
     public function getContainer()
19 19
     {
20
-        if ($this->container === null) {
20
+        if ($this->container === null)
21
+        {
21 22
             /** @var Application $application */
22 23
             $application = $this->getApplication();
23 24
 
24
-            if ($application === null) {
25
+            if ($application === null)
26
+            {
25 27
                 throw new LogicException('The container cannot be retrieved as the application instance is not yet set.');
26 28
             }
27 29
 
Please login to merge, or discard this patch.