-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use preferred-install from composer to replace script
- Loading branch information
Hidde Boomsma
committed
Aug 9, 2016
1 parent
27c3268
commit fd1dacc
Showing
4 changed files
with
24 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,8 +9,8 @@ | |
use Hostnet\Component\Path\Path; | ||
|
||
/** | ||
* This small composer installer plugin hooks into the post-autoload-dump event and swaps out the phpcs and phpcbf | ||
* files for their hostnet counter parts. | ||
* This small composer installer plugin hooks into the post-autoload-dump | ||
* and configures the Hostnet standard for PHPCS | ||
* | ||
* @author Stefan Lenselink <[email protected]> | ||
*/ | ||
|
@@ -59,20 +59,8 @@ public static function getSubscribedEvents() | |
} | ||
|
||
/** | ||
* This function call is called from the phpcs main composer.json file as an 'pre-dependencies-solving' script. | ||
* This function makes sure the Download manager ALWAYS uses source instead of dist to ensure the 'test'-folder of | ||
* PHP Code Sniffer is there... | ||
* | ||
* @param InstallerEvent $event the event fired. | ||
* Configuration for standalone use in a system wide installation senario | ||
*/ | ||
public static function ensureSource(InstallerEvent $event) | ||
{ | ||
$download_manager = $event->getComposer()->getDownloadManager(); | ||
/*@var $dm \Composer\Downloader\DownloadManager */ | ||
$download_manager->setPreferDist(false); | ||
$download_manager->setPreferSource(true); | ||
} | ||
|
||
public static function configureAsRoot() | ||
{ | ||
$vendor_dir = Path::VENDOR_DIR . '/hostnet/phpcs-tool/src/Hostnet'; | ||
|
@@ -84,6 +72,9 @@ public static function configureAsRoot() | |
} | ||
} | ||
|
||
/** | ||
* Configure the Hostnet code style | ||
*/ | ||
public static function configure() | ||
{ | ||
$file = Path::VENDOR_DIR . '/squizlabs/php_codesniffer/CodeSniffer.conf'; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,6 +36,5 @@ public function getErrorList($filename = null) | |
public function getWarningList() | ||
{ | ||
return array(); | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,6 +30,5 @@ public function getErrorList($filename = null) | |
public function getWarningList() | ||
{ | ||
return array(); | ||
|
||
} | ||
} |