@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | */ |
45 | 45 | public static function getGeneratorStubsPath(): string |
46 | 46 | { |
47 | - return Autocomplete::getInstance()->basePath . self::STUBS_DIR; |
|
47 | + return Autocomplete::getInstance()->basePath.self::STUBS_DIR; |
|
48 | 48 | } |
49 | 49 | |
50 | 50 | /** |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | */ |
102 | 102 | protected static function getGeneratedFilePath(): string |
103 | 103 | { |
104 | - return Craft::$app->getPath()->getCompiledClassesPath() . DIRECTORY_SEPARATOR . static::getGeneratorName() . self::TEMPLATE_EXTENSION; |
|
104 | + return Craft::$app->getPath()->getCompiledClassesPath().DIRECTORY_SEPARATOR.static::getGeneratorName().self::TEMPLATE_EXTENSION; |
|
105 | 105 | } |
106 | 106 | |
107 | 107 | /** |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | */ |
112 | 112 | protected static function getStubFilePath(): string |
113 | 113 | { |
114 | - return static::getGeneratorStubsPath() . DIRECTORY_SEPARATOR . static::getGeneratorName() . self::STUBS_EXTENSION; |
|
114 | + return static::getGeneratorStubsPath().DIRECTORY_SEPARATOR.static::getGeneratorName().self::STUBS_EXTENSION; |
|
115 | 115 | } |
116 | 116 | |
117 | 117 | } |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | $this->stdout('Generating autocomplete classes ... ', BaseConsole::FG_YELLOW); |
32 | 32 | /* @noinspection NullPointerExceptionInspection */ |
33 | 33 | Autocomplete::getInstance()->generateAutocompleteClasses(); |
34 | - $this->stdout('done' . PHP_EOL, BaseConsole::FG_GREEN); |
|
34 | + $this->stdout('done'.PHP_EOL, BaseConsole::FG_GREEN); |
|
35 | 35 | |
36 | 36 | return ExitCode::OK; |
37 | 37 | } |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | $this->stdout('Regenerating autocomplete classes ... ', BaseConsole::FG_YELLOW); |
45 | 45 | /* @noinspection NullPointerExceptionInspection */ |
46 | 46 | Autocomplete::getInstance()->regenerateAutocompleteClasses(); |
47 | - $this->stdout('done' . PHP_EOL, BaseConsole::FG_GREEN); |
|
47 | + $this->stdout('done'.PHP_EOL, BaseConsole::FG_GREEN); |
|
48 | 48 | |
49 | 49 | return ExitCode::OK; |
50 | 50 | } |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | $type = gettype($value); |
82 | 82 | switch ($type) { |
83 | 83 | case 'object': |
84 | - $values[$key] = 'new \\' . get_class($value) . '()'; |
|
84 | + $values[$key] = 'new \\'.get_class($value).'()'; |
|
85 | 85 | break; |
86 | 86 | |
87 | 87 | case 'boolean': |
@@ -94,7 +94,7 @@ discard block |
||
94 | 94 | break; |
95 | 95 | |
96 | 96 | case 'string': |
97 | - $values[$key] = "'" . addslashes($value) . "'"; |
|
97 | + $values[$key] = "'".addslashes($value)."'"; |
|
98 | 98 | break; |
99 | 99 | |
100 | 100 | case 'array': |
@@ -124,7 +124,7 @@ discard block |
||
124 | 124 | |
125 | 125 | // Format the line output for each value |
126 | 126 | foreach ($values as $key => $value) { |
127 | - $values[$key] = " '" . $key . "' => " . $value . ","; |
|
127 | + $values[$key] = " '".$key."' => ".$value.","; |
|
128 | 128 | } |
129 | 129 | |
130 | 130 | // Save the template with variable substitution |
@@ -146,7 +146,7 @@ discard block |
||
146 | 146 | /* @var Element $elementType */ |
147 | 147 | $key = $elementType::refHandle(); |
148 | 148 | if (!empty($key) && !in_array($key, static::ELEMENT_ROUTE_EXCLUDES, true)) { |
149 | - $routeVariables[$key] = 'new \\' . $elementType . '()'; |
|
149 | + $routeVariables[$key] = 'new \\'.$elementType.'()'; |
|
150 | 150 | } |
151 | 151 | } |
152 | 152 | |
@@ -166,14 +166,14 @@ discard block |
||
166 | 166 | if (class_exists(GlobalsExtension::class)) { |
167 | 167 | $globalsExtension = new GlobalsExtension(); |
168 | 168 | foreach ($globalsExtension->getGlobals() as $key => $value) { |
169 | - $globalVariables[$key] = 'new \\' . get_class($value) . '()'; |
|
169 | + $globalVariables[$key] = 'new \\'.get_class($value).'()'; |
|
170 | 170 | } |
171 | 171 | |
172 | 172 | return $globalVariables; |
173 | 173 | } |
174 | 174 | // Fall back and get the globals ourselves |
175 | 175 | foreach (Craft::$app->getGlobals()->getAllSets() as $globalSet) { |
176 | - $globalVariables[$globalSet->handle] = 'new \\' . get_class($globalSet) . '()'; |
|
176 | + $globalVariables[$globalSet->handle] = 'new \\'.get_class($globalSet).'()'; |
|
177 | 177 | } |
178 | 178 | |
179 | 179 | return $globalVariables; |
@@ -124,7 +124,7 @@ discard block |
||
124 | 124 | $methodReturn = ''; |
125 | 125 | $reflectMethodReturnType = $reflectMethod->getReturnType(); |
126 | 126 | if ($reflectMethodReturnType instanceof ReflectionNamedType) { |
127 | - $methodReturn = ': ' . $reflectMethodReturnType->getName(); |
|
127 | + $methodReturn = ': '.$reflectMethodReturnType->getName(); |
|
128 | 128 | } |
129 | 129 | // Method parameters |
130 | 130 | $methodParams = []; |
@@ -132,11 +132,11 @@ discard block |
||
132 | 132 | $paramType = ''; |
133 | 133 | $methodParamType = $methodParam->getType(); |
134 | 134 | if ($methodParamType) { |
135 | - $paramType = $methodParamType . ' '; |
|
135 | + $paramType = $methodParamType.' '; |
|
136 | 136 | } |
137 | - $methodParams[] = $paramType . '$' . $methodParam->getName(); |
|
137 | + $methodParams[] = $paramType.'$'.$methodParam->getName(); |
|
138 | 138 | } |
139 | - $methods[$reflectMethodName] = '(' . implode(', ', $methodParams) . ')' . $methodReturn; |
|
139 | + $methods[$reflectMethodName] = '('.implode(', ', $methodParams).')'.$methodReturn; |
|
140 | 140 | } |
141 | 141 | } catch (\ReflectionException $e) { |
142 | 142 | } |
@@ -152,11 +152,11 @@ discard block |
||
152 | 152 | |
153 | 153 | // Format the line output for each property |
154 | 154 | foreach ($properties as $key => $value) { |
155 | - $properties[$key] = ' * @property \\' . $value . ' $' . $key; |
|
155 | + $properties[$key] = ' * @property \\'.$value.' $'.$key; |
|
156 | 156 | } |
157 | 157 | // Format the line output for each method |
158 | 158 | foreach ($methods as $key => $value) { |
159 | - $methods[$key] = ' * @method ' . $key . $value; |
|
159 | + $methods[$key] = ' * @method '.$key.$value; |
|
160 | 160 | } |
161 | 161 | |
162 | 162 | // Save the template with variable substitution |
@@ -24,7 +24,7 @@ |
||
24 | 24 | |
25 | 25 | public const TEMPLATE_EXTENSION = '.php'; |
26 | 26 | public const STUBS_EXTENSION = '.php.stub'; |
27 | - public const STUBS_DIR = DIRECTORY_SEPARATOR . 'stubs'; |
|
27 | + public const STUBS_DIR = DIRECTORY_SEPARATOR.'stubs'; |
|
28 | 28 | |
29 | 29 | // Public Static Methods |
30 | 30 | // ========================================================================= |
@@ -5,7 +5,7 @@ |
||
5 | 5 | |
6 | 6 | return static function(ECSConfig $ecsConfig): void { |
7 | 7 | $ecsConfig->paths([ |
8 | - __DIR__ . '/src', |
|
8 | + __DIR__.'/src', |
|
9 | 9 | __FILE__, |
10 | 10 | ]); |
11 | 11 | $ecsConfig->parallel(); |