Fixed whitespace
This commit is contained in:
parent
b8f90dbd95
commit
13d77dd14a
57 changed files with 3545 additions and 3539 deletions
|
@ -145,12 +145,6 @@
|
|||
<!-- 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) -->
|
||||
<!-- sl = same line -->
|
||||
<!-- nl = new line -->
|
||||
|
|
|
@ -108,7 +108,7 @@ class EnumHelper
|
|||
throw new \DomainException(sprintf(
|
||||
'Unrecognized value: %s.' . PHP_EOL . 'Possible values: %s',
|
||||
$enumString,
|
||||
join(', ', array_keys($lowerEnumMap))));
|
||||
implode(', ', array_keys($lowerEnumMap))));
|
||||
}
|
||||
|
||||
return $lowerEnumMap[$key];
|
||||
|
|
|
@ -39,7 +39,7 @@ class HttpHelper
|
|||
$result = [];
|
||||
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)))));
|
||||
$result[$key] = $value;
|
||||
|
|
|
@ -33,7 +33,12 @@ abstract class AbstractSearchParserConfig
|
|||
|
||||
throw new NotSupportedException('Unknown order term: ' . $tokenValue
|
||||
. '. 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)
|
||||
|
@ -261,6 +266,11 @@ abstract class AbstractSearchParserConfig
|
|||
throw new NotSupportedException(
|
||||
'Unknown search key: ' . $key
|
||||
. '. Possible search keys: '
|
||||
. join(', ', array_map(function($item) { return join('/', $item->aliases); }, $parsers)));
|
||||
. implode(
|
||||
', ',
|
||||
array_map(function($item)
|
||||
{
|
||||
return implode('/', $item->aliases);
|
||||
}, $parsers)));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -90,7 +90,7 @@ class SearchParser
|
|||
|
||||
if ($negated)
|
||||
{
|
||||
$orderDir = $orderDir == IFilter::ORDER_DESC
|
||||
$orderDir = $orderDir === IFilter::ORDER_DESC
|
||||
? IFilter::ORDER_ASC
|
||||
: IFilter::ORDER_DESC;
|
||||
}
|
||||
|
|
|
@ -110,11 +110,11 @@ class ImageConverter
|
|||
|
||||
private function convertWithPrograms($programs, $targetPath)
|
||||
{
|
||||
$any_program_available = false;
|
||||
$anyProgramAvailable = false;
|
||||
foreach ($programs as $program => $args)
|
||||
$any_program_available |= ProgramExecutor::isProgramAvailable($program);
|
||||
if (!$any_program_available)
|
||||
throw new \Exception('No converter available (tried ' . join(', ', array_keys($programs)) . ')');
|
||||
$anyProgramAvailable |= ProgramExecutor::isProgramAvailable($program);
|
||||
if (!$anyProgramAvailable)
|
||||
throw new \Exception('No converter available (tried ' . implode(', ', array_keys($programs)) . ')');
|
||||
|
||||
$errors = [];
|
||||
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)
|
||||
|
|
|
@ -7,7 +7,7 @@ class ImagickImageManipulator implements IImageManipulator
|
|||
{
|
||||
$image = new \Imagick();
|
||||
$image->readImageBlob($source);
|
||||
if ($image->getImageFormat() == 'GIF')
|
||||
if ($image->getImageFormat() === 'GIF')
|
||||
$image = $image->coalesceImages();
|
||||
return $image;
|
||||
}
|
||||
|
|
|
@ -41,7 +41,9 @@ class Upgrade38 implements IUpgrade
|
|||
$post->setContentType(Post::POST_TYPE_ANIMATED_IMAGE);
|
||||
$this->postDao->save($post);
|
||||
}
|
||||
if (++ $progress == 100)
|
||||
|
||||
$progress++;
|
||||
if ($progress === 100)
|
||||
{
|
||||
echo '.';
|
||||
$progress = 0;
|
||||
|
|
Loading…
Reference in a new issue