Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configure Renovate #28

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions renovate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"extends": [
"config:base"
]
}
12 changes: 6 additions & 6 deletions src/Contracts/Converter.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,40 +7,40 @@ interface Converter
/**
* Converts text to speech.
*
* @param string $text
* @param array $options
* @param string $text
* @param array $options
* @return mixed
*/
public function convert(string $text, array $options = null);

/**
* Set where to store the converted file.
*
* @param string $disk
* @param string $disk
* @return $this
*/
public function disk(string $disk);

/**
* Set path to where to save the converted file.
*
* @param string $path
* @param string $path
* @return $this
*/
public function saveTo(string $path);

/**
* Sets the source where the text from.
*
* @param string $source
* @param string $source
* @return $this
*/
public function source(string $source);

/**
* Sets the language to be used.
*
* @param string $language
* @param string $language
* @return $this
*/
public function language(string $language);
Expand Down
5 changes: 2 additions & 3 deletions src/Contracts/Formatter.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@ interface Formatter
/**
* Handles the filename of the audio.
*
* @param string $text The text source
* @param mixed $audio The result audio content.
*
* @param string $text The text source
* @param mixed $audio The result audio content.
* @return string
*/
public function handle($text, $audio = null): string;
Expand Down
2 changes: 1 addition & 1 deletion src/Contracts/Source.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ interface Source
/**
* Handles in getting the text from source.
*
* @param string $data
* @param string $data
* @return string
*/
public function handle(string $data): string;
Expand Down
4 changes: 2 additions & 2 deletions src/Converters/NullConverter.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ class NullConverter implements Converter
/**
* Converts the text to speech.
*
* @param mixed $data
* @param array $options
* @param mixed $data
* @param array $options
* @return void
*/
public function convert($data, array $options = null)
Expand Down
26 changes: 13 additions & 13 deletions src/Converters/PollyConverter.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class PollyConverter implements Converter
/**
* Construct converter.
*
* @param PollyClient $client
* @param PollyClient $client
*/
public function __construct(PollyClient $client)
{
Expand All @@ -46,8 +46,8 @@ public function getClient(): PollyClient
/**
* Converts the text to speech.
*
* @param string $data
* @param array $options
* @param string $data
* @param array $options
* @return string|array
*/
public function convert(string $data, array $options = null)
Expand Down Expand Up @@ -81,8 +81,8 @@ public function convert(string $data, array $options = null)
/**
* Request to Amazon Polly to synthesize speech.
*
* @param string|array $text
* @param array $options
* @param string|array $text
* @param array $options
* @return array|\Aws\Result
*/
protected function synthesizeSpeech($text, array $options = null)
Expand Down Expand Up @@ -135,7 +135,7 @@ protected function mergeOutputs(array $results)
/**
* Checks the length of the text if more than 3000.
*
* @param string $text
* @param string $text
* @return bool
*/
protected function isTextAboveLimit(string $text)
Expand All @@ -146,8 +146,8 @@ protected function isTextAboveLimit(string $text)
/**
* Chunk the given text into array.
*
* @param string $text
* @param int $size
* @param string $text
* @param int $size
* @return array
*/
protected function getChunkText(string $text, int $size = 2000)
Expand All @@ -158,7 +158,7 @@ protected function getChunkText(string $text, int $size = 2000)
/**
* Get the text to speech voice ID.
*
* @param array $options
* @param array $options
* @return string
*/
protected function voice($options)
Expand Down Expand Up @@ -193,7 +193,7 @@ protected function getLanguage()
/**
* Get the audio format.
*
* @param array $options
* @param array $options
* @return string
*/
protected function format($options)
Expand All @@ -210,7 +210,7 @@ protected function format($options)
/**
* Get the engine.
*
* @param array $options
* @param array $options
* @return string
*/
protected function engine($options)
Expand All @@ -233,7 +233,7 @@ protected function getSpeechMarks()
/**
* Get the content of the result from AWS Polly.
*
* @param Result $result
* @param Result $result
* @return mixed
*/
protected function getResultContent($result)
Expand All @@ -254,7 +254,7 @@ protected function hasSpeechMarks()
/**
* Format the given json string into an array.
*
* @param string $json
* @param string $json
* @return array
*/
protected function formatToArray($json)
Expand Down
5 changes: 2 additions & 3 deletions src/Formatters/DefaultFilenameFormatter.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,8 @@ class DefaultFilenameFormatter implements FormatterContract
/**
* Handles the filename of the audio.
*
* @param string $text The text source.
* @param mixed $audio The result audio content.
*
* @param string $text The text source.
* @param mixed $audio The result audio content.
* @return string
*/
public function handle($text, $audio = null): string
Expand Down
2 changes: 1 addition & 1 deletion src/Sources/PathSource.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class PathSource implements SourceContract
/**
* Handles in getting the text from source.
*
* @param string $data
* @param string $data
* @return string
*/
public function handle(string $data): string
Expand Down
11 changes: 10 additions & 1 deletion src/Sources/RecursiveDOMIterator.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,20 @@ class RecursiveDOMIterator implements RecursiveIterator
{
/**
* Current Position in DOMNodeList.
*
* @var int
*/
protected $_position;

/**
* The DOMNodeList with all children to iterate over.
*
* @var DOMNodeList
*/
protected $_nodeList;

/**
* @param DOMNode $domNode
* @param DOMNode $domNode
*/
public function __construct(DOMNode $domNode)
{
Expand All @@ -30,6 +32,7 @@ public function __construct(DOMNode $domNode)

/**
* Returns the current DOMNode.
*
* @return DOMNode
*/
public function current()
Expand All @@ -39,6 +42,7 @@ public function current()

/**
* Returns an iterator for the current iterator entry.
*
* @return RecursiveDOMIterator
*/
public function getChildren()
Expand All @@ -48,6 +52,7 @@ public function getChildren()

/**
* Returns if an iterator can be created for the current entry.
*
* @return bool
*/
public function hasChildren()
Expand All @@ -57,6 +62,7 @@ public function hasChildren()

/**
* Returns the current position.
*
* @return int
*/
public function key()
Expand All @@ -66,6 +72,7 @@ public function key()

/**
* Moves the current position to the next element.
*
* @return void
*/
public function next()
Expand All @@ -75,6 +82,7 @@ public function next()

/**
* Rewind the Iterator to the first element.
*
* @return void
*/
public function rewind()
Expand All @@ -84,6 +92,7 @@ public function rewind()

/**
* Checks if current position is valid.
*
* @return bool
*/
public function valid()
Expand Down
2 changes: 1 addition & 1 deletion src/Sources/TextSource.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class TextSource implements SourceContract
/**
* Handles in getting the text from source.
*
* @param string $data
* @param string $data
* @return string
*/
public function handle(string $data): string
Expand Down
4 changes: 2 additions & 2 deletions src/Sources/WebsiteSource.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class WebsiteSource implements SourceContract
/**
* Handles in getting the text from source.
*
* @param string $data
* @param string $data
* @return string
*/
public function handle(string $data): string
Expand Down Expand Up @@ -45,7 +45,7 @@ protected function getDOMDocumentArticle(string $url)
/**
* Get text from the articles DOM Node List.
*
* @param DOMNodeList $articles
* @param DOMNodeList $articles
* @return string
*/
protected function getTextFromArticle(DOMNodeList $articles): string
Expand Down
6 changes: 3 additions & 3 deletions src/TextToSpeechManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ public function createPollyDriver()
/**
* Sets the polly client.
*
* @param array $config
* @param Credentials $credentials
* @param array $config
* @param Credentials $credentials
* @return PollyClient
*/
protected function setPollyClient(array $config, Credentials $credentials)
Expand All @@ -61,7 +61,7 @@ protected function setPollyClient(array $config, Credentials $credentials)
/**
* Get credentials of AWS.
*
* @param array $credentials
* @param array $credentials
* @return \Aws\Credentials\Credentials
*/
protected function getCredentials(array $credentials)
Expand Down
2 changes: 1 addition & 1 deletion src/Traits/HasLanguage.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ trait HasLanguage
/**
* Sets the language to be used.
*
* @param string $language
* @param string $language
* @return $this
*/
public function language(string $language)
Expand Down
2 changes: 1 addition & 1 deletion src/Traits/HasSpeechMarks.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ trait HasSpeechMarks
/**
* Sets the speech mark types.
*
* @param array $speechMarks
* @param array $speechMarks
* @return $this
*/
public function speechMarks(array $speechMarks)
Expand Down
5 changes: 3 additions & 2 deletions src/Traits/Sourceable.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ trait Sourceable
/**
* Sets the source.
*
* @param string $source
* @param string $source
* @return $this
*/
public function source(string $source)
Expand All @@ -28,7 +28,8 @@ public function source(string $source)

/**
* Get text from source.
* @param string $data
*
* @param string $data
* @return string
*/
protected function getTextFromSource(string $data): string
Expand Down
Loading