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

@@ -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)
{