Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds static function to call the Plugin::onDependenciesChangedEvent() method #5

Merged
merged 7 commits into from
Feb 14, 2017
Merged

Adds static function to call the Plugin::onDependenciesChangedEvent() method #5

merged 7 commits into from
Feb 14, 2017

Conversation

Potherca
Copy link
Member

@Potherca Potherca commented Jan 11, 2017

Fix for issue #4.

This PR expose a new method run. This can be use from a composer.json file like this:

{
    "name": "potherca/phpcodesniffer-composer-installer-example",
    "description": "Example to demonstrate the working of the dealerdirect/phpcodesniffer-composer-installer package.",
    "require": {
        "dealerdirect/phpcodesniffer-composer-installer": "*",
    },
    "scripts": {
        "run-phpcodesniffer-composer-installer": [
            "Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\Plugin::run"
        ]
    }
}

Beside this feature I have also done some minor code cleanup and added more message for in verbose mode.

@Potherca
Copy link
Member Author

Potherca commented Feb 3, 2017

@frenck I would suggest merging #6 and #8 first, I'll pick up any merge-conflicts here afterwards and ping you for a review.

@frenck
Copy link
Contributor

frenck commented Feb 5, 2017

@Potherca Will do 👍

@Potherca
Copy link
Member Author

Potherca commented Feb 9, 2017

@frenck Update complete, can be reviewed.

Copy link
Contributor

@frenck frenck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works fine, but missing some code documentation.

src/Plugin.php Outdated
$this->init();
}

private function init()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing documentation block.
Could you please add this?

src/Plugin.php Outdated
@@ -55,6 +60,19 @@ class Plugin implements PluginInterface, EventSubscriberInterface
*/
private $processBuilder;

public static function run(Event $event)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing documentation block.
Could you please add this?

@Potherca
Copy link
Member Author

Docblocks fixed.

@frenck
Copy link
Contributor

frenck commented Feb 14, 2017

Thx!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants