Issues (238)

src/Http/Controllers/SitecFeatureController.php (3 issues)

Labels
Severity
1
<?php
2
3
namespace Translation\Http\Controllers;
4
5
// use Translation\Services\LanguageService;
6
use Translation;
7
use Illuminate\Http\Request;
0 ignored issues
show
The type Illuminate\Http\Request was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
8
9
class SitecFeatureController extends Controller
10
{
11
    /**
12
     * Set the default lanugage for the session.
13
     *
14
     * @param Request $request
15
     * @param string  $language
16
     */
17
    public function setLanguage(Request $request, $language)
18
    {
19
        dd('LinksPedreiro', $language);
0 ignored issues
show
The function dd was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

19
        /** @scrutinizer ignore-call */ 
20
        dd('LinksPedreiro', $language);
Loading history...
20
        Translation::setLanguage($language);
21
        return back()->withCookie('language', $language)->withCookie('locale', $language);
0 ignored issues
show
The function back was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

21
        return /** @scrutinizer ignore-call */ back()->withCookie('language', $language)->withCookie('locale', $language);
Loading history...
22
    }
23
}
24