Passed
Push — develop ( ad57ae...e61309 )
by Andrew
04:02
created
src/base/GeneratorInterface.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
 
26 26
     const TEMPLATE_EXTENSION = '.php';
27 27
     const STUBS_EXTENSION = '.php.stub';
28
-    const STUBS_DIR = DIRECTORY_SEPARATOR . 'stubs';
28
+    const STUBS_DIR = DIRECTORY_SEPARATOR.'stubs';
29 29
 
30 30
     // Public Static Methods
31 31
     // =========================================================================
Please login to merge, or discard this patch.
src/base/Generator.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 }
Please login to merge, or discard this patch.
src/generators/AutocompleteVariableGenerator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -79,7 +79,7 @@
 block discarded – undo
79 79
 
80 80
         // Format the line output for each value
81 81
         foreach ($values as $key => $value) {
82
-            $values[$key] = ' * @property \\' . $value . ' $' . $key;
82
+            $values[$key] = ' * @property \\'.$value.' $'.$key;
83 83
         }
84 84
 
85 85
         // Save the template with variable substitution
Please login to merge, or discard this patch.
src/console/controllers/AutocompleteController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
src/Autocomplete.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -112,11 +112,11 @@  discard block
 block discarded – undo
112 112
      */
113 113
     public function registerEventHandlers()
114 114
     {
115
-        Event::on(Plugins::class,Plugins::EVENT_AFTER_INSTALL_PLUGIN, [$this, 'regenerateAutocompleteClasses']);
116
-        Event::on(Plugins::class,Plugins::EVENT_AFTER_UNINSTALL_PLUGIN, [$this, 'deleteAutocompleteClasses']);
117
-        Event::on(Globals::class,Globals::EVENT_AFTER_SAVE_GLOBAL_SET, [$this, 'deleteAutocompleteClasses']);
118
-        Event::on(Plugins::class,Plugins::EVENT_AFTER_LOAD_PLUGINS, [$this, 'generateAutocompleteClasses']);
119
-        Craft::info('Event Handlers installed',__METHOD__);
115
+        Event::on(Plugins::class, Plugins::EVENT_AFTER_INSTALL_PLUGIN, [$this, 'regenerateAutocompleteClasses']);
116
+        Event::on(Plugins::class, Plugins::EVENT_AFTER_UNINSTALL_PLUGIN, [$this, 'deleteAutocompleteClasses']);
117
+        Event::on(Globals::class, Globals::EVENT_AFTER_SAVE_GLOBAL_SET, [$this, 'deleteAutocompleteClasses']);
118
+        Event::on(Plugins::class, Plugins::EVENT_AFTER_LOAD_PLUGINS, [$this, 'generateAutocompleteClasses']);
119
+        Craft::info('Event Handlers installed', __METHOD__);
120 120
     }
121 121
 
122 122
     /**
@@ -125,11 +125,11 @@  discard block
 block discarded – undo
125 125
     public function generateAutocompleteClasses()
126 126
     {
127 127
         $autocompleteGenerators = $this->getAllAutocompleteGenerators();
128
-        foreach($autocompleteGenerators as $generatorClass) {
128
+        foreach ($autocompleteGenerators as $generatorClass) {
129 129
             /* @var Generator $generatorClass */
130 130
             $generatorClass::generate();
131 131
         }
132
-        Craft::info('Autocomplete classes generated',__METHOD__);
132
+        Craft::info('Autocomplete classes generated', __METHOD__);
133 133
     }
134 134
 
135 135
     /**
@@ -138,11 +138,11 @@  discard block
 block discarded – undo
138 138
     public function regenerateAutocompleteClasses()
139 139
     {
140 140
         $autocompleteGenerators = $this->getAllAutocompleteGenerators();
141
-        foreach($autocompleteGenerators as $generatorClass) {
141
+        foreach ($autocompleteGenerators as $generatorClass) {
142 142
             /* @var Generator $generatorClass */
143 143
             $generatorClass::regenerate();
144 144
         }
145
-        Craft::info('Autocomplete classes regenerated',__METHOD__);
145
+        Craft::info('Autocomplete classes regenerated', __METHOD__);
146 146
     }
147 147
 
148 148
     /**
@@ -151,11 +151,11 @@  discard block
 block discarded – undo
151 151
     public function deleteAutocompleteClasses()
152 152
     {
153 153
         $autocompleteGenerators = $this->getAllAutocompleteGenerators();
154
-        foreach($autocompleteGenerators as $generatorClass) {
154
+        foreach ($autocompleteGenerators as $generatorClass) {
155 155
             /* @var Generator $generatorClass */
156 156
             $generatorClass::delete();
157 157
         }
158
-        Craft::info('Autocomplete classes deleted',__METHOD__);
158
+        Craft::info('Autocomplete classes deleted', __METHOD__);
159 159
     }
160 160
 
161 161
     // Protected Methods
Please login to merge, or discard this patch.
src/generators/AutocompleteTwigExtensionGenerator.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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;
Please login to merge, or discard this patch.