for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace App\Http\Controllers\Gedcom;
use App\Note;
use App\Event;
use App\Family;
use App\Person;
use App\Source;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use Asdfx\LaravelGedcom\Facades\GedcomParserFacade;
class Store extends Controller
{
/*
* Api end-point for Gedcom api/gedcom/store
* Saving uploaded file to storage and starting to read
*/
public function __invoke(Request $request)
if ($request->hasFile('file')) {
if ($request->file('file')->isValid()) {
$request->file->storeAs('gedcom', 'file.ged');
$this->readData($request->file);
return ['File uploaded'];
}
return ['File corrupted'];
return ['Not uploaded'];
* Read ged file
public function readData($filename)
$filename
If this is a false-positive, you can also ignore this issue in your code via the ignore-unused annotation
ignore-unused
public function readData(/** @scrutinizer ignore-unused */ $filename)
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.
$filename = $this->filename;
filename
App\Http\Controllers\Gedcom\Store
GedcomParserFacade::parse($filename, true);
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.