Don't use anonymous functions
Added some missing doc
This commit is contained in:
parent
70fe4cb95d
commit
b0c4963ac8
2 changed files with 16 additions and 4 deletions
|
@ -88,6 +88,11 @@ class Locale
|
|||
return strtolower($this->region);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get country information from locale.
|
||||
*
|
||||
* @return \Rinvex\Country\Country
|
||||
*/
|
||||
public function getCountry()
|
||||
{
|
||||
return country($this->getIso3166());
|
||||
|
|
|
@ -64,6 +64,15 @@ class LocaleMiddlewareTest extends \PHPUnit_Framework_TestCase
|
|||
$this->assertNull($this->middleware->testLocale([]));
|
||||
}
|
||||
|
||||
/**
|
||||
* Mock function that does nothing.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function nothing()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Test the __invoke() function.
|
||||
*
|
||||
|
@ -75,8 +84,7 @@ class LocaleMiddlewareTest extends \PHPUnit_Framework_TestCase
|
|||
$this->middleware->__invoke(
|
||||
$request->withHeader('Accept-Language', 'fr-FR'),
|
||||
new Response(),
|
||||
function () {
|
||||
}
|
||||
[$this, 'nothing']
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -91,8 +99,7 @@ class LocaleMiddlewareTest extends \PHPUnit_Framework_TestCase
|
|||
$this->middleware->__invoke(
|
||||
$request->withoutHeader('Accept-Language'),
|
||||
new Response(),
|
||||
function () {
|
||||
}
|
||||
[$this, 'nothing']
|
||||
);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue