PHP Coding Standards Fixer > fix coding standard

This commit is contained in:
Meritoo
2019-04-06 08:00:01 +02:00
parent 0f64705132
commit a13a629408
71 changed files with 812 additions and 1133 deletions

View File

@@ -44,7 +44,7 @@ class Company
*
* @param string $name Name of company
* @param Address $address Address of company
* @param BankAccount|null $bankAccount (optional) Bank account of company
* @param null|BankAccount $bankAccount (optional) Bank account of company
*/
public function __construct($name, Address $address, BankAccount $bankAccount = null)
{
@@ -92,7 +92,7 @@ class Company
/**
* Returns bank account of company
*
* @return BankAccount|null
* @return null|BankAccount
*/
public function getBankAccount()
{

View File

@@ -195,7 +195,7 @@ class Size
* @param string $size The size represented as string (width and height separated by given separator)
* @param string $unit (optional) Unit used when width or height should be returned with unit. Default: "px".
* @param string $separator (optional) Separator used to split width and height. Default: " x ".
* @return Size|null
* @return null|Size
*/
public static function fromString($size, $unit = 'px', $separator = ' x ')
{
@@ -223,7 +223,7 @@ class Size
*
* @param array $array The size represented as array
* @param string $unit (optional) Unit used when width or height should be returned with unit. Default: "px".
* @return Size|null
* @return null|Size
*/
public static function fromArray(array $array, $unit = 'px')
{

View File

@@ -54,6 +54,16 @@ class Version
$this->patchPart = $patchPart;
}
/**
* Returns representation of object as string
*
* @return string
*/
public function __toString()
{
return sprintf('%d.%d.%d', $this->getMajorPart(), $this->getMinorPart(), $this->getPatchPart());
}
/**
* Returns the "major" part.
* Incremented when you make incompatible API changes.
@@ -87,16 +97,6 @@ class Version
return $this->patchPart;
}
/**
* Returns representation of object as string
*
* @return string
*/
public function __toString()
{
return sprintf('%d.%d.%d', $this->getMajorPart(), $this->getMinorPart(), $this->getPatchPart());
}
/**
* Returns new instance based on given version as string.
* Given version should contain 3 dot-separated integers, 1 per each part ("major", "minor" and "patch").
@@ -106,7 +106,7 @@ class Version
* "10.4.0";
*
* @param string $version The version
* @return Version|null
* @return null|Version
*/
public static function fromString(string $version)
{
@@ -148,7 +148,7 @@ class Version
* [10, 4, 0];
*
* @param array $version The version
* @return Version|null
* @return null|Version
*/
public static function fromArray(array $version)
{