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

Apply fixes from StyleCI

This commit is contained in:
Taylor Otwell
2021-12-06 10:40:37 +00:00
committed by StyleCI Bot
parent 3a5d12e24d
commit 101abeae0e
35 changed files with 580 additions and 536 deletions

View File

@@ -12,7 +12,7 @@ class Filesystem
* @param string $path
* @return bool
*/
function isDir($path)
public function isDir($path)
{
return is_dir($path);
}
@@ -25,7 +25,7 @@ function isDir($path)
* @param int $mode
* @return void
*/
function mkdir($path, $owner = null, $mode = 0755)
public function mkdir($path, $owner = null, $mode = 0755)
{
mkdir($path, $mode, true);
@@ -42,7 +42,7 @@ function mkdir($path, $owner = null, $mode = 0755)
* @param int $mode
* @return void
*/
function ensureDirExists($path, $owner = null, $mode = 0755)
public function ensureDirExists($path, $owner = null, $mode = 0755)
{
if (! $this->isDir($path)) {
$this->mkdir($path, $owner, $mode);
@@ -56,7 +56,7 @@ function ensureDirExists($path, $owner = null, $mode = 0755)
* @param int $mode
* @return void
*/
function mkdirAsUser($path, $mode = 0755)
public function mkdirAsUser($path, $mode = 0755)
{
$this->mkdir($path, user(), $mode);
}
@@ -68,7 +68,7 @@ function mkdirAsUser($path, $mode = 0755)
* @param string|null $owner
* @return string
*/
function touch($path, $owner = null)
public function touch($path, $owner = null)
{
touch($path);
@@ -85,7 +85,7 @@ function touch($path, $owner = null)
* @param string $path
* @return void
*/
function touchAsUser($path)
public function touchAsUser($path)
{
return $this->touch($path, user());
}
@@ -96,7 +96,7 @@ function touchAsUser($path)
* @param string $path
* @return bool
*/
function exists($path)
public function exists($path)
{
return file_exists($path);
}
@@ -107,7 +107,7 @@ function exists($path)
* @param string $path
* @return string
*/
function get($path)
public function get($path)
{
return file_get_contents($path);
}
@@ -120,7 +120,7 @@ function get($path)
* @param string|null $owner
* @return void
*/
function put($path, $contents, $owner = null)
public function put($path, $contents, $owner = null)
{
file_put_contents($path, $contents);
@@ -136,7 +136,7 @@ function put($path, $contents, $owner = null)
* @param string $contents
* @return void
*/
function putAsUser($path, $contents)
public function putAsUser($path, $contents)
{
$this->put($path, $contents, user());
}
@@ -149,7 +149,7 @@ function putAsUser($path, $contents)
* @param string|null $owner
* @return void
*/
function append($path, $contents, $owner = null)
public function append($path, $contents, $owner = null)
{
file_put_contents($path, $contents, FILE_APPEND);
@@ -165,7 +165,7 @@ function append($path, $contents, $owner = null)
* @param string $contents
* @return void
*/
function appendAsUser($path, $contents)
public function appendAsUser($path, $contents)
{
$this->append($path, $contents, user());
}
@@ -177,7 +177,7 @@ function appendAsUser($path, $contents)
* @param string $to
* @return void
*/
function copy($from, $to)
public function copy($from, $to)
{
copy($from, $to);
}
@@ -189,7 +189,7 @@ function copy($from, $to)
* @param string $to
* @return void
*/
function copyAsUser($from, $to)
public function copyAsUser($from, $to)
{
copy($from, $to);
@@ -203,7 +203,7 @@ function copyAsUser($from, $to)
* @param string $link
* @return void
*/
function symlink($target, $link)
public function symlink($target, $link)
{
if ($this->exists($link)) {
$this->unlink($link);
@@ -221,7 +221,7 @@ function symlink($target, $link)
* @param string $link
* @return void
*/
function symlinkAsUser($target, $link)
public function symlinkAsUser($target, $link)
{
if ($this->exists($link)) {
$this->unlink($link);
@@ -236,7 +236,7 @@ function symlinkAsUser($target, $link)
* @param string $path
* @return void
*/
function unlink($path)
public function unlink($path)
{
if (file_exists($path) || is_link($path)) {
@unlink($path);
@@ -249,7 +249,7 @@ function unlink($path)
* @param string $path
* @param string $user
*/
function chown($path, $user)
public function chown($path, $user)
{
chown($path, $user);
}
@@ -260,7 +260,7 @@ function chown($path, $user)
* @param string $path
* @param string $group
*/
function chgrp($path, $group)
public function chgrp($path, $group)
{
chgrp($path, $group);
}
@@ -271,7 +271,7 @@ function chgrp($path, $group)
* @param string $path
* @return string
*/
function realpath($path)
public function realpath($path)
{
return realpath($path);
}
@@ -282,7 +282,7 @@ function realpath($path)
* @param string $path
* @return bool
*/
function isLink($path)
public function isLink($path)
{
return is_link($path);
}
@@ -293,7 +293,7 @@ function isLink($path)
* @param string $path
* @return string
*/
function readLink($path)
public function readLink($path)
{
return readlink($path);
}
@@ -304,7 +304,7 @@ function readLink($path)
* @param string $path
* @return void
*/
function removeBrokenLinksAt($path)
public function removeBrokenLinksAt($path)
{
collect($this->scandir($path))
->filter(function ($file) use ($path) {
@@ -321,7 +321,7 @@ function removeBrokenLinksAt($path)
* @param string $path
* @return bool
*/
function isBrokenLink($path)
public function isBrokenLink($path)
{
return is_link($path) && ! file_exists($path);
}
@@ -332,7 +332,7 @@ function isBrokenLink($path)
* @param string $path
* @return array
*/
function scandir($path)
public function scandir($path)
{
return collect(scandir($path))
->reject(function ($file) {