Skip to content

Commit

Permalink
Enable RequireOneLinePropertyDocComment sniff
Browse files Browse the repository at this point in the history
  • Loading branch information
simPod committed Jan 11, 2021
1 parent 5158b45 commit a97b618
Show file tree
Hide file tree
Showing 154 changed files with 352 additions and 1,058 deletions.
2 changes: 0 additions & 2 deletions phpcs.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@
<exclude name="SlevomatCodingStandard.ControlStructures.AssignmentInCondition.AssignmentInCondition"/>
<exclude name="SlevomatCodingStandard.ControlStructures.EarlyExit"/>

<exclude name="SlevomatCodingStandard.Commenting.RequireOneLinePropertyDocComment"/>

<exclude name="SlevomatCodingStandard.TypeHints.ParameterTypeHint"/>
<exclude name="SlevomatCodingStandard.TypeHints.PropertyTypeHint"/>
<exclude name="SlevomatCodingStandard.TypeHints.ReturnTypeHint"/>
Expand Down
4 changes: 1 addition & 3 deletions src/AbstractVisitor.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@
*/
abstract class AbstractVisitor implements VisitorInterface
{
/**
* @var GraphNavigatorInterface
*/
/** @var GraphNavigatorInterface */
protected $navigator;

public function setNavigator(GraphNavigatorInterface $navigator): void
Expand Down
16 changes: 4 additions & 12 deletions src/Accessor/DefaultAccessorStrategy.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,24 +20,16 @@
*/
final class DefaultAccessorStrategy implements AccessorStrategyInterface
{
/**
* @var callable[]
*/
/** @var callable[] */
private $readAccessors = [];

/**
* @var callable[]
*/
/** @var callable[] */
private $writeAccessors = [];

/**
* @var \ReflectionProperty[]
*/
/** @var \ReflectionProperty[] */
private $propertyReflectionCache = [];

/**
* @var ExpressionEvaluatorInterface
*/
/** @var ExpressionEvaluatorInterface */
private $evaluator;

public function __construct(?ExpressionEvaluatorInterface $evaluator = null)
Expand Down
8 changes: 2 additions & 6 deletions src/Annotation/Accessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,9 @@
*/
final class Accessor
{
/**
* @var string
*/
/** @var string */
public $getter;

/**
* @var string
*/
/** @var string */
public $setter;
}
4 changes: 1 addition & 3 deletions src/Annotation/AccessorOrder.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ final class AccessorOrder
*/
public $order;

/**
* @var array<string>
*/
/** @var array<string> */
public $custom = [];
}
4 changes: 1 addition & 3 deletions src/Annotation/Exclude.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
*/
final class Exclude
{
/**
* @var string
*/
/** @var string */
public $if;
}
4 changes: 1 addition & 3 deletions src/Annotation/ExclusionPolicy.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@ final class ExclusionPolicy
public const NONE = 'NONE';
public const ALL = 'ALL';

/**
* @var string
*/
/** @var string */
public $policy;

public function __construct(array $values)
Expand Down
4 changes: 1 addition & 3 deletions src/Annotation/Expose.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
*/
final class Expose
{
/**
* @var string
*/
/** @var string */
public $if;
}
4 changes: 1 addition & 3 deletions src/Annotation/ReadOnly.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
*/
final class ReadOnly
{
/**
* @var bool
*/
/** @var bool */
public $readOnly = true;
}
4 changes: 1 addition & 3 deletions src/Annotation/SerializedName.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@
*/
final class SerializedName
{
/**
* @var string
*/
/** @var string */
public $name;

public function __construct(array $values)
Expand Down
12 changes: 3 additions & 9 deletions src/Annotation/VirtualProperty.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,13 @@
*/
final class VirtualProperty
{
/**
* @var string
*/
/** @var string */
public $exp;

/**
* @var string
*/
/** @var string */
public $name;

/**
* @var array
*/
/** @var array */
public $options = [];

public function __construct(array $data)
Expand Down
4 changes: 1 addition & 3 deletions src/Annotation/XmlAttribute.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
*/
final class XmlAttribute
{
/**
* @var string
*/
/** @var string */
public $namespace;
}
16 changes: 4 additions & 12 deletions src/Annotation/XmlCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,15 @@

abstract class XmlCollection
{
/**
* @var string
*/
/** @var string */
public $entry = 'entry';

/**
* @var bool
*/
/** @var bool */
public $inline = false;

/**
* @var string
*/
/** @var string */
public $namespace;

/**
* @var bool
*/
/** @var bool */
public $skipWhenEmpty = true;
}
12 changes: 3 additions & 9 deletions src/Annotation/XmlDiscriminator.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,12 @@
*/
class XmlDiscriminator
{
/**
* @var bool
*/
/** @var bool */
public $attribute = false;

/**
* @var bool
*/
/** @var bool */
public $cdata = true;

/**
* @var string
*/
/** @var string */
public $namespace;
}
8 changes: 2 additions & 6 deletions src/Annotation/XmlElement.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,9 @@
*/
final class XmlElement
{
/**
* @var bool
*/
/** @var bool */
public $cdata = true;

/**
* @var string
*/
/** @var string */
public $namespace;
}
4 changes: 1 addition & 3 deletions src/Annotation/XmlMap.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
*/
final class XmlMap extends XmlCollection
{
/**
* @var string
*/
/** @var string */
public $keyAttribute = '_key';
}
4 changes: 1 addition & 3 deletions src/Annotation/XmlNamespace.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ final class XmlNamespace
*/
public $uri;

/**
* @var string
*/
/** @var string */
public $prefix = '';
}
8 changes: 2 additions & 6 deletions src/Annotation/XmlRoot.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,9 @@ final class XmlRoot
*/
public $name;

/**
* @var string
*/
/** @var string */
public $namespace;

/**
* @var string
*/
/** @var string */
public $prefix;
}
4 changes: 1 addition & 3 deletions src/Annotation/XmlValue.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
*/
final class XmlValue
{
/**
* @var bool
*/
/** @var bool */
public $cdata = true;
}
4 changes: 1 addition & 3 deletions src/Builder/CallbackDriverFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@

final class CallbackDriverFactory implements DriverFactoryInterface
{
/**
* @var callable
*/
/** @var callable */
private $callback;

public function __construct(callable $callable)
Expand Down
12 changes: 3 additions & 9 deletions src/Builder/DefaultDriverFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,13 @@

final class DefaultDriverFactory implements DriverFactoryInterface
{
/**
* @var ParserInterface
*/
/** @var ParserInterface */
private $typeParser;

/**
* @var PropertyNamingStrategyInterface
*/
/** @var PropertyNamingStrategyInterface */
private $propertyNamingStrategy;

/**
* @var CompilableExpressionEvaluatorInterface
*/
/** @var CompilableExpressionEvaluatorInterface */
private $expressionEvaluator;

public function __construct(PropertyNamingStrategyInterface $propertyNamingStrategy, ?ParserInterface $typeParser = null, ?CompilableExpressionEvaluatorInterface $expressionEvaluator = null)
Expand Down
16 changes: 4 additions & 12 deletions src/Construction/DoctrineObjectConstructor.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,24 +21,16 @@ final class DoctrineObjectConstructor implements ObjectConstructorInterface
public const ON_MISSING_NULL = 'null';
public const ON_MISSING_EXCEPTION = 'exception';
public const ON_MISSING_FALLBACK = 'fallback';
/**
* @var string
*/
/** @var string */
private $fallbackStrategy;

/**
* @var ManagerRegistry
*/
/** @var ManagerRegistry */
private $managerRegistry;

/**
* @var ObjectConstructorInterface
*/
/** @var ObjectConstructorInterface */
private $fallbackConstructor;

/**
* @var ExpressionLanguageExclusionStrategy|null
*/
/** @var ExpressionLanguageExclusionStrategy|null */
private $expressionLanguageExclusionStrategy;

/**
Expand Down
24 changes: 6 additions & 18 deletions src/Context.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,37 +18,25 @@

abstract class Context
{
/**
* @var array
*/
/** @var array */
private $attributes = [];

/**
* @var string
*/
/** @var string */
private $format;

/**
* @var VisitorInterface
*/
/** @var VisitorInterface */
private $visitor;

/**
* @var GraphNavigatorInterface
*/
/** @var GraphNavigatorInterface */
private $navigator;

/**
* @var MetadataFactory
*/
/** @var MetadataFactory */
private $metadataFactory;

/** @var DisjunctExclusionStrategy */
private $exclusionStrategy;

/**
* @var bool
*/
/** @var bool */
private $initialized = false;

/** @var \SplStack */
Expand Down
4 changes: 1 addition & 3 deletions src/ContextFactory/CallableContextFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@
*/
abstract class CallableContextFactory
{
/**
* @var callable
*/
/** @var callable */
private $callable;

public function __construct(callable $callable)
Expand Down
Loading

0 comments on commit a97b618

Please sign in to comment.