Fixed code style.

This commit is contained in:
Jan Böhmer 2020-08-21 21:36:22 +02:00
parent 2853e471c4
commit d0b1024d80
212 changed files with 495 additions and 1005 deletions

View file

@ -20,7 +20,6 @@
namespace App\Helpers;
use Brick\Math\BigDecimal;
use Doctrine\DBAL\Platforms\AbstractPlatform;
use Doctrine\DBAL\Types\Type;
@ -35,13 +34,13 @@ class BigDecimalType extends Type
}
/**
* @param string $value
* @param AbstractPlatform $platform
* @param string $value
*
* @return BigDecimal|\Brick\Math\BigNumber|mixed
*/
public function convertToPHPValue($value, AbstractPlatform $platform)
{
if ($value === null) {
if (null === $value) {
return null;
}
@ -49,13 +48,11 @@ class BigDecimalType extends Type
}
/**
* @param BigDecimal $value
* @param AbstractPlatform $platform
* @return mixed
* @param BigDecimal $value
*/
public function convertToDatabaseValue($value, AbstractPlatform $platform)
{
if ($value === null) {
if (null === $value) {
return null;
}
@ -71,4 +68,4 @@ class BigDecimalType extends Type
{
return true;
}
}
}

View file

@ -90,7 +90,7 @@ class LabelResponse extends Response
*/
public function setContentDisposition($disposition, $filename, $filenameFallback = '')
{
if ('' === $filenameFallback && (! preg_match('/^[\x20-\x7e]*$/', $filename) || false !== strpos($filename, '%'))) {
if ('' === $filenameFallback && (!preg_match('/^[\x20-\x7e]*$/', $filename) || false !== strpos($filename, '%'))) {
$encoding = mb_detect_encoding($filename, null, true) ?: '8bit';
for ($i = 0, $filenameLength = mb_strlen($filename, $encoding); $i < $filenameLength; ++$i) {

View file

@ -59,7 +59,7 @@ final class StructuralDBElementIterator extends ArrayIterator implements Recursi
/** @var AbstractStructuralDBElement $element */
$element = $this->current();
return ! empty($element->getSubelements());
return !empty($element->getSubelements());
}
public function getChildren()

View file

@ -81,8 +81,6 @@ final class TreeViewNode implements JsonSerializable
/**
* Return the ID of the entity associated with this node.
* Null if this node is not connected with an entity.
*
* @return int|null
*/
public function getId(): ?int
{
@ -104,8 +102,6 @@ final class TreeViewNode implements JsonSerializable
/**
* Returns the node text.
*
* @return string
*/
public function getText(): string
{
@ -115,7 +111,7 @@ final class TreeViewNode implements JsonSerializable
/**
* Sets the node text.
*
* @param string $text The new node text.
* @param string $text the new node text
*
* @return TreeViewNode
*/
@ -128,8 +124,6 @@ final class TreeViewNode implements JsonSerializable
/**
* Returns the href link.
*
* @return string|null
*/
public function getHref(): ?string
{
@ -139,7 +133,7 @@ final class TreeViewNode implements JsonSerializable
/**
* Sets the href link.
*
* @param string|null $href The new href link.
* @param string|null $href the new href link
*
* @return TreeViewNode
*/

View file

@ -60,7 +60,7 @@ final class TreeViewNodeIterator extends ArrayIterator implements RecursiveItera
/** @var TreeViewNode $element */
$element = $this->current();
return ! empty($element->getNodes());
return !empty($element->getNodes());
}
public function getChildren()

View file

@ -61,9 +61,6 @@ final class TreeViewNodeState implements JsonSerializable
*/
private $selected = null;
/**
* @return bool|null
*/
public function getDisabled(): ?bool
{
return $this->disabled;
@ -74,9 +71,6 @@ final class TreeViewNodeState implements JsonSerializable
$this->disabled = $disabled;
}
/**
* @return bool|null
*/
public function getExpanded(): ?bool
{
return $this->expanded;
@ -87,9 +81,6 @@ final class TreeViewNodeState implements JsonSerializable
$this->expanded = $expanded;
}
/**
* @return bool|null
*/
public function getSelected(): ?bool
{
return $this->selected;

View file

@ -58,7 +58,7 @@ class UTCDateTimeType extends DateTimeType
public function convertToDatabaseValue($value, AbstractPlatform $platform)
{
if (! self::$utc_timezone) {
if (!self::$utc_timezone) {
self::$utc_timezone = new DateTimeZone('UTC');
}
@ -71,7 +71,7 @@ class UTCDateTimeType extends DateTimeType
public function convertToPHPValue($value, AbstractPlatform $platform)
{
if (! self::$utc_timezone) {
if (!self::$utc_timezone) {
self::$utc_timezone = new DateTimeZone('UTC');
}
@ -85,7 +85,7 @@ class UTCDateTimeType extends DateTimeType
self::$utc_timezone
);
if (! $converted) {
if (!$converted) {
throw ConversionException::conversionFailedFormat($value, $this->getName(), $platform->getDateTimeFormatString());
}