Completed
Push — master ( 429bcf...33dd8e )
by
unknown
34:58 queued 31:50
created
src/Sculpin/Bundle/ContentTypesBundle/Command/ContentCreateCommand.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
     {
38 38
         $prefix = $this->isStandaloneSculpin() ? '' : 'sculpin:';
39 39
 
40
-        $this->setName($prefix . 'content:create');
40
+        $this->setName($prefix.'content:create');
41 41
         $this->setDescription('Create a new content type, including boilerplate template files.');
42 42
         $this->setDefinition(
43 43
             [
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
         $dryRun       = $input->getOption('dry-run');
93 93
         $taxonomies   = $input->getOption('taxonomy');
94 94
 
95
-        $output->writeln('Generating new content type: <info>' . $pluralType . '</info>');
95
+        $output->writeln('Generating new content type: <info>'.$pluralType.'</info>');
96 96
 
97 97
         // TODO: Prompt the user with a preview before generating content
98 98
         $output->writeln($this->getOutputMessage($pluralType, $singularType, $taxonomies));
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
             $output->writeln("Dry run. Skipping creation of these boilerplate files:");
108 108
 
109 109
             foreach ($boilerplateManifest as $filename => $value) {
110
-                $output->writeln("\t<info>" . $filename . '</info>');
110
+                $output->writeln("\t<info>".$filename.'</info>');
111 111
             }
112 112
 
113 113
             $output->writeln("\nRemember to add the content type definition (displayed above) to sculpin_kernel.yml!");
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
             return;
116 116
         }
117 117
 
118
-        $output->writeln('Generating boilerplate for ' . $pluralType);
118
+        $output->writeln('Generating boilerplate for '.$pluralType);
119 119
         $fs = new Filesystem();
120 120
         foreach ($boilerplateManifest as $filename => $value) {
121 121
             // create directory and skip the rest of the loop
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
             }
126 126
 
127 127
             if ($fs->exists($filename)) {
128
-                $output->writeln('Warning: ' . $filename . ' already exists at the target location. Skipping.');
128
+                $output->writeln('Warning: '.$filename.' already exists at the target location. Skipping.');
129 129
                 continue;
130 130
             }
131 131
 
@@ -147,33 +147,33 @@  discard block
 block discarded – undo
147 147
         $manifest = [];
148 148
 
149 149
         // ensure the content type storage folder exists
150
-        $storageFolder            = $rootDir . '/source/_' . $plural;
150
+        $storageFolder            = $rootDir.'/source/_'.$plural;
151 151
         $manifest[$storageFolder] = static::DIRECTORY_FLAG;
152 152
 
153 153
         // content type index template
154
-        $index            = $rootDir . '/source/' . $plural . '.html';
154
+        $index            = $rootDir.'/source/'.$plural.'.html';
155 155
         $manifest[$index] = $this->getIndexTemplate($plural, $singular);
156 156
 
157 157
         // ensure the views folder exists
158
-        $storageFolder            = $rootDir . '/source/_views';
158
+        $storageFolder            = $rootDir.'/source/_views';
159 159
         $manifest[$storageFolder] = static::DIRECTORY_FLAG;
160 160
 
161 161
         // content type view template
162
-        $index            = $rootDir . '/source/_views/' . $singular . '.html';
162
+        $index            = $rootDir.'/source/_views/'.$singular.'.html';
163 163
         $manifest[$index] = $this->getViewTemplate($plural, $taxonomies);
164 164
 
165 165
         foreach ($taxonomies as $taxonomy) {
166 166
             $singularTaxonomy = Inflector::singularize($taxonomy);
167 167
             // content taxonomy index template
168
-            $index            = $rootDir . '/source/' . $plural . '/' . $taxonomy . '.html';
168
+            $index            = $rootDir.'/source/'.$plural.'/'.$taxonomy.'.html';
169 169
             $manifest[$index] = $this->getTaxonomyIndexTemplate($plural, $taxonomy, $singularTaxonomy);
170 170
 
171 171
             // content taxonomy directory
172
-            $storageFolder            = $rootDir . '/source/' . $plural . '/' . $taxonomy;
172
+            $storageFolder            = $rootDir.'/source/'.$plural.'/'.$taxonomy;
173 173
             $manifest[$storageFolder] = static::DIRECTORY_FLAG;
174 174
 
175 175
             // content taxonomy view template(s)
176
-            $index            = $rootDir . '/source/' . $plural . '/' . $taxonomy . '/' . $singularTaxonomy . '.html';
176
+            $index            = $rootDir.'/source/'.$plural.'/'.$taxonomy.'/'.$singularTaxonomy.'.html';
177 177
             $manifest[$index] = $this->getTaxonomyViewTemplate($plural, $singular, $singularTaxonomy);
178 178
         }
179 179
 
@@ -261,7 +261,7 @@  discard block
 block discarded – undo
261 261
 EOT;
262 262
 
263 263
         if ($taxonomies) {
264
-            $output .= "\n" . '  <section class="taxonomies">' . "\n";
264
+            $output .= "\n".'  <section class="taxonomies">'."\n";
265 265
 
266 266
             foreach ($taxonomies as $taxonomy) {
267 267
                 $capitalTaxonomy  = ucwords($taxonomy);
@@ -278,7 +278,7 @@  discard block
 block discarded – undo
278 278
 EOT;
279 279
             }
280 280
 
281
-            $output .= "\n" . '  </section>' . "\n";
281
+            $output .= "\n".'  </section>'."\n";
282 282
         }
283 283
 
284 284
         $output .= <<<EOT
Please login to merge, or discard this patch.