Skip to content

Commit

Permalink
Merge branch '2.0' into 2
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Jun 19, 2024
2 parents 8267407 + 902d4c3 commit 761c099
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/Library.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ public function getBasePublicPath()
{
$projectPath = $this->getBasePath();
$resourceDir = $this->getResourcesDir();
$publicPath = Util::joinPaths($projectPath, self::PUBLIC_PATH, $resourceDir);
$publicPath = Util::joinPaths($projectPath, Library::PUBLIC_PATH, $resourceDir);
return $publicPath;
}

Expand All @@ -138,7 +138,7 @@ public function getPath()
*/
public function getRelativePath()
{
return trim(substr($this->path ?? '', strlen($this->basePath ?? '')), self::TRIM_CHARS ?? '');
return trim(substr($this->path ?? '', strlen($this->basePath ?? '')), Library::TRIM_CHARS ?? '');
}

/**
Expand Down Expand Up @@ -271,13 +271,13 @@ public function getResourcesDir()
$rootProject = new JsonFile($rootComposerFile, null, new NullIO());

if (!$rootProject->exists()) {
return self::DEFAULT_RESOURCES_DIR;
return Library::DEFAULT_RESOURCES_DIR;
}

$rootProjectData = $rootProject->read();
$resourcesDir = isset($rootProjectData['extra']['resources-dir'])
? $rootProjectData['extra']['resources-dir']
: self::DEFAULT_RESOURCES_DIR;
: Library::DEFAULT_RESOURCES_DIR;


if (preg_match('/^[_\-a-z0-9]+$/i', $resourcesDir ?? '')) {
Expand Down
2 changes: 1 addition & 1 deletion src/VendorPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class VendorPlugin implements PluginInterface, EventSubscriberInterface, Capable
/**
* Define default as 'auto'
*/
const METHOD_DEFAULT = self::METHOD_AUTO;
const METHOD_DEFAULT = VendorPlugin::METHOD_AUTO;

/**
* @var Filesystem
Expand Down

0 comments on commit 761c099

Please sign in to comment.