Skip to content

Commit

Permalink
fix: fix files with lint 🚨
Browse files Browse the repository at this point in the history
  • Loading branch information
thiiagoms committed May 21, 2023
1 parent 1c583c9 commit 4ce52dc
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions src/Utils/Views.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,17 @@

/**
* Render config templates
*
*
* @package Src\Utils
*/
class Views
{

/** @var const $templates default location */
private const TEMPLATES = __DIR__ . '/../../resources/';

/**
* Check if template config file exists on default directory
*
*
* @param string $template
* @return string
*/
Expand All @@ -28,17 +27,16 @@ public function getTemplate(string $template): string

/**
* Render template with values
*
*
* @param string $template
* @param array $data
* @param array $data
* @return string
*/
public function render(string $template, array $data = []): string
{
$file = $this->getTemplate($template);

if (isset($file)) {

$keys = array_keys($data);

$keys = array_map(function (string $item) {
Expand All @@ -49,6 +47,5 @@ public function render(string $template, array $data = []): string
}

return "Template: $file not found";

}
}

0 comments on commit 4ce52dc

Please sign in to comment.