Skip to content

Commit

Permalink
Code Style. doc blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
Ralf Eggert committed Jul 24, 2020
1 parent 6bc9fb1 commit aa51d87
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 15 deletions.
35 changes: 23 additions & 12 deletions src/Response/Directives/Alexa/Presentation/APLA/Document/APLA.php
Original file line number Diff line number Diff line change
@@ -1,28 +1,40 @@
<?php
/**
* Build voice applications for Amazon Alexa with phlexa and PHP
*
* @author Meike Ziesecke <[email protected]>
* @license http://opensource.org/licenses/MIT The MIT License (MIT)
* @link https://github.com/phoice/phlexa
* @link https://www.phoice.tech/
* @link https://www.travello.audio/
*/

declare(strict_types=1);

namespace Phlexa\Response\Directives\Alexa\Presentation\APLA\Document;

use Phlexa\Response\Directives\DirectivesInterface;

/**
* Class APLA
*
* @package Phlexa\Response\Directives\Alexa\Presentation\APLA\Document
*/
class APLA implements DirectivesInterface
{
/** Type of directive */
public const DIRECTIVE_TYPE = 'APLA';

/** @var string */
private $version = '0.8';

/**
* @var array
*/
private $mainTemplate = [];


/** @var array */
private $mainTemplate = [];

/**
* APLA constructor.
*
* @param array $mainTemplate
* @param array $mainTemplate
*/
public function __construct(
array $mainTemplate
Expand All @@ -38,16 +50,16 @@ public function __construct(
public static function createFromString(string $aplaJson): APLA
{
$aplaData = json_decode($aplaJson, true);

$mainTemplate = $aplaData['mainTemplate'] ?? [];

return new APLA($mainTemplate);
}

/**
* @param string $aplFile
* @param string $aplaFile
*
* @return APL
* @return APLA
*/
public static function createFromFile(string $aplaFile): APLA
{
Expand Down Expand Up @@ -77,5 +89,4 @@ public function toArray(): array

return $data;
}

}
}
22 changes: 19 additions & 3 deletions src/Response/Directives/Alexa/Presentation/APLA/RenderDocument.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,26 @@
<?php
/**
* Build voice applications for Amazon Alexa with phlexa and PHP
*
* @author Meike Ziesecke <[email protected]>
* @license http://opensource.org/licenses/MIT The MIT License (MIT)
* @link https://github.com/phoice/phlexa
* @link https://www.phoice.tech/
* @link https://www.travello.audio/
*/

declare(strict_types=1);

namespace Phlexa\Response\Directives\Alexa\Presentation\APLA;

use Phlexa\Response\Directives\Alexa\Presentation\APLA\Document\APLA;
use Phlexa\Response\Directives\DirectivesInterface;

/**
* Class RenderDocument
*
* @package Phlexa\Response\Directives\Alexa\Presentation\APLA
*/
class RenderDocument implements DirectivesInterface
{
/** Type of directive */
Expand All @@ -21,7 +38,7 @@ class RenderDocument implements DirectivesInterface
/**
* RenderDocument constructor.
*
* @param APLA $document
* @param APLA $document
* @param string $token
* @param array $datasources
*/
Expand Down Expand Up @@ -54,5 +71,4 @@ public function toArray(): array

return $data;
}

}
}

0 comments on commit aa51d87

Please sign in to comment.