for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace UniSharp\Uploadable;
use Illuminate\Support\Facades\Route;
class UploaderManager
{
public static function route($enable = ['store', 'delete'], callable $callback = null): void
TRUE
FALSE
NULL
null
Route::prefix('files')->group(function () use ($enable, $callback) {
$namespace = '\\UniSharp\\Uploadable\\Http\\Controllers\\Api\\V1\\';
if (in_array('store', $enable)) {
Route::post('/', $namespace . 'UploadController@store');
}
if (in_array('delete', $enable)) {
Route::delete('{file}', $namespace . 'UploadController@destroy');
if ($callback) {
$callback();
});
If a function call spawns multiple lines, the coding standard suggests to move the closing parenthesis to a new line:
someFunctionCall( $firstArgument, $secondArgument, $thirdArgument ); // Closing parenthesis on a new line.
This check marks files that end in a newline character, i.e. an empy line.