mirror of
https://github.com/DesignPatternsPHP/DesignPatternsPHP.git
synced 2025-07-30 19:50:12 +02:00
Cleaned up code to be consistent, inc. adding docblocs, using PSR naming conventions & typos
Docblocs benefits: - IDE auto complete gives info on type etc - Auto documentation on CI
This commit is contained in:
@@ -1,19 +1,24 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* DesignPatternPHP
|
||||
*/
|
||||
|
||||
namespace DesignPatterns\AbstractFactory\Json;
|
||||
|
||||
use DesignPatterns\AbstractFactory\Text as BaseText;
|
||||
|
||||
/**
|
||||
* Class Text
|
||||
*
|
||||
* Text is a text component with a JSON rendering
|
||||
*
|
||||
* @package DesignPatterns\AbstractFactory\Json
|
||||
*/
|
||||
class Text extends BaseText
|
||||
{
|
||||
|
||||
/**
|
||||
* some crude rendering from JSON output
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function render()
|
||||
{
|
||||
return json_encode(array('content' => $this->_text));
|
||||
|
Reference in New Issue
Block a user