Skip to content

Commit

Permalink
Merge pull request #10 from tecnospeed/hotfix/change-package-name
Browse files Browse the repository at this point in the history
change hydrator package name
  • Loading branch information
ferfabricio authored Apr 8, 2019
2 parents 26cac94 + 92093fc commit f23ee54
Show file tree
Hide file tree
Showing 7 changed files with 66 additions and 62 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"require": {
"php": "^7.0",
"respect/validation": "^1.1",
"ferfabricio/hydratator": "^1.0",
"ferfabricio/hydrator": "^2.0",
"guzzlehttp/guzzle": "~6.0"
},
"require-dev": {
Expand Down
104 changes: 54 additions & 50 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions src/Abstracts/BuilderAbstract.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

namespace TecnoSpeed\Plugnotas\Abstracts;

use FerFabricio\Hydratator\Extract;
use FerFabricio\Hydratator\Hydratate;
use FerFabricio\Hydrator\Extract;
use FerFabricio\Hydrator\Hydrate;
use TecnoSpeed\Plugnotas\Error\InvalidTypeError;
use TecnoSpeed\Plugnotas\Interfaces\IBuilder;

Expand All @@ -17,7 +17,7 @@ public function toArray($excludeNull = true)
public static function fromArray($data)
{
if (is_array($data)) {
return Hydratate::toObject(\get_called_class(), $data);
return Hydrate::toObject(\get_called_class(), $data);
}

if (is_object($data) && get_class($data) === \get_called_class()) {
Expand Down
4 changes: 2 additions & 2 deletions src/Nfse.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
namespace TecnoSpeed\Plugnotas;

use FerFabricio\Hydratator\Hydratate;
use FerFabricio\Hydrator\Hydrate;
use Respect\Validation\Validator as v;
use TecnoSpeed\Plugnotas\Abstracts\BuilderAbstract;
use TecnoSpeed\Plugnotas\Communication\CallApi;
Expand Down Expand Up @@ -211,7 +211,7 @@ public static function fromArray($data)
$data['impressao'] = Impressao::fromArray($data['impressao']);
}

return Hydratate::toObject(Nfse::class, $data);
return Hydrate::toObject(Nfse::class, $data);
}

public function find($id)
Expand Down
4 changes: 2 additions & 2 deletions src/Nfse/Prestador.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace TecnoSpeed\Plugnotas\Nfse;

use FerFabricio\Hydratator\Hydratate;
use FerFabricio\Hydrator\Hydrate;
use Respect\Validation\Validator as v;
use TecnoSpeed\Plugnotas\Abstracts\BuilderAbstract;
use TecnoSpeed\Plugnotas\Common\Endereco;
Expand Down Expand Up @@ -229,7 +229,7 @@ public static function fromArray($data)
$data['endereco'] = Endereco::fromArray($data['endereco']);
}

return Hydratate::toObject(self::class, $data);
return Hydrate::toObject(self::class, $data);
}

public function validate()
Expand Down
4 changes: 2 additions & 2 deletions src/Nfse/Servico.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace TecnoSpeed\Plugnotas\Nfse;

use FerFabricio\Hydratator\Hydratate;
use FerFabricio\Hydrator\Hydrate;
use Respect\Validation\Validator as v;
use TecnoSpeed\Plugnotas\Abstracts\BuilderAbstract;
use TecnoSpeed\Plugnotas\Configuration;
Expand Down Expand Up @@ -246,6 +246,6 @@ public static function fromArray($data)
$data['valor'] = Valor::fromArray($data['valor']);
}

return Hydratate::toObject(Servico::class, $data);
return Hydrate::toObject(Servico::class, $data);
}
}
4 changes: 2 additions & 2 deletions src/Nfse/Tomador.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace TecnoSpeed\Plugnotas\Nfse;

use FerFabricio\Hydratator\Hydratate;
use FerFabricio\Hydrator\Hydrate;
use Respect\Validation\Validator as v;
use TecnoSpeed\Plugnotas\Configuration;
use TecnoSpeed\Plugnotas\Communication\CallApi;
Expand Down Expand Up @@ -168,6 +168,6 @@ public static function fromArray($data)
$data['endereco'] = Endereco::fromArray($data['endereco']);
}

return Hydratate::toObject(self::class, $data);
return Hydrate::toObject(self::class, $data);
}
}

0 comments on commit f23ee54

Please sign in to comment.