Command/CreateResourceCommand.php
private function validateTemplate($template, $templateList)
    {
        if (empty($template)) {
            throw new \Exception('The template name is required.');
        }

        if (!in_array($template, $templateList)) {
            throw new \InvalidArgumentException(
                sprintf('The template "%s" does not exist, use: %s', $template, implode(', ', $templateList))
            );
        }
    }
private function validateTemplate($template, $templateList)
    {
        if (empty($template)) {
            throw new \Exception('The template name is required.');
        }

        if (!in_array($template, $templateList)) {
            throw new \InvalidArgumentException(
                sprintf('The template "%s" does not exist, use: %s', $template, implode(', ', $templateList))
            );
        }
    }
private function validateTemplate ( $ template , $ templateList ) { if ( empty ( $ template ) ) { throw new \ Exception ( 'The template name is required.' ) ; } if ( ! in_array ( $ template , $ templateList ) ) { throw new \ InvalidArgumentException ( sprintf ( 'The template "%s" does not exist, use: %s' , $ template , implode ( ', ' , $ templateList ) ) ) ; } }
Validate template name

@param string $template
@param array  $templateList

@throws \Exception
Validate template name