Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
codestyle fixes (#3994)
  • Loading branch information
DavertMik committed Feb 4, 2017
1 parent ed549a9 commit 58f1463
Show file tree
Hide file tree
Showing 11 changed files with 12 additions and 19 deletions.
8 changes: 4 additions & 4 deletions RoboFile.php
Expand Up @@ -869,17 +869,17 @@ protected function documentApiClass($file, $className, $all = false)

$this->taskGenDoc($file)
->docClass($className)
->filterMethods(function(ReflectionMethod $r) use ($all, $className) {
->filterMethods(function (ReflectionMethod $r) use ($all, $className) {
return $all || $r->isPublic();
})
->append(
'<p>&nbsp;</p><div class="alert alert-warning">Reference is taken from the source code. '
. '<a href="' . $source . '">Help us to improve documentation. Edit module reference</a></div>'
)
->processPropertySignature(function($r) {
->processPropertySignature(function ($r) {
return "\n#### $" . $r->name. "\n\n";
})
->processPropertyDocBlock(function($r, $text) {
->processPropertyDocBlock(function ($r, $text) {
$modifiers = implode(' ', \Reflection::getModifierNames($r->getModifiers()));
$text = ' *' . $modifiers . '* **$' . $r->name . "**\n" . $text;
$text = preg_replace("~@(.*?)\s(.*)~", 'type `$2`', $text);
Expand All @@ -890,7 +890,7 @@ function (ReflectionClass $r, $text) {
return $text . "\n";
}
)
->processMethodSignature(function($r, $text) {
->processMethodSignature(function ($r, $text) {
return "#### {$r->name}()\n\n" . ltrim($text, '#');
})
->processMethodDocBlock(
Expand Down
1 change: 0 additions & 1 deletion src/Codeception/Command/ConfigValidate.php
Expand Up @@ -57,7 +57,6 @@ public function execute(InputInterface $input, OutputInterface $output)
$this->addStyles($output);

if ($suite = $input->getArgument('suite')) {

$output->write("Validating <bold>$suite</bold> config... ");
$config = $this->getSuiteConfig($suite, $input->getOption('config'));
$output->writeln("Ok");
Expand Down
2 changes: 1 addition & 1 deletion src/Codeception/Lib/Di.php
Expand Up @@ -113,7 +113,7 @@ public function injectDependencies($object, $injectMethodName = self::DEFAULT_IN
$args = $this->prepareArgs($reflectedMethod, $defaults);
} catch (\Exception $e) {
$msg = $e->getMessage();
if($e->getPrevious()){ // injection failed because PHP code is invalid. See #3869
if ($e->getPrevious()) { // injection failed because PHP code is invalid. See #3869
$msg .= '; '. $e->getPrevious();
}
throw new InjectionException(
Expand Down
1 change: 0 additions & 1 deletion src/Codeception/Lib/Generator/GherkinSnippets.php
Expand Up @@ -6,7 +6,6 @@
use Codeception\Util\Template;
use Symfony\Component\Finder\Finder;


class GherkinSnippets
{
protected $template = <<<EOF
Expand Down
2 changes: 1 addition & 1 deletion src/Codeception/Lib/ParamsLoader.php
Expand Up @@ -91,4 +91,4 @@ protected function loadEnvironmentVars()
{
return $_SERVER;
}
}
}
4 changes: 2 additions & 2 deletions src/Codeception/Module/REST.php
Expand Up @@ -505,7 +505,7 @@ protected function execute($method, $url, $parameters = [], $files = [])

/**
* Check if data has non-printable bytes and it is not a valid unicode string
*
*
* @param string $data the text or binary data string
* @return boolean
*/
Expand All @@ -516,7 +516,7 @@ protected function isBinaryData($data)

/**
* Format a binary string for debug printing
*
*
* @param string $data the binary data string
* @return string the debug string
*/
Expand Down
2 changes: 0 additions & 2 deletions src/Codeception/Module/WebDriver.php
Expand Up @@ -2948,7 +2948,6 @@ public function performOn($element, $actions, $timeout = 10)
$class = get_class($e); // rethrow exception for a specific action
throw new $class($e->getMessage() . "\nat $step", $e->getResults());
}

}
$this->setBaseElement();
}
Expand All @@ -2961,5 +2960,4 @@ protected function setBaseElement($element = null)
}
$this->baseElement = $this->matchFirstOrFail($this->webDriver, $element);
}

}
3 changes: 0 additions & 3 deletions src/Codeception/PHPUnit/ResultPrinter/HTML.php
Expand Up @@ -107,14 +107,12 @@ public function endTest(\PHPUnit_Framework_Test $test, $time)

foreach ($steps as $step) {
if ($step->getMetaStep()) {

if (! empty($subStepsRendered[$step->getMetaStep()->getAction()])) {
$subStepsBuffer = implode('', $subStepsRendered[$step->getMetaStep()->getAction()]);
unset($subStepsRendered[$step->getMetaStep()->getAction()]);

$stepsBuffer .= $this->renderSubsteps($step->getMetaStep(), $subStepsBuffer);
}

} else {
$stepsBuffer .= $this->renderStep($step);
}
Expand Down Expand Up @@ -148,7 +146,6 @@ public function endTest(\PHPUnit_Framework_Test $test, $time)
$localPath = PathResolver::getRelativeDir($reports['html'], codecept_output_dir());
$html = "<tr><td class='error'>See <a href='$localPath' target='_blank'>HTML snapshot</a> of a failed page</td></tr>";
}

}

$toggle = $stepsBuffer ? '<span class="toggle">+</span>' : '';
Expand Down
1 change: 0 additions & 1 deletion src/Codeception/Subscriber/GracefulTermination.php
Expand Up @@ -6,7 +6,6 @@
use Codeception\Events;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;


class GracefulTermination implements EventSubscriberInterface
{
const SIGNAL_FUNC = 'pcntl_signal';
Expand Down
1 change: 0 additions & 1 deletion src/Codeception/Test/Interfaces/ScenarioDriven.php
@@ -1,7 +1,6 @@
<?php
namespace Codeception\Test\Interfaces;


interface ScenarioDriven
{
public function getFeature();
Expand Down
6 changes: 4 additions & 2 deletions src/Codeception/Util/ActionSequence.php
@@ -1,5 +1,6 @@
<?php
namespace Codeception\Util;

/**
* Class for defining an array actions to be executed inside `performOn` of WebDriver
*
Expand Down Expand Up @@ -46,7 +47,8 @@ class ActionSequence
* Creates an instance
* @return ActionSequence
*/
public static function build() {
public static function build()
{
return new self;
}

Expand All @@ -64,4 +66,4 @@ public function toArray()
{
return $this->actions;
}
}
}

0 comments on commit 58f1463

Please sign in to comment.