update webpatser/laravel-uuid to version 3
Some checks failed
abc-api/abcParser/pipeline/head There was a failure building this commit
Some checks failed
abc-api/abcParser/pipeline/head There was a failure building this commit
This commit is contained in:
0
src/Application/Boundary/PersonMapper.php
Normal file → Executable file
0
src/Application/Boundary/PersonMapper.php
Normal file → Executable file
0
src/Application/PersonFactory.php
Normal file → Executable file
0
src/Application/PersonFactory.php
Normal file → Executable file
0
src/Application/PersonRepository.php
Normal file → Executable file
0
src/Application/PersonRepository.php
Normal file → Executable file
0
src/Application/UseCases/ExtractTuneFromCollection.php
Normal file → Executable file
0
src/Application/UseCases/ExtractTuneFromCollection.php
Normal file → Executable file
0
src/Application/UseCases/ImportAbcFile.php
Normal file → Executable file
0
src/Application/UseCases/ImportAbcFile.php
Normal file → Executable file
3
src/Domain/Atoms/EmailAtom.php
Normal file → Executable file
3
src/Domain/Atoms/EmailAtom.php
Normal file → Executable file
@@ -2,6 +2,7 @@
|
||||
namespace XaiCorp\AbcParser\Domain\Atoms;
|
||||
|
||||
use Enzyme\Axiom\Atoms\AtomInterface;
|
||||
use Exception;
|
||||
|
||||
class EmailAtom implements AtomInterface
|
||||
{
|
||||
@@ -26,7 +27,7 @@ class EmailAtom implements AtomInterface
|
||||
private function validateEmail($value)
|
||||
{
|
||||
if (!$this->isValid($value)) {
|
||||
throw new \Exception('Not a valid email');
|
||||
throw new Exception('Not a valid email');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
0
src/Domain/Atoms/UnsignedIntegerAtom.php
Normal file → Executable file
0
src/Domain/Atoms/UnsignedIntegerAtom.php
Normal file → Executable file
0
src/Domain/Boundary/PersonFactory.php
Normal file → Executable file
0
src/Domain/Boundary/PersonFactory.php
Normal file → Executable file
0
src/Domain/Boundary/PersonRepository.php
Normal file → Executable file
0
src/Domain/Boundary/PersonRepository.php
Normal file → Executable file
0
src/Domain/Core/AttributeTrait.php
Normal file → Executable file
0
src/Domain/Core/AttributeTrait.php
Normal file → Executable file
0
src/Domain/Core/Author.php
Normal file → Executable file
0
src/Domain/Core/Author.php
Normal file → Executable file
0
src/Domain/Core/Collection.php
Normal file → Executable file
0
src/Domain/Core/Collection.php
Normal file → Executable file
0
src/Domain/Core/Composer.php
Normal file → Executable file
0
src/Domain/Core/Composer.php
Normal file → Executable file
0
src/Domain/Core/EntityInterface.php
Normal file → Executable file
0
src/Domain/Core/EntityInterface.php
Normal file → Executable file
0
src/Domain/Core/IdentityTrait.php
Normal file → Executable file
0
src/Domain/Core/IdentityTrait.php
Normal file → Executable file
0
src/Domain/Core/MultivalueAttribute.php
Normal file → Executable file
0
src/Domain/Core/MultivalueAttribute.php
Normal file → Executable file
3
src/Domain/Core/Person.php
Normal file → Executable file
3
src/Domain/Core/Person.php
Normal file → Executable file
@@ -2,6 +2,7 @@
|
||||
namespace XaiCorp\AbcParser\Domain\Core;
|
||||
|
||||
use Enzyme\Axiom\Atoms\StringAtom;
|
||||
use Exception;
|
||||
use Webpatser\Uuid\Uuid;
|
||||
use XaiCorp\AbcParser\Domain\Atoms\EmailAtom;
|
||||
|
||||
@@ -69,7 +70,7 @@ class Person implements EntityInterface
|
||||
public function get($attribute)
|
||||
{
|
||||
if (!$this->has($attribute)) {
|
||||
throw new \Exception('Cannot access attribute on person');
|
||||
throw new Exception('Cannot access attribute on person');
|
||||
}
|
||||
|
||||
return $this->{$attribute};
|
||||
|
||||
2
src/Domain/Core/Setting.php
Normal file → Executable file
2
src/Domain/Core/Setting.php
Normal file → Executable file
@@ -2,8 +2,6 @@
|
||||
namespace XaiCorp\AbcParser\Domain\Core;
|
||||
|
||||
|
||||
use Enzyme\Axiom\Atoms\StringAtom;
|
||||
|
||||
class Setting
|
||||
{
|
||||
use IdentityTrait;
|
||||
|
||||
0
src/Domain/Core/Transcriber.php
Normal file → Executable file
0
src/Domain/Core/Transcriber.php
Normal file → Executable file
1
src/Domain/Core/Tune.php
Normal file → Executable file
1
src/Domain/Core/Tune.php
Normal file → Executable file
@@ -1,7 +1,6 @@
|
||||
<?php
|
||||
namespace XaiCorp\AbcParser\Domain\Core;
|
||||
|
||||
use Enzyme\Axiom\Atoms\IntegerAtom;
|
||||
use Enzyme\Axiom\Atoms\StringAtom;
|
||||
use Webpatser\Uuid\Uuid;
|
||||
use XaiCorp\AbcParser\Domain\Atoms\UnsignedIntegerAtom;
|
||||
|
||||
0
src/Domain/Core/TuneAttributeArrayBuilder.php
Normal file → Executable file
0
src/Domain/Core/TuneAttributeArrayBuilder.php
Normal file → Executable file
0
src/Domain/Core/TuneBuilder.php
Normal file → Executable file
0
src/Domain/Core/TuneBuilder.php
Normal file → Executable file
0
src/Domain/Core/TuneCollection.php
Normal file → Executable file
0
src/Domain/Core/TuneCollection.php
Normal file → Executable file
1
src/Domain/Modules/Interpreter/Builder.php
Normal file → Executable file
1
src/Domain/Modules/Interpreter/Builder.php
Normal file → Executable 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
0
src/Domain/Modules/Interpreter/Context.php
Normal file → Executable file
2
src/Domain/Modules/Interpreter/DefaultInterpreter.php
Normal file → Executable file
2
src/Domain/Modules/Interpreter/DefaultInterpreter.php
Normal file → Executable 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
1
src/Domain/Modules/Interpreter/Interpreter.php
Normal file → Executable 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
0
src/Domain/Modules/Interpreter/InterpreterPipeline.php
Normal file → Executable file
8
src/Domain/Modules/Interpreter/Lexicon/Author.php
Normal file → Executable file
8
src/Domain/Modules/Interpreter/Lexicon/Author.php
Normal file → Executable 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
7
src/Domain/Modules/Interpreter/Lexicon/Book.php
Normal file → Executable 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
8
src/Domain/Modules/Interpreter/Lexicon/Composer.php
Normal file → Executable 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
7
src/Domain/Modules/Interpreter/Lexicon/Discography.php
Normal file → Executable 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
6
src/Domain/Modules/Interpreter/Lexicon/EndOfTune.php
Normal file → Executable 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
7
src/Domain/Modules/Interpreter/Lexicon/Filename.php
Normal file → Executable 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
7
src/Domain/Modules/Interpreter/Lexicon/Group.php
Normal file → Executable 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
12
src/Domain/Modules/Interpreter/Lexicon/History.php
Normal file → Executable 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
7
src/Domain/Modules/Interpreter/Lexicon/Index.php
Normal file → Executable 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();
|
||||
|
||||
7
src/Domain/Modules/Interpreter/Lexicon/KeySignature.php
Normal file → Executable file
7
src/Domain/Modules/Interpreter/Lexicon/KeySignature.php
Normal file → Executable 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
0
src/Domain/Modules/Interpreter/Lexicon/Lex.php
Normal file → Executable file
0
src/Domain/Modules/Interpreter/Lexicon/LineKeyDataTrait.php
Normal file → Executable file
0
src/Domain/Modules/Interpreter/Lexicon/LineKeyDataTrait.php
Normal file → Executable file
7
src/Domain/Modules/Interpreter/Lexicon/Meter.php
Normal file → Executable file
7
src/Domain/Modules/Interpreter/Lexicon/Meter.php
Normal file → Executable 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
8
src/Domain/Modules/Interpreter/Lexicon/MusicLine.php
Normal file → Executable 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
7
src/Domain/Modules/Interpreter/Lexicon/NoteLength.php
Normal file → Executable 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
7
src/Domain/Modules/Interpreter/Lexicon/Notes.php
Normal file → Executable 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
7
src/Domain/Modules/Interpreter/Lexicon/Origin.php
Normal file → Executable 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
7
src/Domain/Modules/Interpreter/Lexicon/Parts.php
Normal file → Executable 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
7
src/Domain/Modules/Interpreter/Lexicon/Rhythm.php
Normal file → Executable 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
7
src/Domain/Modules/Interpreter/Lexicon/Source.php
Normal file → Executable 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
7
src/Domain/Modules/Interpreter/Lexicon/Tempo.php
Normal file → Executable 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
8
src/Domain/Modules/Interpreter/Lexicon/Title.php
Normal file → Executable 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
7
src/Domain/Modules/Interpreter/Lexicon/Transcriber.php
Normal file → Executable 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
7
src/Domain/Modules/Interpreter/Lexicon/Words.php
Normal file → Executable 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));
|
||||
|
||||
0
src/Interfaces/Builder.php
Normal file → Executable file
0
src/Interfaces/Builder.php
Normal file → Executable file
0
src/Interfaces/Exporter.php
Normal file → Executable file
0
src/Interfaces/Exporter.php
Normal file → Executable file
0
src/Interfaces/Manipulator.php
Normal file → Executable file
0
src/Interfaces/Manipulator.php
Normal file → Executable file
2
src/Traits/ValidationTrait.php
Normal file → Executable file
2
src/Traits/ValidationTrait.php
Normal file → Executable file
@@ -1,8 +1,8 @@
|
||||
<?php
|
||||
namespace XaiCorp\AbcParser\Traits;
|
||||
|
||||
use Illuminate\Support\MessageBag;
|
||||
use Illuminate\Support\Facades\Validator;
|
||||
use Illuminate\Support\MessageBag;
|
||||
|
||||
Trait ValidationTrait
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user