Fixed whitespace

This commit is contained in:
rr- 2015-11-25 09:48:03 +01:00
parent b8f90dbd95
commit 13d77dd14a
57 changed files with 3545 additions and 3539 deletions

View file

@ -145,12 +145,6 @@
<!-- Indentation --> <!-- Indentation -->
<!-- **************** --> <!-- **************** -->
<!-- Tests to make sure that a line does not contain the tab character. -->
<test name="indentation"> <!-- noTabs -->
<property name="type" value="tabs"/> <!-- tabs or spaces -->
<property name="number" value="4"/> <!-- number of spaces if type = spaces -->
</test>
<!-- Check the position of the open curly brace in a control structure (if) --> <!-- Check the position of the open curly brace in a control structure (if) -->
<!-- sl = same line --> <!-- sl = same line -->
<!-- nl = new line --> <!-- nl = new line -->

View file

@ -108,7 +108,7 @@ class EnumHelper
throw new \DomainException(sprintf( throw new \DomainException(sprintf(
'Unrecognized value: %s.' . PHP_EOL . 'Possible values: %s', 'Unrecognized value: %s.' . PHP_EOL . 'Possible values: %s',
$enumString, $enumString,
join(', ', array_keys($lowerEnumMap)))); implode(', ', array_keys($lowerEnumMap))));
} }
return $lowerEnumMap[$key]; return $lowerEnumMap[$key];

View file

@ -39,7 +39,7 @@ class HttpHelper
$result = []; $result = [];
foreach ($_SERVER as $key => $value) foreach ($_SERVER as $key => $value)
{ {
if (substr($key, 0, 5) == "HTTP_") if (substr($key, 0, 5) === "HTTP_")
{ {
$key = str_replace(" ", "-", ucwords(strtolower(str_replace("_", " ", substr($key, 5))))); $key = str_replace(" ", "-", ucwords(strtolower(str_replace("_", " ", substr($key, 5)))));
$result[$key] = $value; $result[$key] = $value;

View file

@ -33,7 +33,12 @@ abstract class AbstractSearchParserConfig
throw new NotSupportedException('Unknown order term: ' . $tokenValue throw new NotSupportedException('Unknown order term: ' . $tokenValue
. '. Possible order terms: ' . '. Possible order terms: '
. join(', ', array_map(function($term) { return join('/', $term[0]); }, $map))); . implode(
', ',
array_map(function($term)
{
return implode('/', $term[0]);
}, $map)));
} }
public function getRequirementForBasicToken(SearchToken $token) public function getRequirementForBasicToken(SearchToken $token)
@ -261,6 +266,11 @@ abstract class AbstractSearchParserConfig
throw new NotSupportedException( throw new NotSupportedException(
'Unknown search key: ' . $key 'Unknown search key: ' . $key
. '. Possible search keys: ' . '. Possible search keys: '
. join(', ', array_map(function($item) { return join('/', $item->aliases); }, $parsers))); . implode(
', ',
array_map(function($item)
{
return implode('/', $item->aliases);
}, $parsers)));
} }
} }

View file

@ -90,7 +90,7 @@ class SearchParser
if ($negated) if ($negated)
{ {
$orderDir = $orderDir == IFilter::ORDER_DESC $orderDir = $orderDir === IFilter::ORDER_DESC
? IFilter::ORDER_ASC ? IFilter::ORDER_ASC
: IFilter::ORDER_DESC; : IFilter::ORDER_DESC;
} }

View file

@ -110,11 +110,11 @@ class ImageConverter
private function convertWithPrograms($programs, $targetPath) private function convertWithPrograms($programs, $targetPath)
{ {
$any_program_available = false; $anyProgramAvailable = false;
foreach ($programs as $program => $args) foreach ($programs as $program => $args)
$any_program_available |= ProgramExecutor::isProgramAvailable($program); $anyProgramAvailable |= ProgramExecutor::isProgramAvailable($program);
if (!$any_program_available) if (!$anyProgramAvailable)
throw new \Exception('No converter available (tried ' . join(', ', array_keys($programs)) . ')'); throw new \Exception('No converter available (tried ' . implode(', ', array_keys($programs)) . ')');
$errors = []; $errors = [];
foreach ($programs as $program => $args) foreach ($programs as $program => $args)
@ -127,7 +127,7 @@ class ImageConverter
} }
} }
throw new \Exception('Error while converting file to image: ' . join(', ', $errors)); throw new \Exception('Error while converting file to image: ' . implode(', ', $errors));
} }
private function deleteIfExists($path) private function deleteIfExists($path)

View file

@ -7,7 +7,7 @@ class ImagickImageManipulator implements IImageManipulator
{ {
$image = new \Imagick(); $image = new \Imagick();
$image->readImageBlob($source); $image->readImageBlob($source);
if ($image->getImageFormat() == 'GIF') if ($image->getImageFormat() === 'GIF')
$image = $image->coalesceImages(); $image = $image->coalesceImages();
return $image; return $image;
} }

View file

@ -41,7 +41,9 @@ class Upgrade38 implements IUpgrade
$post->setContentType(Post::POST_TYPE_ANIMATED_IMAGE); $post->setContentType(Post::POST_TYPE_ANIMATED_IMAGE);
$this->postDao->save($post); $this->postDao->save($post);
} }
if (++ $progress == 100)
$progress++;
if ($progress === 100)
{ {
echo '.'; echo '.';
$progress = 0; $progress = 0;