@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | * @param iterable $keys a list of keys that can obtained in a single operation |
20 | 20 | * @param mixed $default default value to return for keys that do not exist |
21 | 21 | * |
22 | - * @return iterable A list of key => value pairs. Cache keys that do not exist or are stale will have $default as value. |
|
22 | + * @return \Generator A list of key => value pairs. Cache keys that do not exist or are stale will have $default as value. |
|
23 | 23 | */ |
24 | 24 | public function getMultiple($keys, $default = null) |
25 | 25 | { |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | } |
89 | 89 | |
90 | 90 | /** |
91 | - * @param $key |
|
91 | + * @param string $key |
|
92 | 92 | * |
93 | 93 | * @throws InvalidArgumentException |
94 | 94 | */ |
@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | } |
24 | 24 | |
25 | 25 | /** |
26 | - * @param $key |
|
26 | + * @param string $key |
|
27 | 27 | * |
28 | 28 | * @return bool |
29 | 29 | */ |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | } |
38 | 38 | |
39 | 39 | /** |
40 | - * @param $key |
|
40 | + * @param string $key |
|
41 | 41 | * @param null $default |
42 | 42 | * |
43 | 43 | * @return mixed |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | } |
57 | 57 | |
58 | 58 | /** |
59 | - * @param $key |
|
59 | + * @param string $key |
|
60 | 60 | * @param $value |
61 | 61 | * @param null $ttl |
62 | 62 | * |
@@ -124,7 +124,7 @@ |
||
124 | 124 | } |
125 | 125 | |
126 | 126 | /** |
127 | - * @param $buildVersion |
|
127 | + * @param string $buildVersion |
|
128 | 128 | * @param $upgradeTo |
129 | 129 | */ |
130 | 130 | private function validateVersion($buildVersion, $upgradeTo) |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | * |
44 | 44 | * Examples: 7.6.1 -> 7.6.1.0, 7.7 -> 7.7.1, 7.8 -> 7.8.0.0 |
45 | 45 | * |
46 | - * @param $flav |
|
46 | + * @param string $flav |
|
47 | 47 | * @param null $baseVersion |
48 | 48 | * |
49 | 49 | * @return mixed |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | /** |
100 | 100 | * Gets all required information to perform health check. |
101 | 101 | * |
102 | - * @param $version |
|
102 | + * @param string $version |
|
103 | 103 | * |
104 | 104 | * @return mixed |
105 | 105 | */ |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | /** |
112 | 112 | * Gets all required information to perform upgrade. |
113 | 113 | * |
114 | - * @param $version |
|
114 | + * @param string $version |
|
115 | 115 | * |
116 | 116 | * @return mixed |
117 | 117 | */ |
@@ -71,7 +71,7 @@ |
||
71 | 71 | * all versions with $baseVersion base |
72 | 72 | * for example: 7.6.1 -> [7.6.1.0, 7.6.1.1], 7.6 -> [7.6.1.0, 7.6.1.1, 7.6.2]. |
73 | 73 | */ |
74 | - $minors = array_filter($versions, function ($minor) use ($baseVersion) { |
|
74 | + $minors = array_filter($versions, function($minor) use ($baseVersion) { |
|
75 | 75 | return implode('.', array_slice(explode('.', $minor), 0, count(explode('.', $baseVersion)))) === $baseVersion; |
76 | 76 | }); |
77 | 77 |
@@ -68,7 +68,7 @@ |
||
68 | 68 | /** |
69 | 69 | * Gets data from memory by key. |
70 | 70 | * |
71 | - * @param $key |
|
71 | + * @param string $key |
|
72 | 72 | * @param null $default |
73 | 73 | * |
74 | 74 | * @return mixed|null |
@@ -36,7 +36,7 @@ |
||
36 | 36 | */ |
37 | 37 | public function getReleaseNotes($flav, array $versions) |
38 | 38 | { |
39 | - return array_map(function ($version) use ($flav) { |
|
39 | + return array_map(function($version) use ($flav) { |
|
40 | 40 | return $this->get(sprintf('%s_%s_release_notes', $flav, $version), ''); |
41 | 41 | }, $versions); |
42 | 42 | } |
@@ -54,8 +54,7 @@ discard block |
||
54 | 54 | /** |
55 | 55 | * Get all available SugarCRM versions (sorted ASC). |
56 | 56 | * |
57 | - * @param mixed $flav |
|
58 | - * @param mixed $pathToUpgradePackage |
|
57 | + * @param Context $pathToUpgradePackage |
|
59 | 58 | * |
60 | 59 | * @return mixed |
61 | 60 | */ |
@@ -75,7 +74,7 @@ discard block |
||
75 | 74 | * |
76 | 75 | * @param string $pathToUpgradePackage |
77 | 76 | * |
78 | - * @return mixed |
|
77 | + * @return string |
|
79 | 78 | */ |
80 | 79 | public function getListOfDeletedFiles($pathToUpgradePackage) |
81 | 80 | { |
@@ -87,7 +86,7 @@ discard block |
||
87 | 86 | * |
88 | 87 | * @param string $pathToUpgradePackage |
89 | 88 | * |
90 | - * @return mixed |
|
89 | + * @return string |
|
91 | 90 | */ |
92 | 91 | public function getListOfModifiedFiles($pathToUpgradePackage) |
93 | 92 | { |
@@ -99,7 +98,7 @@ discard block |
||
99 | 98 | * |
100 | 99 | * @param string $pathToUpgradePackage |
101 | 100 | * |
102 | - * @return mixed |
|
101 | + * @return string |
|
103 | 102 | */ |
104 | 103 | public function getListOfScripts($pathToUpgradePackage) |
105 | 104 | { |
@@ -111,7 +110,7 @@ discard block |
||
111 | 110 | * |
112 | 111 | * @param string $pathToUpgradePackage |
113 | 112 | * |
114 | - * @return mixed |
|
113 | + * @return string |
|
115 | 114 | */ |
116 | 115 | public function getListOfSQLScripts($pathToUpgradePackage) |
117 | 116 | { |
@@ -75,7 +75,7 @@ |
||
75 | 75 | } |
76 | 76 | |
77 | 77 | /** |
78 | - * @param $stability |
|
78 | + * @param string $stability |
|
79 | 79 | * |
80 | 80 | * @return string |
81 | 81 | */ |
@@ -84,7 +84,7 @@ discard block |
||
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 |
||
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 |
||
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 |
@@ -56,7 +56,7 @@ |
||
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 |