Security update for Core, with self-updated composer
[yaffs-website] / vendor / drupal / console / src / Annotations / DrupalCommandAnnotationReader.php
index 476acb3811a5ee4d6037cbcca3306576d9da2ab3..a8f83befca2128fa40f088ad8108c3fb87ce7bfd 100644 (file)
@@ -17,16 +17,22 @@ class DrupalCommandAnnotationReader
      */
     public function readAnnotation($class)
     {
-        $annotation = [];
+        $annotation = [
+            'extension' => null,
+            'extensionType' => null,
+            'dependencies' => [],
+            'bootstrap' => 'installed'
+        ];
         $reader = new AnnotationReader();
         $drupalCommandAnnotation = $reader->getClassAnnotation(
             new \ReflectionClass($class),
             'Drupal\\Console\\Annotations\\DrupalCommand'
         );
         if ($drupalCommandAnnotation) {
-            $annotation['extension'] = $drupalCommandAnnotation->extension?:'';
-            $annotation['extensionType'] = $drupalCommandAnnotation->extensionType?:'';
+            $annotation['extension'] = $drupalCommandAnnotation->extension?:null;
+            $annotation['extensionType'] = $drupalCommandAnnotation->extensionType?:null;
             $annotation['dependencies'] = $drupalCommandAnnotation->dependencies?:[];
+            $annotation['bootstrap'] = $drupalCommandAnnotation->bootstrap?:'install';
         }
 
         return $annotation;