Skip to content

Commit

Permalink
Dev: Add phpmd to composer.json
Browse files Browse the repository at this point in the history
  • Loading branch information
olleharstedt committed Jun 29, 2018
1 parent e536ed2 commit ec81d6f
Show file tree
Hide file tree
Showing 5 changed files with 71 additions and 4 deletions.
9 changes: 5 additions & 4 deletions composer.json
Expand Up @@ -34,8 +34,9 @@
"vendor-dir": "third_party",
"bin-dir": "third_party/bin"
},
"require-dev": {
"squizlabs/php_codesniffer": "2.*",
"vimeo/psalm": "dev-master"
}
"require-dev": {
"squizlabs/php_codesniffer": "2.*",
"vimeo/psalm": "dev-master",
"phpmd/phpmd" : "@stable"
}
}
1 change: 1 addition & 0 deletions third_party/composer/autoload_namespaces.php
Expand Up @@ -6,5 +6,6 @@
$baseDir = dirname($vendorDir);

return array(
'PHPMD\\' => array($vendorDir . '/phpmd/phpmd/src/main/php'),
'LSS' => array($vendorDir . '/openlss/lib-array2xml'),
);
6 changes: 6 additions & 0 deletions third_party/composer/autoload_psr4.php
Expand Up @@ -6,10 +6,16 @@
$baseDir = dirname($vendorDir);

return array(
'Symfony\\Polyfill\\Ctype\\' => array($vendorDir . '/symfony/polyfill-ctype'),
'Symfony\\Component\\Process\\' => array($vendorDir . '/symfony/process'),
'Symfony\\Component\\Filesystem\\' => array($vendorDir . '/symfony/filesystem'),
'Symfony\\Component\\DependencyInjection\\' => array($vendorDir . '/symfony/dependency-injection'),
'Symfony\\Component\\Config\\' => array($vendorDir . '/symfony/config'),
'Psr\\Log\\' => array($vendorDir . '/psr/log/Psr/Log'),
'Psr\\Container\\' => array($vendorDir . '/psr/container/src'),
'Psalm\\' => array($vendorDir . '/vimeo/psalm/src/Psalm'),
'PhpParser\\' => array($vendorDir . '/nikic/php-parser/lib/PhpParser'),
'PDepend\\' => array($vendorDir . '/pdepend/pdepend/src/main/php/PDepend'),
'Muglug\\PackageVersions\\' => array($vendorDir . '/muglug/package-versions-56/src/PackageVersions'),
'LimeSurvey\\PluginManager\\' => array($baseDir . '/application/libraries/PluginManager', $baseDir . '/application/libraries/PluginManager/Storage'),
'LimeSurvey\\Menu\\' => array($baseDir . '/application/libraries/MenuObjects'),
Expand Down
18 changes: 18 additions & 0 deletions third_party/composer/autoload_real.php
Expand Up @@ -47,6 +47,24 @@ public static function getLoader()

$loader->register(true);

if ($useStaticLoader) {
$includeFiles = Composer\Autoload\ComposerStaticInitddb1a145e450f862353420acc5153e40::$files;
} else {
$includeFiles = require __DIR__ . '/autoload_files.php';
}
foreach ($includeFiles as $fileIdentifier => $file) {
composerRequireddb1a145e450f862353420acc5153e40($fileIdentifier, $file);
}

return $loader;
}
}

function composerRequireddb1a145e450f862353420acc5153e40($fileIdentifier, $file)
{
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
require $file;

$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
}
}
41 changes: 41 additions & 0 deletions third_party/composer/autoload_static.php
Expand Up @@ -6,16 +6,26 @@

class ComposerStaticInitddb1a145e450f862353420acc5153e40
{
public static $files = array (
'320cde22f66dd4f5d3fd621d3e88b98f' => __DIR__ . '/..' . '/symfony/polyfill-ctype/bootstrap.php',
);

public static $prefixLengthsPsr4 = array (
'S' =>
array (
'Symfony\\Polyfill\\Ctype\\' => 23,
'Symfony\\Component\\Process\\' => 26,
'Symfony\\Component\\Filesystem\\' => 29,
'Symfony\\Component\\DependencyInjection\\' => 38,
'Symfony\\Component\\Config\\' => 25,
),
'P' =>
array (
'Psr\\Log\\' => 8,
'Psr\\Container\\' => 14,
'Psalm\\' => 6,
'PhpParser\\' => 10,
'PDepend\\' => 8,
),
'M' =>
array (
Expand All @@ -38,14 +48,34 @@ class ComposerStaticInitddb1a145e450f862353420acc5153e40
);

public static $prefixDirsPsr4 = array (
'Symfony\\Polyfill\\Ctype\\' =>
array (
0 => __DIR__ . '/..' . '/symfony/polyfill-ctype',
),
'Symfony\\Component\\Process\\' =>
array (
0 => __DIR__ . '/..' . '/symfony/process',
),
'Symfony\\Component\\Filesystem\\' =>
array (
0 => __DIR__ . '/..' . '/symfony/filesystem',
),
'Symfony\\Component\\DependencyInjection\\' =>
array (
0 => __DIR__ . '/..' . '/symfony/dependency-injection',
),
'Symfony\\Component\\Config\\' =>
array (
0 => __DIR__ . '/..' . '/symfony/config',
),
'Psr\\Log\\' =>
array (
0 => __DIR__ . '/..' . '/psr/log/Psr/Log',
),
'Psr\\Container\\' =>
array (
0 => __DIR__ . '/..' . '/psr/container/src',
),
'Psalm\\' =>
array (
0 => __DIR__ . '/..' . '/vimeo/psalm/src/Psalm',
Expand All @@ -54,6 +84,10 @@ class ComposerStaticInitddb1a145e450f862353420acc5153e40
array (
0 => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser',
),
'PDepend\\' =>
array (
0 => __DIR__ . '/..' . '/pdepend/pdepend/src/main/php/PDepend',
),
'Muglug\\PackageVersions\\' =>
array (
0 => __DIR__ . '/..' . '/muglug/package-versions-56/src/PackageVersions',
Expand Down Expand Up @@ -82,6 +116,13 @@ class ComposerStaticInitddb1a145e450f862353420acc5153e40
);

public static $prefixesPsr0 = array (
'P' =>
array (
'PHPMD\\' =>
array (
0 => __DIR__ . '/..' . '/phpmd/phpmd/src/main/php',
),
),
'L' =>
array (
'LSS' =>
Expand Down

0 comments on commit ec81d6f

Please sign in to comment.