src/TemplatesCollection.php
protected function normalizeTemplateDuringRegistration($template)
    {
        if (empty($template['name'])) {
            throw new InvalidArgumentException('Impossible to register a template without "name"');
        }

        if (empty($template['path'])) {
            throw new InvalidArgumentException('Impossible to register a template without "path"');
        }

        $template['description'] = isset($template['description']) ? $template['description'] : '';
        $template['aliases'] = isset($template['aliases']) ? $template['aliases'] : [];
        $template['is_alias'] = false;

        return $template;
    }
protected function normalizeTemplateDuringRegistration($template)
    {
        if (empty($template['name'])) {
            throw new InvalidArgumentException('Impossible to register a template without "name"');
        }

        if (empty($template['path'])) {
            throw new InvalidArgumentException('Impossible to register a template without "path"');
        }

        $template['description'] = isset($template['description']) ? $template['description'] : '';
        $template['aliases'] = isset($template['aliases']) ? $template['aliases'] : [];
        $template['is_alias'] = false;

        return $template;
    }
protected function normalizeTemplateDuringRegistration ( $ template ) { if ( empty ( $ template [ 'name' ] ) ) { throw new InvalidArgumentException ( 'Impossible to register a template without "name"' ) ; } if ( empty ( $ template [ 'path' ] ) ) { throw new InvalidArgumentException ( 'Impossible to register a template without "path"' ) ; } $ template [ 'description' ] = isset ( $ template [ 'description' ] ) ? $ template [ 'description' ] : '' ; $ template [ 'aliases' ] = isset ( $ template [ 'aliases' ] ) ? $ template [ 'aliases' ] : [ ] ; $ template [ 'is_alias' ] = false ; return $ template ; }
Check template fields and normalize them.

@param $template

@return array
Check template fields and normalize them .