瀏覽代碼

Scrutinizer Auto-Fixes [skip Scrutinizer]

This patch was automatically generated as part of the following inspection:
https://scrutinizer-ci.com/g/schmittjoh/serializer/inspections/0cda3d1a-f829-4c4a-8456-0b41e6fda549

Enabled analysis tools:
 - PHP Analyzer
 - PHP Mess Detector
 - PHP Copy/Paste Detector
 - PHP PDepend
Scrutinizer Auto-Fixer 11 年之前
父節點
當前提交
af41b3bd7f

+ 7 - 0
src/JMS/Serializer/Context.php

@@ -193,6 +193,9 @@ abstract class Context
         return $this->serializeNull;
     }
 
+    /**
+     * @return string
+     */
     public function getFormat()
     {
         return $this->format;
@@ -232,5 +235,9 @@ abstract class Context
     }
 
     abstract public function getDepth();
+
+    /**
+     * @return integer
+     */
     abstract public function getDirection();
 }

+ 0 - 2
src/JMS/Serializer/Exclusion/DisjunctExclusionStrategy.php

@@ -57,7 +57,6 @@ class DisjunctExclusionStrategy implements ExclusionStrategyInterface
      * Whether the class should be skipped.
      *
      * @param ClassMetadata $metadata
-     * @param Context $navigatorContext
      *
      * @return boolean
      */
@@ -77,7 +76,6 @@ class DisjunctExclusionStrategy implements ExclusionStrategyInterface
      * Whether the property should be skipped.
      *
      * @param PropertyMetadata $property
-     * @param Context $navigatorContext
      *
      * @return boolean
      */

+ 0 - 2
src/JMS/Serializer/Exclusion/ExclusionStrategyInterface.php

@@ -33,7 +33,6 @@ interface ExclusionStrategyInterface
      * Whether the class should be skipped.
      *
      * @param ClassMetadata $metadata
-     * @param Context $navigatorContext
      *
      * @return boolean
      */
@@ -43,7 +42,6 @@ interface ExclusionStrategyInterface
      * Whether the property should be skipped.
      *
      * @param PropertyMetadata $property
-     * @param Context $navigatorContext
      *
      * @return boolean
      */

+ 0 - 1
src/JMS/Serializer/GraphNavigator.php

@@ -81,7 +81,6 @@ final class GraphNavigator
      *
      * @param mixed $data the data depends on the direction, and type of visitor
      * @param null|array $type array has the format ["name" => string, "params" => array]
-     * @param VisitorInterface $visitor
      *
      * @return mixed the return value depends on the direction, and type of visitor
      */

+ 4 - 1
src/JMS/Serializer/Metadata/Driver/AbstractDoctrineTypeDriver.php

@@ -134,7 +134,7 @@ abstract class AbstractDoctrineTypeDriver implements DriverInterface
     /**
      * @param string $className
      *
-     * @return ClassMetadata|null
+     * @return null|DoctrineClassMetadata
      */
     protected function tryLoadingDoctrineMetadata($className)
     {
@@ -149,6 +149,9 @@ abstract class AbstractDoctrineTypeDriver implements DriverInterface
         return $manager->getClassMetadata($className);
     }
 
+    /**
+     * @param string $type
+     */
     protected function normalizeFieldType($type)
     {
         if (!isset($this->fieldMapping[$type])) {

+ 0 - 1
src/JMS/Serializer/Metadata/Driver/AnnotationDriver.php

@@ -35,7 +35,6 @@ use JMS\Serializer\Annotation\PostSerialize;
 use JMS\Serializer\Annotation\PostDeserialize;
 use JMS\Serializer\Annotation\PreSerialize;
 use JMS\Serializer\Annotation\VirtualProperty;
-use JMS\Serializer\Metadata\XmlElementMetadata;
 use Metadata\MethodMetadata;
 use Doctrine\Common\Annotations\Reader;
 use JMS\Serializer\Annotation\Type;

+ 0 - 1
src/JMS/Serializer/Metadata/Driver/DoctrinePHPCRTypeDriver.php

@@ -18,7 +18,6 @@
 
 namespace JMS\Serializer\Metadata\Driver;
 
-use Doctrine\Common\Persistence\ManagerRegistry;
 use Doctrine\Common\Persistence\Mapping\ClassMetadata as DoctrineClassMetadata;
 use JMS\Serializer\Metadata\PropertyMetadata;
 

+ 0 - 1
src/JMS/Serializer/Metadata/Driver/DoctrineTypeDriver.php

@@ -18,7 +18,6 @@
 
 namespace JMS\Serializer\Metadata\Driver;
 
-use Doctrine\Common\Persistence\ManagerRegistry;
 use JMS\Serializer\Metadata\ClassMetadata;
 use Doctrine\Common\Persistence\Mapping\ClassMetadata as DoctrineClassMetadata;
 use JMS\Serializer\Metadata\PropertyMetadata;

+ 3 - 0
src/JMS/Serializer/SerializationContext.php

@@ -35,6 +35,9 @@ class SerializationContext extends Context
         return new self();
     }
 
+    /**
+     * @param string $format
+     */
     public function initialize($format, VisitorInterface $visitor, GraphNavigator $navigator, MetadataFactoryInterface $factory)
     {
         parent::initialize($format, $visitor, $navigator, $factory);