Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.5.0 release #42

Merged
merged 4 commits into from
Jul 28, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ The requires fields currently are: name and message
<li>minlength: int or false</li>
<li>maxlength: int or false</li>
<li>regex: string</li>
<ul>
</ul>
</td>
</tr>
<tr>
Expand All @@ -190,7 +190,7 @@ The requires fields currently are: name and message
<li>upperbound: int, float or false</li>
<li>range: [lowerbound, upperbound]</li>
<li>withinrange: [float $point, float $deviation]</li>
<ul>
</ul>
</td>
</tr>
<tr>
Expand All @@ -214,7 +214,7 @@ The requires fields currently are: name and message
<li>defaultunit: string</li>
<li>lowerbound: int, float or false</li>
<li>upperbound: int, float or false</li>
<ul>
</ul>
</td>
</tr>
</table>
Expand Down Expand Up @@ -303,6 +303,10 @@ support the [Maps](https://github.com/JeroenDeDauw/Maps) and

## Release notes

### 1.5.0 (2019-07-28)

* Improved code comments

### 1.4.2 (2018-11-26)

* Fixed defaulting behaviour of list parameters
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
},
"extra": {
"branch-alias": {
"dev-master": "1.4.x-dev"
"dev-master": "1.5.x-dev"
}
},
"scripts": {
Expand Down
35 changes: 16 additions & 19 deletions src/IParamDefinition.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public function format( IParam $param, array &$definitions, array $params );
*
* @return string[]
*/
public function getAliases();
public function getAliases(): array;

/**
* Returns the default value.
Expand All @@ -72,7 +72,7 @@ public function getDefault();
*
* @return string
*/
public function getDelimiter();
public function getDelimiter(): string;

/**
* Returns a list of dependencies the parameter has, in the form of
Expand All @@ -82,7 +82,7 @@ public function getDelimiter();
*
* @return string[]
*/
public function getDependencies();
public function getDependencies(): array;

/**
* Returns a message that will act as a description message for the parameter.
Expand All @@ -91,7 +91,7 @@ public function getDependencies();
*
* @return string
*/
public function getMessage();
public function getMessage(): string;

/**
* Returns the parameters main name.
Expand All @@ -100,7 +100,7 @@ public function getMessage();
*
* @return string
*/
public function getName();
public function getName(): string;

/**
* Returns an identifier for the type of the parameter.
Expand All @@ -109,7 +109,7 @@ public function getName();
*
* @return string
*/
public function getType();
public function getType(): string;

/**
* Returns if the parameter has a certain alias.
Expand All @@ -120,7 +120,7 @@ public function getType();
*
* @return boolean
*/
public function hasAlias( $alias );
public function hasAlias( string $alias ): bool;

/**
* Returns if the parameter has a certain dependency.
Expand All @@ -131,7 +131,7 @@ public function hasAlias( $alias );
*
* @return boolean
*/
public function hasDependency( $dependency );
public function hasDependency( string $dependency ): bool;

/**
* Returns if the parameter is a list or not.
Expand All @@ -140,7 +140,7 @@ public function hasDependency( $dependency );
*
* @return boolean
*/
public function isList();
public function isList(): bool;

/**
* Returns if the parameter is a required one or not.
Expand All @@ -149,7 +149,7 @@ public function isList();
*
* @return boolean
*/
public function isRequired();
public function isRequired(): bool;

/**
* Sets the default parameter value. Null indicates no default,
Expand Down Expand Up @@ -179,19 +179,17 @@ public function setDelimiter( $delimiter );
*
* @param boolean $manipulateDefault
*/
public function setDoManipulationOfDefault( $manipulateDefault );
public function setDoManipulationOfDefault( bool $manipulateDefault );

/**
* Sets a message for the parameter that will act as description.
* This should be a message key, ie something that can be passed
* to wfMsg. Not an actual text. If you do not have a message key,
* but only a text, use setDescription instead.
*
*
* @since 1.0
*
* @param string $message
*/
public function setMessage( $message );
public function setMessage( string $message );

/**
* Returns if the parameter manipulations should be applied to the default value.
Expand All @@ -200,7 +198,7 @@ public function setMessage( $message );
*
* @return boolean
*/
public function shouldManipulateDefault();
public function shouldManipulateDefault(): bool;

/**
* Returns a message key for a message describing the parameter type.
Expand All @@ -209,11 +207,10 @@ public function shouldManipulateDefault();
*
* @return string
*/
public function getTypeMessage();
public function getTypeMessage(): string;

/**
* Returns if the value should be trimmed before validation and any further processing.
* @see IParamDefinition::trimDuringClean
*
* @since 1.0
*
Expand Down Expand Up @@ -267,7 +264,7 @@ public function setValueValidator( ValueValidator $validator );
*
* @param callable $validationFunction
*/
public function setValidationCallback( /* callable */ $validationFunction );
public function setValidationCallback( callable $validationFunction );

/**
* Sets the parameter definition values contained in the provided array.
Expand Down