Skip to content

Commit

Permalink
Merge pull request #265 from sculpin/analysis-qrROZq
Browse files Browse the repository at this point in the history
Applied fixes from StyleCI
  • Loading branch information
simensen committed Aug 1, 2015
2 parents 48aebcc + b7fdabe commit 476f382
Show file tree
Hide file tree
Showing 14 changed files with 240 additions and 235 deletions.
5 changes: 2 additions & 3 deletions src/Sculpin/Bundle/MarkdownBundle/MarkdownConverter.php
Expand Up @@ -94,7 +94,8 @@ public function beforeRun(SourceSetEvent $sourceSetEvent)
* @param string $headerText raw markdown input for the header name
* @return string
*/
public function generateHeaderId($headerText) {
public function generateHeaderId($headerText)
{

// $headerText is completely raw markdown input. We need to strip it
// from all markup, because we are only interested in the actual 'text'
Expand Down Expand Up @@ -127,7 +128,5 @@ public function generateHeaderId($headerText) {
return rawurlencode(strtolower(
strtr($result, $map)
));

}

}
Expand Up @@ -10,7 +10,6 @@
*/
class PhpMarkdownExtraParser extends MarkdownExtra implements ParserInterface
{

/**
* {@inheritdoc}
*/
Expand Down
1 change: 0 additions & 1 deletion src/Sculpin/Bundle/MarkdownBundle/PhpMarkdownParser.php
Expand Up @@ -10,7 +10,6 @@
*/
class PhpMarkdownParser extends Markdown implements ParserInterface
{

/**
* {@inheritdoc}
*/
Expand Down
Expand Up @@ -100,7 +100,6 @@ protected function execute(InputInterface $input, OutputInterface $output)

if (!file_put_contents($tempFilename, file_get_contents($remoteFilename, false, $this->getStreamContext()))) {
$output->writeln('<error>The download of the new Sculpin version failed for an unexpected reason');

}

if (!file_exists($tempFilename)) {
Expand Down
Expand Up @@ -47,7 +47,6 @@ private function setReversed($direction)
throw new \InvalidArgumentException('Invalid value passed for direction, must be one of: asc, ascending, desc, descending');

}

}

public function sort(ProxySourceItem $a, ProxySourceItem $b)
Expand Down
2 changes: 0 additions & 2 deletions src/Sculpin/Contrib/Taxonomy/PermalinkStrategyCollection.php
Expand Up @@ -15,7 +15,6 @@

class PermalinkStrategyCollection
{

protected $strategies;

public function __construct()
Expand All @@ -36,5 +35,4 @@ public function process($str)

return $str;
}

}
1 change: 0 additions & 1 deletion src/Sculpin/Core/Converter/ParserInterface.php
Expand Up @@ -7,7 +7,6 @@
*/
interface ParserInterface
{

/**
* @param string $content
*
Expand Down
2 changes: 1 addition & 1 deletion src/Sculpin/Core/Formatter/FormatterInterface.php
Expand Up @@ -18,7 +18,7 @@
*/
interface FormatterInterface
{
/**
/**
* Format the input blocks
*
* @param FormatContext $formatContext Format context
Expand Down
1 change: 0 additions & 1 deletion src/Sculpin/Core/Output/SourceOutput.php
Expand Up @@ -20,7 +20,6 @@
*/
class SourceOutput implements OutputInterface
{

/**
* Source
*
Expand Down
Expand Up @@ -19,7 +19,7 @@ public function process(SourceInterface $source)
{
if (!$source->data()->get('calculated_date')) {
if (preg_match('/(\d{4})[\/\-]*(\d{2})[\/\-]*(\d{2})[\/\-]*(\d+|)/', $source->relativePathname(), $matches)) {
list ($dummy, $year, $month, $day, $time) = $matches;
list($dummy, $year, $month, $day, $time) = $matches;
$parts = array(implode('-', array($year, $month, $day)));
if ($time && false !== strtotime($time)) {
$parts[] = $time;
Expand Down
1 change: 0 additions & 1 deletion src/Sculpin/Core/Source/SourceInterface.php
Expand Up @@ -21,7 +21,6 @@
*/
interface SourceInterface
{

/**
* Source ID
*
Expand Down
3 changes: 1 addition & 2 deletions src/Sculpin/Core/Tests/Source/FileSourceTest.php
Expand Up @@ -9,7 +9,6 @@

class FileSourceTest extends \PHPUnit_Framework_TestCase
{

/*
* mock analyzer for detectFromFilename, should return text/html
*
Expand Down Expand Up @@ -104,7 +103,7 @@ public function provideTestParseYaml()

public function getErrorMessage($filename, $msg)
{
if ($msg == ''){
if ($msg == '') {
return '';
}
return ' ! FileSource:FilesystemDataSource:test:' . $filename . ' ' . $msg . ' !' . PHP_EOL;
Expand Down

0 comments on commit 476f382

Please sign in to comment.