Skip to content

Commit

Permalink
Merge pull request #4138 from neos/analysis-o72VmP
Browse files Browse the repository at this point in the history
TASK: Apply fixes from StyleCI
  • Loading branch information
kdambekalns committed Mar 24, 2023
2 parents f7ae71c + 2d07a58 commit a90104a
Show file tree
Hide file tree
Showing 64 changed files with 33 additions and 93 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
*/
interface EventDispatchingNodeCommandControllerPluginInterface extends NodeCommandControllerPluginInterface
{

/**
* Entering a task. Event arguments are $taskDescription, $taskClosure (only executed if not in dry-run) and (optionally) a $requiresConfirmation flag
*/
Expand Down
1 change: 0 additions & 1 deletion Neos.ContentRepository/Classes/Domain/Model/NodeData.php
Original file line number Diff line number Diff line change
Expand Up @@ -882,7 +882,6 @@ public function move($targetPath, Workspace $targetWorkspace)

if ($this->workspace->getName() !== $targetWorkspace->getName()) {
if ($targetPath === $originalPath) {

// The existing shadow node in the target workspace will be used as the actual moved node
$movedNodeDataInTargetWorkspace = $targetPathShadowNodeData->getMovedTo();
if ($movedNodeDataInTargetWorkspace !== null) {
Expand Down
2 changes: 1 addition & 1 deletion Neos.ContentRepository/Classes/Domain/Model/NodeType.php
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,7 @@ public function getDefaultValuesForProperties()
switch ($type) {
case 'DateTime':
$defaultValues[$propertyName] = new \DateTime($propertyConfiguration['defaultValue']);
break;
break;
default:
$defaultValues[$propertyName] = $propertyConfiguration['defaultValue'];
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1360,7 +1360,6 @@ protected function reduceNodeVariantsByWorkspaces(array $nodes, array $workspace
$minimalPositionByIdentifier = [];
/** @var $node NodeData */
foreach ($nodes as $node) {

// Find the position of the workspace, a smaller value means more priority
$workspaceNames = array_map(
function (Workspace $workspace) {
Expand Down Expand Up @@ -1722,10 +1721,10 @@ protected function buildQueryBuilderForRelationMap($relationMap)
switch ($this->entityManager->getConnection()->getDatabasePlatform()->getName()) {
case 'postgresql':
$parameters['asset' . md5($relatedIdentifier)] = '%asset://' . strtolower($relatedIdentifier) . '%';
break;
break;
case 'sqlite':
$parameters['asset' . md5($relatedIdentifier)] = '%asset:\/\/' . strtolower($relatedIdentifier) . '%';
break;
break;
default:
$parameters['asset' . md5($relatedIdentifier)] = '%asset:\\\\/\\\\/' . strtolower($relatedIdentifier) . '%';
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@
*/
class NodeMoveIntegrityCheckService
{

/**
* @Flow\Inject
* @var ContentDimensionCombinator
Expand Down
6 changes: 3 additions & 3 deletions Neos.ContentRepository/Classes/Domain/Utility/NodePaths.php
Original file line number Diff line number Diff line change
Expand Up @@ -179,13 +179,13 @@ public static function replaceRelativePathElements($path)
switch ($pathSegment) {
case '.':
continue 2;
break;
break;
case '..':
$absolutePath = NodePaths::getParentPath($absolutePath);
break;
break;
default:
$absolutePath = NodePaths::addNodePathSegment($absolutePath, $pathSegment);
break;
break;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
*/
class ToStringFunction extends FunctionNode
{

/**
* @var mixed
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
*/
class NodePrivilegeContext
{

/**
* @Flow\Inject
* @var TransientNodeCache
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
*/
class TransientNodeCache
{

/**
* @var NodeInterface[]
*/
Expand Down
12 changes: 6 additions & 6 deletions Neos.ContentRepository/Classes/TypeConverter/NodeConverter.php
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ protected function setNodeProperties($nodeLike, NodeType $nodeType, array $prope
switch ($nodePropertyType) {
case 'reference':
$nodePropertyValue = $context->getNodeByIdentifier($nodePropertyValue);
break;
break;
case 'references':
$nodeIdentifiers = json_decode($nodePropertyValue);
$nodePropertyValue = [];
Expand All @@ -223,25 +223,25 @@ protected function setNodeProperties($nodeLike, NodeType $nodeType, array $prope
} elseif ($nodeIdentifiers !== null) {
throw new TypeConverterException(sprintf('node type "%s" expects an array of identifiers for its property "%s"', $nodeType->getName(), $nodePropertyName), 1383587419);
}
break;
break;
case 'DateTime':
if ($nodePropertyValue !== '' && ($nodePropertyValue = \DateTime::createFromFormat(\DateTime::W3C, $nodePropertyValue)) !== false) {
$nodePropertyValue->setTimezone(new \DateTimeZone(date_default_timezone_get()));
} else {
$nodePropertyValue = null;
}
break;
break;
case 'integer':
$nodePropertyValue = intval($nodePropertyValue);
break;
break;
case 'boolean':
if (is_string($nodePropertyValue)) {
$nodePropertyValue = $nodePropertyValue === 'true' ? true : false;
}
break;
break;
case 'array':
$nodePropertyValue = json_decode($nodePropertyValue, true);
break;
break;
}
if (substr($nodePropertyName, 0, 1) === '_') {
$nodePropertyName = substr($nodePropertyName, 1);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,6 @@ public function iPublishTheWorkspace($sourceWorkspaceName)
if ($this->isolated === true) {
$this->callStepInSubProcess(__METHOD__, sprintf(' %s %s', 'string', escapeshellarg($sourceWorkspaceName)));
} else {

/**
* FIXME: Workspace properties from the previous workspace
* like fallback dimensions are not available from this point forward.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
*/
class FirstLevelNodeCacheTest extends UnitTestCase
{

/**
* @test
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
*/
class FilterOperationTest extends AbstractQueryOperationsTest
{

/**
* @test
*/
Expand Down
1 change: 0 additions & 1 deletion Neos.Fusion.Afx/Classes/Dsl/AfxDslImplementation.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
*/
class AfxDslImplementation implements DslInterface
{

/**
* Transpile the given dsl-code to fusion-code
*
Expand Down
1 change: 0 additions & 1 deletion Neos.Fusion.Afx/Tests/Functional/AfxServiceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

class AfxServiceTest extends TestCase
{

/**
* @test
*/
Expand Down
1 change: 0 additions & 1 deletion Neos.Fusion.Afx/Tests/Functional/ParserTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

class ParserTest extends TestCase
{

/**
* @test
*/
Expand Down
1 change: 0 additions & 1 deletion Neos.Fusion/Classes/Core/RuntimeConfiguration.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
*/
final class RuntimeConfiguration
{

/**
* The parsed Fusion configuration
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
*/
class AugmenterImplementation extends JoinImplementation
{

/**
* @var HtmlAugmenter
* @Flow\Inject
Expand Down
1 change: 0 additions & 1 deletion Neos.Fusion/Classes/FusionObjects/Helpers/LazyProps.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
*/
final class LazyProps implements \ArrayAccess, \Iterator, \JsonSerializable
{

/**
* @var array
*/
Expand Down
1 change: 0 additions & 1 deletion Neos.Fusion/Classes/FusionObjects/JoinImplementation.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
*/
class JoinImplementation extends DataStructureImplementation
{

/**
* Get the glue to insert between items
*
Expand Down
1 change: 0 additions & 1 deletion Neos.Fusion/Classes/FusionObjects/LoopImplementation.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
*/
class LoopImplementation extends MapImplementation
{

/**
* Get the glue to insert between items
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
*/
class RendererImplementation extends AbstractFusionObject
{

/**
* The type to render if condition is true
*
Expand Down
1 change: 0 additions & 1 deletion Neos.Fusion/Classes/ViewHelpers/FusionContextTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
*/
trait FusionContextTrait
{

/**
* Get a variable value from the Fusion runtime context.
*
Expand Down
1 change: 0 additions & 1 deletion Neos.Fusion/Tests/Benchmark/RuntimeBench.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
*/
class RuntimeBench
{

/**
* @var \Neos\Fusion\Core\Runtime
*/
Expand Down
1 change: 0 additions & 1 deletion Neos.Fusion/Tests/Functional/Parser/FusionParserTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
*/
class FusionParserTest extends FunctionalTestCase
{

/**
* @test
*/
Expand Down
1 change: 0 additions & 1 deletion Neos.Fusion/Tests/Unit/Core/Cache/ContentCacheTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
*/
class ContentCacheTest extends UnitTestCase
{

/**
* @return array
*/
Expand Down
1 change: 0 additions & 1 deletion Neos.Fusion/Tests/Unit/Core/RuntimeConfigurationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

class RuntimeConfigurationTest extends UnitTestCase
{

/**
* @test
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -320,15 +320,15 @@ protected function calculateDimensions(BoxInterface $originalDimensions): BoxInt
// height and width are set explicitly:
case ($this->width !== null && $this->height !== null):
$newDimensions = $this->calculateWithFixedDimensions($originalDimensions, $this->width, $this->height);
break;
// only width is set explicitly:
break;
// only width is set explicitly:
case ($this->width !== null):
$newDimensions = $this->calculateScalingToWidth($originalDimensions, $this->width);
break;
// only height is set explicitly:
break;
// only height is set explicitly:
case ($this->height !== null):
$newDimensions = $this->calculateScalingToHeight($originalDimensions, $this->height);
break;
break;
}

// We apply maximum dimensions and scale the new dimensions proportionally down to fit into the maximum.
Expand Down
1 change: 0 additions & 1 deletion Neos.Media/Classes/Domain/Model/Dto/UsageReference.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
*/
class UsageReference
{

/**
* @var AssetInterface
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
*/
abstract class AbstractAssetUsageStrategy implements AssetUsageStrategyInterface
{

/**
* Returns true if the asset is used.
*
Expand Down
1 change: 0 additions & 1 deletion Neos.Media/Classes/Imagine/Box.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@

class Box implements BoxInterface
{

/**
* @var integer
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

class ImportedAssetRepositoryTest extends AbstractTest
{

/**
* @var boolean
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
*/
class AssetConstraintsTest extends UnitTestCase
{

/**
* @test
*/
Expand Down
1 change: 0 additions & 1 deletion Neos.Media/Tests/Unit/Domain/Service/AssetServiceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
*/
class AssetServiceTest extends UnitTestCase
{

/**
* @return array
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,13 +122,13 @@ public function getOrientationReturnsCorrectValue(string $aspectRatioAsString, s
switch ($expectedOrientation) {
case AspectRatio::ORIENTATION_LANDSCAPE:
self::assertTrue($aspectRatio->isOrientationLandscape());
break;
break;
case AspectRatio::ORIENTATION_PORTRAIT:
self::assertTrue($aspectRatio->isOrientationPortrait());
break;
break;
case AspectRatio::ORIENTATION_SQUARE:
self::assertTrue($aspectRatio->isOrientationSquare());
break;
break;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
*/
class NodeTypeConfigurationEnrichmentAspect
{

/**
* @var array
* @Flow\InjectConfiguration(package="Neos.Neos", path="userInterface.inspector.dataTypes")
Expand Down
1 change: 0 additions & 1 deletion Neos.Neos/Classes/Command/WorkspaceCommandController.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
*/
class WorkspaceCommandController extends CommandController
{

/**
* @Flow\Inject
* @var PublishingService
Expand Down
1 change: 0 additions & 1 deletion Neos.Neos/Classes/Controller/Backend/BackendController.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
*/
class BackendController extends ActionController
{

/**
* @Flow\Inject
* @var BackendRedirectionService
Expand Down
1 change: 0 additions & 1 deletion Neos.Neos/Classes/Controller/LoginController.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
*/
class LoginController extends AbstractAuthenticationController
{

/**
* @var string
*/
Expand Down

0 comments on commit a90104a

Please sign in to comment.