Skip to content

Commit 58f1463

Browse files
authored
codestyle fixes (Codeception#3994)
1 parent ed549a9 commit 58f1463

11 files changed

Lines changed: 12 additions & 19 deletions

File tree

RoboFile.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -869,17 +869,17 @@ protected function documentApiClass($file, $className, $all = false)
869869

870870
$this->taskGenDoc($file)
871871
->docClass($className)
872-
->filterMethods(function(ReflectionMethod $r) use ($all, $className) {
872+
->filterMethods(function (ReflectionMethod $r) use ($all, $className) {
873873
return $all || $r->isPublic();
874874
})
875875
->append(
876876
'<p>&nbsp;</p><div class="alert alert-warning">Reference is taken from the source code. '
877877
. '<a href="' . $source . '">Help us to improve documentation. Edit module reference</a></div>'
878878
)
879-
->processPropertySignature(function($r) {
879+
->processPropertySignature(function ($r) {
880880
return "\n#### $" . $r->name. "\n\n";
881881
})
882-
->processPropertyDocBlock(function($r, $text) {
882+
->processPropertyDocBlock(function ($r, $text) {
883883
$modifiers = implode(' ', \Reflection::getModifierNames($r->getModifiers()));
884884
$text = ' *' . $modifiers . '* **$' . $r->name . "**\n" . $text;
885885
$text = preg_replace("~@(.*?)\s(.*)~", 'type `$2`', $text);
@@ -890,7 +890,7 @@ function (ReflectionClass $r, $text) {
890890
return $text . "\n";
891891
}
892892
)
893-
->processMethodSignature(function($r, $text) {
893+
->processMethodSignature(function ($r, $text) {
894894
return "#### {$r->name}()\n\n" . ltrim($text, '#');
895895
})
896896
->processMethodDocBlock(

src/Codeception/Command/ConfigValidate.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ public function execute(InputInterface $input, OutputInterface $output)
5757
$this->addStyles($output);
5858

5959
if ($suite = $input->getArgument('suite')) {
60-
6160
$output->write("Validating <bold>$suite</bold> config... ");
6261
$config = $this->getSuiteConfig($suite, $input->getOption('config'));
6362
$output->writeln("Ok");

src/Codeception/Lib/Di.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ public function injectDependencies($object, $injectMethodName = self::DEFAULT_IN
113113
$args = $this->prepareArgs($reflectedMethod, $defaults);
114114
} catch (\Exception $e) {
115115
$msg = $e->getMessage();
116-
if($e->getPrevious()){ // injection failed because PHP code is invalid. See #3869
116+
if ($e->getPrevious()) { // injection failed because PHP code is invalid. See #3869
117117
$msg .= '; '. $e->getPrevious();
118118
}
119119
throw new InjectionException(

src/Codeception/Lib/Generator/GherkinSnippets.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
use Codeception\Util\Template;
77
use Symfony\Component\Finder\Finder;
88

9-
109
class GherkinSnippets
1110
{
1211
protected $template = <<<EOF

src/Codeception/Lib/ParamsLoader.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,4 +91,4 @@ protected function loadEnvironmentVars()
9191
{
9292
return $_SERVER;
9393
}
94-
}
94+
}

src/Codeception/Module/REST.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -505,7 +505,7 @@ protected function execute($method, $url, $parameters = [], $files = [])
505505

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

517517
/**
518518
* Format a binary string for debug printing
519-
*
519+
*
520520
* @param string $data the binary data string
521521
* @return string the debug string
522522
*/

src/Codeception/Module/WebDriver.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2948,7 +2948,6 @@ public function performOn($element, $actions, $timeout = 10)
29482948
$class = get_class($e); // rethrow exception for a specific action
29492949
throw new $class($e->getMessage() . "\nat $step", $e->getResults());
29502950
}
2951-
29522951
}
29532952
$this->setBaseElement();
29542953
}
@@ -2961,5 +2960,4 @@ protected function setBaseElement($element = null)
29612960
}
29622961
$this->baseElement = $this->matchFirstOrFail($this->webDriver, $element);
29632962
}
2964-
29652963
}

src/Codeception/PHPUnit/ResultPrinter/HTML.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,14 +107,12 @@ public function endTest(\PHPUnit_Framework_Test $test, $time)
107107

108108
foreach ($steps as $step) {
109109
if ($step->getMetaStep()) {
110-
111110
if (! empty($subStepsRendered[$step->getMetaStep()->getAction()])) {
112111
$subStepsBuffer = implode('', $subStepsRendered[$step->getMetaStep()->getAction()]);
113112
unset($subStepsRendered[$step->getMetaStep()->getAction()]);
114113

115114
$stepsBuffer .= $this->renderSubsteps($step->getMetaStep(), $subStepsBuffer);
116115
}
117-
118116
} else {
119117
$stepsBuffer .= $this->renderStep($step);
120118
}
@@ -148,7 +146,6 @@ public function endTest(\PHPUnit_Framework_Test $test, $time)
148146
$localPath = PathResolver::getRelativeDir($reports['html'], codecept_output_dir());
149147
$html = "<tr><td class='error'>See <a href='$localPath' target='_blank'>HTML snapshot</a> of a failed page</td></tr>";
150148
}
151-
152149
}
153150

154151
$toggle = $stepsBuffer ? '<span class="toggle">+</span>' : '';

src/Codeception/Subscriber/GracefulTermination.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
use Codeception\Events;
77
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
88

9-
109
class GracefulTermination implements EventSubscriberInterface
1110
{
1211
const SIGNAL_FUNC = 'pcntl_signal';

src/Codeception/Test/Interfaces/ScenarioDriven.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
<?php
22
namespace Codeception\Test\Interfaces;
33

4-
54
interface ScenarioDriven
65
{
76
public function getFeature();

0 commit comments

Comments
 (0)