Completed
Push — master ( eaf5ea...97c539 )
by Michael
05:35
created
lib/Cli/Yapeal/YapealSetup.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
             $dic = $this->getDic();
165 165
             /** @noinspection PhpParamsInspection */
166 166
             if (array_key_exists('Yapeal.vendorParentDir', $dic)) {
167
-                $appConfigFile = $dic['Yapeal.vendorParentDir'] . 'config/yapeal.yaml';
167
+                $appConfigFile = $dic['Yapeal.vendorParentDir'].'config/yapeal.yaml';
168 168
                 $this->configFile = is_readable($appConfigFile) && is_file($appConfigFile);
169 169
             }
170 170
         }
@@ -197,7 +197,7 @@  discard block
 block discarded – undo
197 197
                 $this->schema = false;
198 198
             }
199 199
             $result = array_values($result->fetchAll(\PDO::FETCH_COLUMN));
200
-            $schemaName = $dic['Yapeal.Sql.Platforms.' . $dic['Yapeal.Sql.platform'] . '.schema'];
200
+            $schemaName = $dic['Yapeal.Sql.Platforms.'.$dic['Yapeal.Sql.platform'].'.schema'];
201 201
             if (!in_array($schemaName, $result, false)) {
202 202
                 $this->schema = false;
203 203
             }
@@ -263,7 +263,7 @@  discard block
 block discarded – undo
263 263
     private function yamlMenu(InputInterface $input, OutputInterface $output)
264 264
     {
265 265
         if ($this->hasConfigFile()) {
266
-            $ycf = new YamlConfigFile($this->getDic()['Yapeal.vendorParentDir'] . 'config');
266
+            $ycf = new YamlConfigFile($this->getDic()['Yapeal.vendorParentDir'].'config');
267 267
             $ycf->read();
268 268
             $this->yamlFile = $ycf->getSettings();
269 269
         }
Please login to merge, or discard this patch.
lib/Sql/SqlSubsTrait.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
         $lines = explode("\n", $sql);
72 72
         // Filter out non-sql lines like comments and blank lines.
73 73
         $lines = array_filter($lines,
74
-            function ($line) {
74
+            function($line) {
75 75
                 $line = trim($line);
76 76
                 $nonSql = '' === $line
77 77
                     || 0 === strpos($line, '--')
@@ -91,12 +91,12 @@  discard block
 block discarded – undo
91 91
     protected function getSqlSubs(ContainerInterface $dic)
92 92
     {
93 93
         $keys = $dic->keys();
94
-        $platform = '.' . $dic['Yapeal.Sql.platform'];
94
+        $platform = '.'.$dic['Yapeal.Sql.platform'];
95 95
         /**
96 96
          * @var array $filteredKeys
97 97
          */
98 98
         $filteredKeys = array_filter($keys,
99
-            function ($key) use ($platform) {
99
+            function($key) use ($platform) {
100 100
                 if (0 !== strpos($key, 'Yapeal.Sql.')) {
101 101
                     return false;
102 102
                 }
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
             });
108 108
         $replacements = [];
109 109
         foreach ($filteredKeys as $key) {
110
-            $subName = '{' . substr($key, strrpos($key, '.') + 1) . '}';
110
+            $subName = '{'.substr($key, strrpos($key, '.') + 1).'}';
111 111
             $replacements[$subName] = $dic[$key];
112 112
         }
113 113
         return $replacements;
Please login to merge, or discard this patch.
lib/FileSystem/CacheRetriever.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -108,10 +108,10 @@  discard block
 block discarded – undo
108 108
     public function setCachePath(string $value = null): self
109 109
     {
110 110
         if (null === $value) {
111
-            $value = dirname(__DIR__, 2) . '/cache/';
111
+            $value = dirname(__DIR__, 2).'/cache/';
112 112
         }
113 113
         if (!is_string($value)) {
114
-            $mess = 'Cache path MUST be string, but was given ' . gettype($value);
114
+            $mess = 'Cache path MUST be string, but was given '.gettype($value);
115 115
             throw new \InvalidArgumentException($mess);
116 116
         }
117 117
         $this->cachePath = $this->getFpn()
@@ -179,8 +179,8 @@  discard block
 block discarded – undo
179 179
         }
180 180
         $eveFormat = 'Y-m-d H:i:sP';
181 181
         $now = new \DateTimeImmutable('now', new \DateTimeZone('UTC'));
182
-        $current = \DateTimeImmutable::createFromFormat($eveFormat, $current . '+00:00');
183
-        $until = \DateTimeImmutable::createFromFormat($eveFormat, $until . '+00:00');
182
+        $current = \DateTimeImmutable::createFromFormat($eveFormat, $current.'+00:00');
183
+        $until = \DateTimeImmutable::createFromFormat($eveFormat, $until.'+00:00');
184 184
         // At minimum use cached XML for 5 minutes.
185 185
         if ($now <= $current->add(new \DateInterval('PT5M'))) {
186 186
             return false;
Please login to merge, or discard this patch.
lib/Configuration/Wiring.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
          * @var WiringInterface $class
66 66
          */
67 67
         foreach ($names as $name) {
68
-            $setting = $base . strtolower($name);
68
+            $setting = $base.strtolower($name);
69 69
             if (!empty($dic[$setting])
70 70
                 && is_subclass_of($dic[$setting], '\Yapeal\Configuration\WiringInterface', true)
71 71
             ) {
@@ -73,11 +73,11 @@  discard block
 block discarded – undo
73 73
                 $class->wire($dic);
74 74
                 continue;
75 75
             }
76
-            $methodName = 'wire' . $name;
76
+            $methodName = 'wire'.$name;
77 77
             if (method_exists($this, $methodName)) {
78 78
                 $this->$methodName();
79 79
             } else {
80
-                $mess = 'Could NOT find class or method for ' . $name;
80
+                $mess = 'Could NOT find class or method for '.$name;
81 81
                 throw new \LogicException($mess);
82 82
             }
83 83
         }
@@ -92,23 +92,23 @@  discard block
 block discarded – undo
92 92
     protected function wireConfig()
93 93
     {
94 94
         $dic = $this->getDic();
95
-        $path = str_replace('\\', '/', dirname(dirname(__DIR__))) . '/';
95
+        $path = str_replace('\\', '/', dirname(dirname(__DIR__))).'/';
96 96
         // These two paths are critical to Yapeal-ng working and can't be overridden here.
97 97
         $dic['Yapeal.baseDir'] = $path;
98
-        $dic['Yapeal.libDir'] = $path . 'lib/';
98
+        $dic['Yapeal.libDir'] = $path.'lib/';
99 99
         if (empty($dic['Yapeal.Config.Yaml'])) {
100
-            $dic['Yapeal.Config.Yaml'] = $dic->factory(function () {
100
+            $dic['Yapeal.Config.Yaml'] = $dic->factory(function() {
101 101
                 return new YamlConfigFile();
102 102
             });
103 103
         }
104 104
         $configFiles = [
105
-            __DIR__ . '/yapeal_defaults.yaml',
106
-            $path . 'config/yapeal.yaml'
105
+            __DIR__.'/yapeal_defaults.yaml',
106
+            $path.'config/yapeal.yaml'
107 107
         ];
108 108
         $vendorPos = strpos($path, 'vendor/');
109 109
         if (false !== $vendorPos) {
110 110
             $dic['Yapeal.vendorParentDir'] = substr($path, 0, $vendorPos);
111
-            $configFiles[] = $dic['Yapeal.vendorParentDir'] . 'config/yapeal.yaml';
111
+            $configFiles[] = $dic['Yapeal.vendorParentDir'].'config/yapeal.yaml';
112 112
         }
113 113
         $settings = [];
114 114
         // Process each file in turn so any substitutions are done in a more
Please login to merge, or discard this patch.
lib/Configuration/ConfigFileProcessingTrait.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
         $depth = 0;
88 88
         $maxDepth = 10;
89 89
         $regEx = '%(?<all>\{(?<name>Yapeal(?:\.\w+)+)\})%';
90
-        $callback = function ($match) use ($settings, $dic) {
90
+        $callback = function($match) use ($settings, $dic) {
91 91
             $name = $match['name'];
92 92
             return $settings[$name] ?? $dic[$name] ?? $match['all'];
93 93
         };
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
             if (PREG_NO_ERROR !== $lastError) {
102 102
                 $constants = array_flip(get_defined_constants(true)['pcre']);
103 103
                 $lastError = $constants[$lastError];
104
-                $mess = 'Received preg error ' . $lastError;
104
+                $mess = 'Received preg error '.$lastError;
105 105
                 throw new \DomainException($mess);
106 106
             }
107 107
         } while ($count > 0);
Please login to merge, or discard this patch.
lib/Cli/Schema/AbstractSchemaCommon.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
         $yem = $this->getYem();
129 129
         $statements = explode(';', $this->getCleanedUpSql($sqlStatements, $this->getReplacements()));
130 130
         $statements = array_filter($statements,
131
-            function ($statement) {
131
+            function($statement) {
132 132
                 return '' !== trim($statement);
133 133
             });
134 134
         $progress = null;
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
                     $progress->finish();
161 161
                     $output->writeln('');
162 162
                 }
163
-                $mess = '<comment>' . $sql . '</comment>';
163
+                $mess = '<comment>'.$sql.'</comment>';
164 164
                 $yem->triggerLogEvent('Yapeal.Log.log', Logger::DEBUG, strip_tags($mess));
165 165
                 $output->writeln($mess);
166 166
                 $mess = sprintf('Sql failed in %1$s on statement %2$s with (%3$s) %4$s',
@@ -207,7 +207,7 @@  discard block
 block discarded – undo
207 207
         $base = 'Yapeal.Sql.';
208 208
         foreach (['class', 'database', 'hostName', 'password', 'platform', 'tablePrefix', 'userName'] as $option) {
209 209
             if (array_key_exists($option, $options) && null !== $options[$option]) {
210
-                $dic[$base . $option] = $options[$option];
210
+                $dic[$base.$option] = $options[$option];
211 211
             }
212 212
         }
213 213
         return $this;
Please login to merge, or discard this patch.