Issues (27)

Security Analysis    no request data  


  Cross-Site Scripting
  File Exposure
  File Manipulation
  Object Injection
  Code Injection
  Response Splitting
Response Splitting can be used to send arbitrary responses.
  File Inclusion
  Command Injection
  SQL Injection
  XPath Injection
  LDAP Injection
  Header Injection
  Other Vulnerability
  Regex Injection
  XML Injection
  Variable Injection

src/Extension/Folders/FoldersExtension.php (1 issue)

Upgrade to new PHP Analysis Engine


namespace League\Plates\Extension\Folders;
use League\Plates;
final class FoldersExtension implements Plates\Extension
9 24
    public function register(Plates\Engine $plates) {
10 24
        $c = $plates->getContainer();
11 24
        $c->add('folders.folders', []);
12 24
        $c->wrapStack('path.resolvePath', function($stack, $c) {
13 24
            $config = $c;
14 24
            return array_merge($stack, [
15 24
                'folders' => foldersResolvePath(
16 24
17 24
18 24
21 24
22 24
        $c->wrapComposed('path.normalizeName', function($composed, $c) {
23 24
            return array_merge($composed, [
24 24
                'folders.stripFolders' => stripFoldersNormalizeName($c->get('folders.folders'))
26 24
28 24
0 ignored issues
Documentation Bug introduced by RJ Garcia
The method defineConfig does not exist on object<League\Plates\Engine>? Since you implemented __call, maybe consider adding a @method annotation.

If you implement __call and you know which methods are available, you can improve IDE auto-completion and static analysis by adding a @method annotation to the class.

This is often the case, when __call is implemented by a parent class and only the child class knows which methods exist:

class ParentClass {
    private $data = array();

    public function __call($method, array $args) {
        if (0 === strpos($method, 'get')) {
            return $this->data[strtolower(substr($method, 3))];

        throw new \LogicException(sprintf('Unsupported method: %s', $method));

 * If this class knows which fields exist, you can specify the methods here:
 * @method string getName()
class SomeClass extends ParentClass { }
Loading history...
29 24
            'folder_separator' => '::',
31 24
32 24
            'addFolder' => function($plates, $folder, $prefixes, $fallback = false) {
33 4
                $prefixes = is_string($prefixes) ? [$prefixes] : $prefixes;
34 4
                if ($fallback) {
                    $prefixes[] = '';
37 4
                $plates->getContainer()->merge('folders.folders', [
                    $folder => [
39 4
                        'folder' => $folder,
40 4
                        'prefixes' => $prefixes,
43 24
45 24