Skip to content

Commit

Permalink
REFACTOR remove/add throws and comments
Browse files Browse the repository at this point in the history
  • Loading branch information
necipallef committed May 28, 2018
1 parent e88ae28 commit d775467
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/Normalizer/ArrayType.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ public function isArray()

public function setIsArray($is_array)
{
/** @noinspection PhpUnhandledExceptionInspection */
throw new Exception('setIsArray method cannot be called on ' . ArrayType::class);
}
}
5 changes: 4 additions & 1 deletion src/Normalizer/Normalizer.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
<?php

/** @noinspection PhpUnhandledExceptionInspection */

/** @noinspection PhpDocMissingThrowsInspection */

namespace Fabstract\Component\Serializer\Normalizer;

use Fabstract\Component\Serializer\Assert;
Expand Down Expand Up @@ -35,7 +39,6 @@ public function normalize($value)
* @param NormalizableInterface|\JsonSerializable $value
* @param int $depth
* @return array
* @throws Exception
*/
private function normalizeInternal($value, $depth)
{
Expand Down
2 changes: 2 additions & 0 deletions src/Serializer.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
namespace Fabstract\Component\Serializer;


use Fabstract\Component\Serializer\Exception\ParseException;
use Fabstract\Component\Serializer\Normalizer\Type;

abstract class Serializer implements SerializerInterface
Expand All @@ -23,6 +24,7 @@ public function serialize($data)
* @param string $data
* @param Type $type
* @return mixed
* @throws ParseException
*/
public function deserialize($data, $type)
{
Expand Down
2 changes: 2 additions & 0 deletions src/SerializerBase.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace Fabstract\Component\Serializer;

use Fabstract\Component\Serializer\Exception\ParseException;
use Fabstract\Component\Serializer\Normalizer\Type;

abstract class SerializerBase implements SerializerInterface
Expand All @@ -22,6 +23,7 @@ public function serialize($data)
* @param string $data
* @param Type $type
* @return mixed
* @throws ParseException
*/
public function deserialize($data, $type)
{
Expand Down

0 comments on commit d775467

Please sign in to comment.