update webpatser/laravel-uuid to version 3
Some checks failed
abc-api/abcParser/pipeline/head There was a failure building this commit

This commit is contained in:
2020-06-20 12:36:34 -04:00
parent a530e8fd78
commit 2cdf7dd1cf
94 changed files with 1846 additions and 1848 deletions

1
src/Domain/Modules/Interpreter/Builder.php Normal file → Executable file
View File

@@ -12,6 +12,7 @@ use XaiCorp\AbcParser\Domain\Core\Transcriber;
use XaiCorp\AbcParser\Domain\Core\Tune;
use XaiCorp\AbcParser\Domain\Core\TuneBuilder;
use XaiCorp\AbcParser\Domain\Core\TuneCollection;
//use XaiCorp\AbcParser\Models\Laravel5\TuneSetting;
class Builder implements TuneBuilder

0
src/Domain/Modules/Interpreter/Context.php Normal file → Executable file
View File

2
src/Domain/Modules/Interpreter/DefaultInterpreter.php Normal file → Executable file
View File

@@ -1,8 +1,6 @@
<?php
namespace XaiCorp\AbcParser\Domain\Modules\Interpreter;
use Enzyme\Axiom\Atoms\StringAtom;
use XaiCorp\AbcParser\Domain\Core\Tune;
use XaiCorp\AbcParser\Domain\Modules\Interpreter\Lexicon\Author;
use XaiCorp\AbcParser\Domain\Modules\Interpreter\Lexicon\Book;
use XaiCorp\AbcParser\Domain\Modules\Interpreter\Lexicon\Composer;

1
src/Domain/Modules/Interpreter/Interpreter.php Normal file → Executable file
View File

@@ -1,7 +1,6 @@
<?php
namespace XaiCorp\AbcParser\Domain\Modules\Interpreter;
use XaiCorp\AbcParser\Domain\Core\Tune;
use XaiCorp\AbcParser\Domain\Core\TuneBuilder;
use XaiCorp\AbcParser\Domain\Core\TuneCollection;

0
src/Domain/Modules/Interpreter/InterpreterPipeline.php Normal file → Executable file
View File

8
src/Domain/Modules/Interpreter/Lexicon/Author.php Normal file → Executable file
View File

@@ -1,10 +1,8 @@
<?php
namespace XaiCorp\AbcParser\Domain\Modules\Interpreter\Lexicon;
use Enzyme\Axiom\Atoms\StringAtom;
use XaiCorp\AbcParser\Domain\Atoms\UnsignedIntegerAtom;
use Closure;
use XaiCorp\AbcParser\Domain\Core\TuneBuilder;
use XaiCorp\AbcParser\Domain\Modules\Interpreter\Builder;
use XaiCorp\AbcParser\Domain\Modules\Interpreter\Context;
class Author implements Lex
@@ -27,10 +25,10 @@ class Author implements Lex
* @return mixed
* @throws \Enzyme\Axiom\Exceptions\AtomException
*/
public function handle(Context $context, \Closure $next)
public function handle(Context $context, Closure $next)
{
$line = $context->current();
list($key, $data) = $this->getKeyDataFromLine($line);
[$key, $data] = $this->getKeyDataFromLine($line);
if ($key === 'A') {
$this->builder->addAuthor($data);

7
src/Domain/Modules/Interpreter/Lexicon/Book.php Normal file → Executable file
View File

@@ -1,10 +1,9 @@
<?php
namespace XaiCorp\AbcParser\Domain\Modules\Interpreter\Lexicon;
use Closure;
use Enzyme\Axiom\Atoms\StringAtom;
use XaiCorp\AbcParser\Domain\Atoms\UnsignedIntegerAtom;
use XaiCorp\AbcParser\Domain\Core\TuneBuilder;
use XaiCorp\AbcParser\Domain\Modules\Interpreter\Builder;
use XaiCorp\AbcParser\Domain\Modules\Interpreter\Context;
class Book implements Lex
@@ -27,10 +26,10 @@ class Book implements Lex
* @return mixed
* @throws \Enzyme\Axiom\Exceptions\AtomException
*/
public function handle(Context $context, \Closure $next)
public function handle(Context $context, Closure $next)
{
$line = $context->current();
list($key, $data) = $this->getKeyDataFromLine($line);
[$key, $data] = $this->getKeyDataFromLine($line);
if ($key === 'B') {
$this->builder->addBook(new StringAtom($data));

8
src/Domain/Modules/Interpreter/Lexicon/Composer.php Normal file → Executable file
View File

@@ -1,10 +1,8 @@
<?php
namespace XaiCorp\AbcParser\Domain\Modules\Interpreter\Lexicon;
use Enzyme\Axiom\Atoms\StringAtom;
use XaiCorp\AbcParser\Domain\Atoms\UnsignedIntegerAtom;
use Closure;
use XaiCorp\AbcParser\Domain\Core\TuneBuilder;
use XaiCorp\AbcParser\Domain\Modules\Interpreter\Builder;
use XaiCorp\AbcParser\Domain\Modules\Interpreter\Context;
class Composer implements Lex
@@ -27,10 +25,10 @@ class Composer implements Lex
* @return mixed
* @throws \Enzyme\Axiom\Exceptions\AtomException
*/
public function handle(Context $context, \Closure $next)
public function handle(Context $context, Closure $next)
{
$line = $context->current();
list($key, $data) = $this->getKeyDataFromLine($line);
[$key, $data] = $this->getKeyDataFromLine($line);
if ($key === 'C') {
$this->builder->addComposer($data);

7
src/Domain/Modules/Interpreter/Lexicon/Discography.php Normal file → Executable file
View File

@@ -1,10 +1,9 @@
<?php
namespace XaiCorp\AbcParser\Domain\Modules\Interpreter\Lexicon;
use Closure;
use Enzyme\Axiom\Atoms\StringAtom;
use XaiCorp\AbcParser\Domain\Atoms\UnsignedIntegerAtom;
use XaiCorp\AbcParser\Domain\Core\TuneBuilder;
use XaiCorp\AbcParser\Domain\Modules\Interpreter\Builder;
use XaiCorp\AbcParser\Domain\Modules\Interpreter\Context;
class Discography implements Lex
@@ -27,10 +26,10 @@ class Discography implements Lex
* @return mixed
* @throws \Enzyme\Axiom\Exceptions\AtomException
*/
public function handle(Context $context, \Closure $next)
public function handle(Context $context, Closure $next)
{
$line = $context->current();
list($key, $data) = $this->getKeyDataFromLine($line);
[$key, $data] = $this->getKeyDataFromLine($line);
if ($key === 'D') {
$this->builder->addDiscography(new StringAtom($data));

6
src/Domain/Modules/Interpreter/Lexicon/EndOfTune.php Normal file → Executable file
View File

@@ -1,10 +1,8 @@
<?php
namespace XaiCorp\AbcParser\Domain\Modules\Interpreter\Lexicon;
use Enzyme\Axiom\Atoms\StringAtom;
use XaiCorp\AbcParser\Domain\Atoms\UnsignedIntegerAtom;
use Closure;
use XaiCorp\AbcParser\Domain\Core\TuneBuilder;
use XaiCorp\AbcParser\Domain\Modules\Interpreter\Builder;
use XaiCorp\AbcParser\Domain\Modules\Interpreter\Context;
class EndOfTune implements Lex
@@ -27,7 +25,7 @@ class EndOfTune implements Lex
* @return mixed
* @throws \Enzyme\Axiom\Exceptions\AtomException
*/
public function handle(Context $context, \Closure $next)
public function handle(Context $context, Closure $next)
{
$line = $context->current();
// list($key, $data) = $this->getKeyDataFromLine($line);

7
src/Domain/Modules/Interpreter/Lexicon/Filename.php Normal file → Executable file
View File

@@ -1,10 +1,9 @@
<?php
namespace XaiCorp\AbcParser\Domain\Modules\Interpreter\Lexicon;
use Closure;
use Enzyme\Axiom\Atoms\StringAtom;
use XaiCorp\AbcParser\Domain\Atoms\UnsignedIntegerAtom;
use XaiCorp\AbcParser\Domain\Core\TuneBuilder;
use XaiCorp\AbcParser\Domain\Modules\Interpreter\Builder;
use XaiCorp\AbcParser\Domain\Modules\Interpreter\Context;
class Filename implements Lex
@@ -27,10 +26,10 @@ class Filename implements Lex
* @return mixed
* @throws \Enzyme\Axiom\Exceptions\AtomException
*/
public function handle(Context $context, \Closure $next)
public function handle(Context $context, Closure $next)
{
$line = $context->current();
list($key, $data) = $this->getKeyDataFromLine($line);
[$key, $data] = $this->getKeyDataFromLine($line);
if ($key === 'F'
&& $context->getState() === $context::MODE_TUNE_HEADER

7
src/Domain/Modules/Interpreter/Lexicon/Group.php Normal file → Executable file
View File

@@ -1,10 +1,9 @@
<?php
namespace XaiCorp\AbcParser\Domain\Modules\Interpreter\Lexicon;
use Closure;
use Enzyme\Axiom\Atoms\StringAtom;
use XaiCorp\AbcParser\Domain\Atoms\UnsignedIntegerAtom;
use XaiCorp\AbcParser\Domain\Core\TuneBuilder;
use XaiCorp\AbcParser\Domain\Modules\Interpreter\Builder;
use XaiCorp\AbcParser\Domain\Modules\Interpreter\Context;
class Group implements Lex
@@ -27,10 +26,10 @@ class Group implements Lex
* @return mixed
* @throws \Enzyme\Axiom\Exceptions\AtomException
*/
public function handle(Context $context, \Closure $next)
public function handle(Context $context, Closure $next)
{
$line = $context->current();
list($key, $data) = $this->getKeyDataFromLine($line);
[$key, $data] = $this->getKeyDataFromLine($line);
if ($key === 'G') {
$this->builder->addGroup(new StringAtom($data));

12
src/Domain/Modules/Interpreter/Lexicon/History.php Normal file → Executable file
View File

@@ -1,10 +1,8 @@
<?php
namespace XaiCorp\AbcParser\Domain\Modules\Interpreter\Lexicon;
use Enzyme\Axiom\Atoms\StringAtom;
use XaiCorp\AbcParser\Domain\Atoms\UnsignedIntegerAtom;
use Closure;
use XaiCorp\AbcParser\Domain\Core\TuneBuilder;
use XaiCorp\AbcParser\Domain\Modules\Interpreter\Builder;
use XaiCorp\AbcParser\Domain\Modules\Interpreter\Context;
class History implements Lex
@@ -28,10 +26,10 @@ class History implements Lex
* @throws \Enzyme\Axiom\Exceptions\AtomException
* @throws \Enzyme\Collection\CollectionException
*/
public function handle(Context $context, \Closure $next)
public function handle(Context $context, Closure $next)
{
$line = $context->current();
list($key, $data) = $this->getKeyDataFromLine($line);
[$key, $data] = $this->getKeyDataFromLine($line);
if ($key === 'H'
&& $context->isState($context::MODE_TUNE_HEADER)
@@ -56,8 +54,8 @@ class History implements Lex
*/
private function nextLineNotHistory(Context $context)
{
$nextLine = $context->get($context->key() +1);
list($key, $data) = $this->getKeyDataFromLine($nextLine);
$nextLine = $context->get($context->key() + 1);
[$key, $data] = $this->getKeyDataFromLine($nextLine);
return $key !== '';
}
}

7
src/Domain/Modules/Interpreter/Lexicon/Index.php Normal file → Executable file
View File

@@ -1,10 +1,9 @@
<?php
namespace XaiCorp\AbcParser\Domain\Modules\Interpreter\Lexicon;
use Enzyme\Axiom\Atoms\StringAtom;
use Closure;
use XaiCorp\AbcParser\Domain\Atoms\UnsignedIntegerAtom;
use XaiCorp\AbcParser\Domain\Core\TuneBuilder;
use XaiCorp\AbcParser\Domain\Modules\Interpreter\Builder;
use XaiCorp\AbcParser\Domain\Modules\Interpreter\Context;
class Index implements Lex
@@ -21,10 +20,10 @@ class Index implements Lex
$this->builder = $builder;
}
public function handle(Context $context, \Closure $next)
public function handle(Context $context, Closure $next)
{
$line = $context->current();
list($key, $data) = $this->getKeyDataFromLine($line);
[$key, $data] = $this->getKeyDataFromLine($line);
if ($key === 'X') {
$context->setStateInTuneHeader();

View File

@@ -1,10 +1,9 @@
<?php
namespace XaiCorp\AbcParser\Domain\Modules\Interpreter\Lexicon;
use Closure;
use Enzyme\Axiom\Atoms\StringAtom;
use XaiCorp\AbcParser\Domain\Atoms\UnsignedIntegerAtom;
use XaiCorp\AbcParser\Domain\Core\TuneBuilder;
use XaiCorp\AbcParser\Domain\Modules\Interpreter\Builder;
use XaiCorp\AbcParser\Domain\Modules\Interpreter\Context;
class KeySignature implements Lex
@@ -27,10 +26,10 @@ class KeySignature implements Lex
* @return mixed
* @throws \Enzyme\Axiom\Exceptions\AtomException
*/
public function handle(Context $context, \Closure $next)
public function handle(Context $context, Closure $next)
{
$line = $context->current();
list($key, $data) = $this->getKeyDataFromLine($line);
[$key, $data] = $this->getKeyDataFromLine($line);
if ($context->getState() === $context::MODE_TUNE_HEADER && $key === 'K') {
$this->builder->setKey(new StringAtom($data));

0
src/Domain/Modules/Interpreter/Lexicon/Lex.php Normal file → Executable file
View File

View File

7
src/Domain/Modules/Interpreter/Lexicon/Meter.php Normal file → Executable file
View File

@@ -1,10 +1,9 @@
<?php
namespace XaiCorp\AbcParser\Domain\Modules\Interpreter\Lexicon;
use Closure;
use Enzyme\Axiom\Atoms\StringAtom;
use XaiCorp\AbcParser\Domain\Atoms\UnsignedIntegerAtom;
use XaiCorp\AbcParser\Domain\Core\TuneBuilder;
use XaiCorp\AbcParser\Domain\Modules\Interpreter\Builder;
use XaiCorp\AbcParser\Domain\Modules\Interpreter\Context;
class Meter implements Lex
@@ -27,10 +26,10 @@ class Meter implements Lex
* @return mixed
* @throws \Enzyme\Axiom\Exceptions\AtomException
*/
public function handle(Context $context, \Closure $next)
public function handle(Context $context, Closure $next)
{
$line = $context->current();
list($key, $data) = $this->getKeyDataFromLine($line);
[$key, $data] = $this->getKeyDataFromLine($line);
if ($key === 'M'
&& $context->getState() === $context::MODE_TUNE_HEADER

8
src/Domain/Modules/Interpreter/Lexicon/MusicLine.php Normal file → Executable file
View File

@@ -1,10 +1,8 @@
<?php
namespace XaiCorp\AbcParser\Domain\Modules\Interpreter\Lexicon;
use Enzyme\Axiom\Atoms\StringAtom;
use XaiCorp\AbcParser\Domain\Atoms\UnsignedIntegerAtom;
use Closure;
use XaiCorp\AbcParser\Domain\Core\TuneBuilder;
use XaiCorp\AbcParser\Domain\Modules\Interpreter\Builder;
use XaiCorp\AbcParser\Domain\Modules\Interpreter\Context;
class MusicLine implements Lex
@@ -27,10 +25,10 @@ class MusicLine implements Lex
* @return mixed
* @throws \Enzyme\Axiom\Exceptions\AtomException
*/
public function handle(Context $context, \Closure $next)
public function handle(Context $context, Closure $next)
{
$line = $context->current();
list($key, $data) = $this->getKeyDataFromLine($line);
[$key, $data] = $this->getKeyDataFromLine($line);
if ($context->getState() === $context::MODE_TUNE_BODY
&& $key !== 'K'

7
src/Domain/Modules/Interpreter/Lexicon/NoteLength.php Normal file → Executable file
View File

@@ -1,10 +1,9 @@
<?php
namespace XaiCorp\AbcParser\Domain\Modules\Interpreter\Lexicon;
use Closure;
use Enzyme\Axiom\Atoms\StringAtom;
use XaiCorp\AbcParser\Domain\Atoms\UnsignedIntegerAtom;
use XaiCorp\AbcParser\Domain\Core\TuneBuilder;
use XaiCorp\AbcParser\Domain\Modules\Interpreter\Builder;
use XaiCorp\AbcParser\Domain\Modules\Interpreter\Context;
class NoteLength implements Lex
@@ -27,10 +26,10 @@ class NoteLength implements Lex
* @return mixed
* @throws \Enzyme\Axiom\Exceptions\AtomException
*/
public function handle(Context $context, \Closure $next)
public function handle(Context $context, Closure $next)
{
$line = $context->current();
list($key, $data) = $this->getKeyDataFromLine($line);
[$key, $data] = $this->getKeyDataFromLine($line);
if ($key === 'L') {
$this->builder->addNoteLength(new StringAtom($data));

7
src/Domain/Modules/Interpreter/Lexicon/Notes.php Normal file → Executable file
View File

@@ -1,10 +1,9 @@
<?php
namespace XaiCorp\AbcParser\Domain\Modules\Interpreter\Lexicon;
use Closure;
use Enzyme\Axiom\Atoms\StringAtom;
use XaiCorp\AbcParser\Domain\Atoms\UnsignedIntegerAtom;
use XaiCorp\AbcParser\Domain\Core\TuneBuilder;
use XaiCorp\AbcParser\Domain\Modules\Interpreter\Builder;
use XaiCorp\AbcParser\Domain\Modules\Interpreter\Context;
class Notes implements Lex
@@ -27,10 +26,10 @@ class Notes implements Lex
* @return mixed
* @throws \Enzyme\Axiom\Exceptions\AtomException
*/
public function handle(Context $context, \Closure $next)
public function handle(Context $context, Closure $next)
{
$line = $context->current();
list($key, $data) = $this->getKeyDataFromLine($line);
[$key, $data] = $this->getKeyDataFromLine($line);
if ($key === 'N') {
$this->builder->addNote(new StringAtom($data));

7
src/Domain/Modules/Interpreter/Lexicon/Origin.php Normal file → Executable file
View File

@@ -1,10 +1,9 @@
<?php
namespace XaiCorp\AbcParser\Domain\Modules\Interpreter\Lexicon;
use Closure;
use Enzyme\Axiom\Atoms\StringAtom;
use XaiCorp\AbcParser\Domain\Atoms\UnsignedIntegerAtom;
use XaiCorp\AbcParser\Domain\Core\TuneBuilder;
use XaiCorp\AbcParser\Domain\Modules\Interpreter\Builder;
use XaiCorp\AbcParser\Domain\Modules\Interpreter\Context;
class Origin implements Lex
@@ -27,10 +26,10 @@ class Origin implements Lex
* @return mixed
* @throws \Enzyme\Axiom\Exceptions\AtomException
*/
public function handle(Context $context, \Closure $next)
public function handle(Context $context, Closure $next)
{
$line = $context->current();
list($key, $data) = $this->getKeyDataFromLine($line);
[$key, $data] = $this->getKeyDataFromLine($line);
if ($key === 'O') {
$this->builder->addOrigin(new StringAtom($data));

7
src/Domain/Modules/Interpreter/Lexicon/Parts.php Normal file → Executable file
View File

@@ -1,10 +1,9 @@
<?php
namespace XaiCorp\AbcParser\Domain\Modules\Interpreter\Lexicon;
use Closure;
use Enzyme\Axiom\Atoms\StringAtom;
use XaiCorp\AbcParser\Domain\Atoms\UnsignedIntegerAtom;
use XaiCorp\AbcParser\Domain\Core\TuneBuilder;
use XaiCorp\AbcParser\Domain\Modules\Interpreter\Builder;
use XaiCorp\AbcParser\Domain\Modules\Interpreter\Context;
class Parts implements Lex
@@ -27,10 +26,10 @@ class Parts implements Lex
* @return mixed
* @throws \Enzyme\Axiom\Exceptions\AtomException
*/
public function handle(Context $context, \Closure $next)
public function handle(Context $context, Closure $next)
{
$line = $context->current();
list($key, $data) = $this->getKeyDataFromLine($line);
[$key, $data] = $this->getKeyDataFromLine($line);
if ($key === 'P'
&& $context->getState() === $context::MODE_TUNE_HEADER

7
src/Domain/Modules/Interpreter/Lexicon/Rhythm.php Normal file → Executable file
View File

@@ -1,10 +1,9 @@
<?php
namespace XaiCorp\AbcParser\Domain\Modules\Interpreter\Lexicon;
use Closure;
use Enzyme\Axiom\Atoms\StringAtom;
use XaiCorp\AbcParser\Domain\Atoms\UnsignedIntegerAtom;
use XaiCorp\AbcParser\Domain\Core\TuneBuilder;
use XaiCorp\AbcParser\Domain\Modules\Interpreter\Builder;
use XaiCorp\AbcParser\Domain\Modules\Interpreter\Context;
class Rhythm implements Lex
@@ -27,10 +26,10 @@ class Rhythm implements Lex
* @return mixed
* @throws \Enzyme\Axiom\Exceptions\AtomException
*/
public function handle(Context $context, \Closure $next)
public function handle(Context $context, Closure $next)
{
$line = $context->current();
list($key, $data) = $this->getKeyDataFromLine($line);
[$key, $data] = $this->getKeyDataFromLine($line);
if ($key === 'R'
&& $context->getState() === $context::MODE_TUNE_HEADER

7
src/Domain/Modules/Interpreter/Lexicon/Source.php Normal file → Executable file
View File

@@ -1,10 +1,9 @@
<?php
namespace XaiCorp\AbcParser\Domain\Modules\Interpreter\Lexicon;
use Closure;
use Enzyme\Axiom\Atoms\StringAtom;
use XaiCorp\AbcParser\Domain\Atoms\UnsignedIntegerAtom;
use XaiCorp\AbcParser\Domain\Core\TuneBuilder;
use XaiCorp\AbcParser\Domain\Modules\Interpreter\Builder;
use XaiCorp\AbcParser\Domain\Modules\Interpreter\Context;
class Source implements Lex
@@ -27,10 +26,10 @@ class Source implements Lex
* @return mixed
* @throws \Enzyme\Axiom\Exceptions\AtomException
*/
public function handle(Context $context, \Closure $next)
public function handle(Context $context, Closure $next)
{
$line = $context->current();
list($key, $data) = $this->getKeyDataFromLine($line);
[$key, $data] = $this->getKeyDataFromLine($line);
if ($key === 'S'
&& $context->getState() === $context::MODE_TUNE_HEADER

7
src/Domain/Modules/Interpreter/Lexicon/Tempo.php Normal file → Executable file
View File

@@ -1,10 +1,9 @@
<?php
namespace XaiCorp\AbcParser\Domain\Modules\Interpreter\Lexicon;
use Closure;
use Enzyme\Axiom\Atoms\StringAtom;
use XaiCorp\AbcParser\Domain\Atoms\UnsignedIntegerAtom;
use XaiCorp\AbcParser\Domain\Core\TuneBuilder;
use XaiCorp\AbcParser\Domain\Modules\Interpreter\Builder;
use XaiCorp\AbcParser\Domain\Modules\Interpreter\Context;
class Tempo implements Lex
@@ -27,10 +26,10 @@ class Tempo implements Lex
* @return mixed
* @throws \Enzyme\Axiom\Exceptions\AtomException
*/
public function handle(Context $context, \Closure $next)
public function handle(Context $context, Closure $next)
{
$line = $context->current();
list($key, $data) = $this->getKeyDataFromLine($line);
[$key, $data] = $this->getKeyDataFromLine($line);
if ($key === 'Q') {
$this->builder->addTempo(new StringAtom($data));

8
src/Domain/Modules/Interpreter/Lexicon/Title.php Normal file → Executable file
View File

@@ -1,10 +1,8 @@
<?php
namespace XaiCorp\AbcParser\Domain\Modules\Interpreter\Lexicon;
use Enzyme\Axiom\Atoms\StringAtom;
use XaiCorp\AbcParser\Domain\Atoms\UnsignedIntegerAtom;
use Closure;
use XaiCorp\AbcParser\Domain\Core\TuneBuilder;
use XaiCorp\AbcParser\Domain\Modules\Interpreter\Builder;
use XaiCorp\AbcParser\Domain\Modules\Interpreter\Context;
class Title implements Lex
@@ -27,10 +25,10 @@ class Title implements Lex
* @return mixed
* @throws \Enzyme\Axiom\Exceptions\AtomException
*/
public function handle(Context $context, \Closure $next)
public function handle(Context $context, Closure $next)
{
$line = $context->current();
list($key, $data) = $this->getKeyDataFromLine($line);
[$key, $data] = $this->getKeyDataFromLine($line);
if ($key === 'T') {
$this->builder->addTitle($data);

7
src/Domain/Modules/Interpreter/Lexicon/Transcriber.php Normal file → Executable file
View File

@@ -1,10 +1,9 @@
<?php
namespace XaiCorp\AbcParser\Domain\Modules\Interpreter\Lexicon;
use Closure;
use Enzyme\Axiom\Atoms\StringAtom;
use XaiCorp\AbcParser\Domain\Atoms\UnsignedIntegerAtom;
use XaiCorp\AbcParser\Domain\Core\TuneBuilder;
use XaiCorp\AbcParser\Domain\Modules\Interpreter\Builder;
use XaiCorp\AbcParser\Domain\Modules\Interpreter\Context;
class Transcriber implements Lex
@@ -27,10 +26,10 @@ class Transcriber implements Lex
* @return mixed
* @throws \Enzyme\Axiom\Exceptions\AtomException
*/
public function handle(Context $context, \Closure $next)
public function handle(Context $context, Closure $next)
{
$line = $context->current();
list($key, $data) = $this->getKeyDataFromLine($line);
[$key, $data] = $this->getKeyDataFromLine($line);
if ($key === 'Z') {
$this->builder->addTranscriber(new StringAtom($data));

7
src/Domain/Modules/Interpreter/Lexicon/Words.php Normal file → Executable file
View File

@@ -1,10 +1,9 @@
<?php
namespace XaiCorp\AbcParser\Domain\Modules\Interpreter\Lexicon;
use Closure;
use Enzyme\Axiom\Atoms\StringAtom;
use XaiCorp\AbcParser\Domain\Atoms\UnsignedIntegerAtom;
use XaiCorp\AbcParser\Domain\Core\TuneBuilder;
use XaiCorp\AbcParser\Domain\Modules\Interpreter\Builder;
use XaiCorp\AbcParser\Domain\Modules\Interpreter\Context;
class Words implements Lex
@@ -27,10 +26,10 @@ class Words implements Lex
* @return mixed
* @throws \Enzyme\Axiom\Exceptions\AtomException
*/
public function handle(Context $context, \Closure $next)
public function handle(Context $context, Closure $next)
{
$line = $context->current();
list($key, $data) = $this->getKeyDataFromLine($line);
[$key, $data] = $this->getKeyDataFromLine($line);
if ($key === 'W') {
$this->builder->addWords(new StringAtom($data));