1
0
mirror of https://github.com/laravel/valet.git synced 2026-02-06 00:40:06 +01:00

Consistency changes (#60)

* Correct the return type annotation in a serves method

* Type-hint the driver in the abstract ValetDriver

* Correct the return type-hint in the sample ValetDriver

* Remove the return afrom the restartLinkedPhp method

* Remove the return annotation from the Caddy constructor

* Remove the return annotation from the Valet configuration constructor

* Removed the return from the prependPath method of the Configuration class

* Removed the return from the appendAsUser method of the Filesystem class

* Removed the return annotation from the Site constructor

* Corrected the parameter annotation of the link method in the Site class

* Order use statements by length in PhpFpm

* Remove the return annotation from the Valet constructor
This commit is contained in:
Daniel Morris
2016-05-13 03:17:32 +01:00
committed by Taylor Otwell
parent a7d383db3a
commit fe6fb947f7
10 changed files with 9 additions and 12 deletions

View File

@@ -155,7 +155,7 @@ function linkedPhp()
*/
function restartLinkedPhp()
{
return $this->restartService($this->linkedPhp());
$this->restartService($this->linkedPhp());
}
/**

View File

@@ -13,7 +13,6 @@ class Caddy
*
* @param CommandLine $cli
* @param Filesystem $files
* @return void
*/
function __construct(CommandLine $cli, Filesystem $files)
{

View File

@@ -9,8 +9,7 @@ class Configuration
/**
* Create a new Valet configuration class instance.
*
* @param Filesystem $filesystem
* @return void
* @param Filesystem $filesystem
*/
function __construct(Filesystem $files)
{
@@ -105,7 +104,7 @@ function addPath($path, $prepend = false)
*/
function prependPath($path)
{
return $this->addPath($path, true);
$this->addPath($path, true);
}
/**

View File

@@ -167,7 +167,7 @@ function append($path, $contents, $owner = null)
*/
function appendAsUser($path, $contents)
{
return $this->append($path, $contents, user());
$this->append($path, $contents, user());
}
/**

View File

@@ -2,8 +2,8 @@
namespace Valet;
use DomainException;
use Exception;
use DomainException;
use Symfony\Component\Process\Process;
class PhpFpm

View File

@@ -14,7 +14,6 @@ class Site
* @param Configuration $config
* @param CommandLine $cli
* @param Filesystem $files
* @return void
*/
function __construct(Configuration $config, CommandLine $cli, Filesystem $files)
{
@@ -27,7 +26,7 @@ function __construct(Configuration $config, CommandLine $cli, Filesystem $files)
* Link the current working directory with the given name.
*
* @param string $target
* @param string $name
* @param string $link
* @return string
*/
function link($target, $link)

View File

@@ -13,7 +13,6 @@ class Valet
*
* @param CommandLine $cli
* @param Filesystem $files
* @return void
*/
function __construct(CommandLine $cli, Filesystem $files)
{

View File

@@ -8,7 +8,7 @@ class StatamicV1ValetDriver extends ValetDriver
* @param string $sitePath
* @param string $siteName
* @param string $uri
* @return void
* @return bool
*/
public function serves($sitePath, $siteName, $uri)
{

View File

@@ -63,6 +63,7 @@ public static function assign($sitePath, $siteName, $uri)
$drivers[] = 'BasicValetDriver';
foreach ($drivers as $driver) {
/** @var ValetDriver $driver */
$driver = new $driver;
if ($driver->serves($sitePath, $siteName, $driver->mutateUri($uri))) {

View File

@@ -8,7 +8,7 @@ class SampleValetDriver extends ValetDriver
* @param string $sitePath
* @param string $siteName
* @param string $uri
* @return void
* @return bool
*/
public function serves($sitePath, $siteName, $uri)
{