for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* SchemaTypeHandler class file
*/
namespace Graviton\SchemaBundle\Serializer\Handler;
use Graviton\SchemaBundle\Document\SchemaType;
use JMS\Serializer\Context;
use JMS\Serializer\JsonSerializationVisitor;
* @author List of contributors <https://github.com/libgraviton/graviton/graphs/contributors>
* @license http://opensource.org/licenses/GPL GPL
* @link http://swisscom.ch
class SchemaTypeHandler
{
* Serialize SchemaType to JSON
*
* @param JsonSerializationVisitor $visitor Visitor
* @param SchemaType $schemaType type
* @param array $type Type
* @param Context $context Context
* @return array
public function serializeSchemaTypeToJson(
JsonSerializationVisitor $visitor,
$visitor
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.
SchemaType $schemaType,
array $type,
$type
Context $context
$context
) {
$types = $schemaType->getTypes();
if (count($types) === 1) {
return array_pop($types);
}
return $types;
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.