Completed
Push — master ( 6e1671...19b3e1 )
by
unknown
14:18
created
src/Purifier/Html.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
         $path = parse_url($base, PHP_URL_PATH);
85 85
         $scheme = parse_url($base, PHP_URL_SCHEME);
86 86
 
87
-        return preg_replace_callback($pattern, function ($matches) use ($base, $scheme, $host, $path) {
87
+        return preg_replace_callback($pattern, function($matches) use ($base, $scheme, $host, $path) {
88 88
             $hrefValue = $matches[0];
89 89
 
90 90
             if (mb_strpos($hrefValue, '//') === 0) {
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
     private function convertCode($content)
150 150
     {
151 151
         // strpos with array support
152
-        $strposa = function ($haystack, $needles = []) {
152
+        $strposa = function($haystack, $needles = []) {
153 153
             $chr = [];
154 154
             foreach ($needles as $needle) {
155 155
                 $res = mb_strpos($haystack, $needle);
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
 
168 168
         $content = str_replace(['<pre>', '<pre ', '</pre>'], ['<code>', '<code ', '</code>'], $content);
169 169
 
170
-        return preg_replace_callback('/<code(.*?)>(.*?)<\/code>/s', function ($matches) use ($strposa) {
170
+        return preg_replace_callback('/<code(.*?)>(.*?)<\/code>/s', function($matches) use ($strposa) {
171 171
             $noLineBreaks = str_replace(["\r\n", "\r", "\n"], '<br />', $matches[0]);
172 172
             $code = str_replace(['<br></br>', '<br>', '<br/>', '<br />'], PHP_EOL, $noLineBreaks);
173 173
 
Please login to merge, or discard this patch.
src/Spec/Generator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@
 block discarded – undo
56 56
             $title = $this->formatter->asTitle(sprintf('SugarCRM upgrade: %s', $context)) . $delimiter;
57 57
 
58 58
             return $title . implode($delimiter, array_map(
59
-                function ($element) use ($context) {
59
+                function($element) use ($context) {
60 60
                     return $this->elementGenerator->generate($element, $context);
61 61
                 },
62 62
                 $elements
Please login to merge, or discard this patch.
src/autoload.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -3,8 +3,8 @@
 block discarded – undo
3 3
 // application or vendor context
4 4
 $autoload = [
5 5
     __DIR__ . '/../vendor/autoload.php', // application bin or phar
6
-    __DIR__ . '/../autoload.php',        // vendor bin
7
-    __DIR__ . '/../../../autoload.php',  // vendor
6
+    __DIR__ . '/../autoload.php', // vendor bin
7
+    __DIR__ . '/../../../autoload.php', // vendor
8 8
 ];
9 9
 
10 10
 foreach ($autoload as $file) {
Please login to merge, or discard this patch.
src/Data/Provider/LocalUpgradePackage.php 4 patches
Doc Comments   +6 added lines, -8 removed lines patch added patch discarded remove patch
@@ -23,9 +23,7 @@  discard block
 block discarded – undo
23 23
     /**
24 24
      * LocalUpgradePackage constructor.
25 25
      *
26
-     * @param Cache         $cache
27 26
      * @param $zipExtractor
28
-     * @param String $pathToBuild
29 27
      */
30 28
     public function __construct()
31 29
     {
@@ -60,7 +58,7 @@  discard block
 block discarded – undo
60 58
      *
61 59
      * @param String $pathToUpgradePackage
62 60
      *
63
-     * @return mixed
61
+     * @return string
64 62
      */
65 63
     public function getListOfDeletedFiles($pathToUpgradePackage)
66 64
     {
@@ -71,7 +69,7 @@  discard block
 block discarded – undo
71 69
      *
72 70
      * @param String $pathToUpgradePackage
73 71
      *
74
-     * @return mixed
72
+     * @return string
75 73
      */
76 74
     public function getListOfModifiedFiles($pathToUpgradePackage)
77 75
     {
@@ -82,7 +80,7 @@  discard block
 block discarded – undo
82 80
      *
83 81
      * @param String $pathToUpgradePackage
84 82
      *
85
-     * @return mixed
83
+     * @return string
86 84
      */
87 85
     public function getListOfScripts($pathToUpgradePackage)
88 86
     {
@@ -93,7 +91,7 @@  discard block
 block discarded – undo
93 91
      *
94 92
      * @param String $pathToUpgradePackage
95 93
      *
96
-     * @return mixed
94
+     * @return string
97 95
      */
98 96
     public function getListOfSQLScripts($pathToUpgradePackage)
99 97
     {
@@ -164,7 +162,6 @@  discard block
 block discarded – undo
164 162
     }
165 163
 
166 164
     /**
167
-     * @param string $upgradePackagePath
168 165
      * @param string version
169 166
      */
170 167
     public function setExtractedPackagePath($version)
@@ -184,7 +181,8 @@  discard block
 block discarded – undo
184 181
 
185 182
     /**
186 183
      * Creates directory for extracting zip package
187
-     * @return bool
184
+     * @param string $extractedPackagePath
185
+     * @return boolean|null
188 186
      */
189 187
     private function initPackageDirectory($extractedPackagePath)
190 188
     {
Please login to merge, or discard this patch.
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -3,7 +3,6 @@
 block discarded – undo
3 3
 namespace Sugarcrm\UpgradeSpec\Data\Provider;
4 4
 
5 5
 use Symfony\Component\Finder\Finder;
6
-
7 6
 use Symfony\Component\Filesystem\Filesystem;
8 7
 use Symfony\Component\Filesystem\Exception\IOExceptionInterface;
9 8
 use ZipArchive;
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -201,7 +201,7 @@
 block discarded – undo
201 201
             $fs->mkdir($extractedPackagePath);
202 202
             return true;
203 203
         } catch (IOExceptionInterface $e) {
204
-            echo "An error occurred while creating upgrade package directory ".$e->getPath();
204
+            echo "An error occurred while creating upgrade package directory " . $e->getPath();
205 205
         }
206 206
 
207 207
     }
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -128,8 +128,9 @@
 block discarded – undo
128 128
         $finder->files()->in($needstoBeUpgradedPath);
129 129
         foreach ($finder as $file) {
130 130
             $fileName = $file->getRelativePathname();
131
-            if (!file_exists($installedBuildPath . $fileName))
132
-                $filesLIst[] = $fileName;
131
+            if (!file_exists($installedBuildPath . $fileName)) {
132
+                            $filesLIst[] = $fileName;
133
+            }
133 134
         }
134 135
         return $filesLIst;
135 136
     }
Please login to merge, or discard this patch.