mirror of
https://github.com/wiosna-dev/common-library.git
synced 2026-03-12 17:41:50 +01:00
PHP Coding Standards Fixer > fix coding standard
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user