Code Duplication    Length = 7-7 lines in 2 locations

src/Generator.php 2 locations

@@ 107-113 (lines=7) @@
104
    if(!isset($meta["styles"]) AND !isset($meta["scripts"])) {
105
      return;
106
    }
107
    if(isset($meta["styles"])) {
108
      array_walk($meta["styles"], function(&$value) use($basePath) {
109
        $this->addAsset("$basePath/$value");
110
        $value = "<link rel=\"stylesheet\" type=\"text/css\" href=\"$value\">";
111
      });
112
      $meta["styles"] = implode("\n  ", $meta["styles"]);
113
    }
114
    if(isset($meta["scripts"])) {
115
      array_walk($meta["scripts"], function(&$value) use($basePath) {
116
        $this->addAsset("$basePath/$value");
@@ 114-120 (lines=7) @@
111
      });
112
      $meta["styles"] = implode("\n  ", $meta["styles"]);
113
    }
114
    if(isset($meta["scripts"])) {
115
      array_walk($meta["scripts"], function(&$value) use($basePath) {
116
        $this->addAsset("$basePath/$value");
117
        $value = "<script type=\"text/javascript\" src=\"$value\"></script>";
118
      });
119
      $meta["scripts"] = implode("\n  ", $meta["scripts"]);
120
    }
121
  }
122
  
123
  protected function createHtml(string $filename): string {