Skip to content

Commit

Permalink
Fix php-cs
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-schranz committed Sep 14, 2021
1 parent 9e220e8 commit 45f5095
Show file tree
Hide file tree
Showing 12 changed files with 41 additions and 41 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
/php-coveralls.phar

# php-cs
.php_cs.cache
.php-cs-fixer.cache

# System files
.DS_Store
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@

interface ContentWorkflowInterface
{
const CONTENT_RICH_ENTITY_CONTEXT_KEY = 'contentRichEntity';
const DIMENSION_CONTENT_COLLECTION_CONTEXT_KEY = 'dimensionContentCollection';
const DIMENSION_ATTRIBUTES_CONTEXT_KEY = 'dimensionAttributes';
public const CONTENT_RICH_ENTITY_CONTEXT_KEY = 'contentRichEntity';
public const DIMENSION_CONTENT_COLLECTION_CONTEXT_KEY = 'dimensionContentCollection';
public const DIMENSION_ATTRIBUTES_CONTEXT_KEY = 'dimensionAttributes';

/**
* @param mixed[] $dimensionAttributes
Expand Down
4 changes: 2 additions & 2 deletions Content/Domain/Model/DimensionContentInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@

interface DimensionContentInterface
{
const STAGE_DRAFT = 'draft';
const STAGE_LIVE = 'live';
public const STAGE_DRAFT = 'draft';
public const STAGE_LIVE = 'live';

public static function getResourceKey(): string;

Expand Down
28 changes: 14 additions & 14 deletions Content/Domain/Model/WorkflowInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,33 +17,33 @@ interface WorkflowInterface
{
// See https://github.com/sulu/SuluContentBundle/pull/53 for graphic about workflow

const WORKFLOW_PLACE_UNPUBLISHED = 'unpublished'; // was never published or set to review
public const WORKFLOW_PLACE_UNPUBLISHED = 'unpublished'; // was never published or set to review

const WORKFLOW_PLACE_REVIEW = 'review'; // unpublished changes are in review
public const WORKFLOW_PLACE_REVIEW = 'review'; // unpublished changes are in review

const WORKFLOW_PLACE_PUBLISHED = 'published'; // is published
public const WORKFLOW_PLACE_PUBLISHED = 'published'; // is published

const WORKFLOW_PLACE_DRAFT = 'draft'; // published but has a draft data
public const WORKFLOW_PLACE_DRAFT = 'draft'; // published but has a draft data

const WORKFLOW_PLACE_REVIEW_DRAFT = 'review_draft'; // published but has draft data in review
public const WORKFLOW_PLACE_REVIEW_DRAFT = 'review_draft'; // published but has draft data in review

const WORKFLOW_TRANSITION_REQUEST_FOR_REVIEW = 'request_for_review';
public const WORKFLOW_TRANSITION_REQUEST_FOR_REVIEW = 'request_for_review';

const WORKFLOW_TRANSITION_REJECT = 'reject';
public const WORKFLOW_TRANSITION_REJECT = 'reject';

const WORKFLOW_TRANSITION_PUBLISH = 'publish';
public const WORKFLOW_TRANSITION_PUBLISH = 'publish';

const WORKFLOW_TRANSITION_UNPUBLISH = 'unpublish';
public const WORKFLOW_TRANSITION_UNPUBLISH = 'unpublish';

const WORKFLOW_TRANSITION_CREATE_DRAFT = 'create_draft';
public const WORKFLOW_TRANSITION_CREATE_DRAFT = 'create_draft';

const WORKFLOW_TRANSITION_REMOVE_DRAFT = 'remove_draft';
public const WORKFLOW_TRANSITION_REMOVE_DRAFT = 'remove_draft';

const WORKFLOW_TRANSITION_REQUEST_FOR_REVIEW_DRAFT = 'request_for_review_draft';
public const WORKFLOW_TRANSITION_REQUEST_FOR_REVIEW_DRAFT = 'request_for_review_draft';

const WORKFLOW_TRANSITION_REJECT_DRAFT = 'reject_draft';
public const WORKFLOW_TRANSITION_REJECT_DRAFT = 'reject_draft';

const WORKFLOW_DEFAULT_NAME = 'content_workflow';
public const WORKFLOW_DEFAULT_NAME = 'content_workflow';

public static function getWorkflowName(): string;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,14 @@

class ContentSearchMetadataProvider implements ProviderInterface
{
const SEARCH_FIELD_TAG = 'sulu.search.field';
const FIELD_TEMPLATE_KEY = '_template_key';
const EXCERPT_FIELDS = [
public const SEARCH_FIELD_TAG = 'sulu.search.field';
public const FIELD_TEMPLATE_KEY = '_template_key';
public const EXCERPT_FIELDS = [
'excerptTitle',
'excerptMore',
'excerptDescription',
];
const SEO_FIELDS = [
public const SEO_FIELDS = [
'seoTitle',
'seoDescription',
'seoKeywords',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@

class ContentSitemapProvider implements SitemapProviderInterface
{
const ROUTE_ALIAS = 'route';
const CONTENT_RICH_ENTITY_ALIAS = ContentWorkflowInterface::CONTENT_RICH_ENTITY_CONTEXT_KEY;
const LOCALIZED_DIMENSION_CONTENT_ALIAS = 'localizedDimensionContent';
public const ROUTE_ALIAS = 'route';
public const CONTENT_RICH_ENTITY_ALIAS = ContentWorkflowInterface::CONTENT_RICH_ENTITY_CONTEXT_KEY;
public const LOCALIZED_DIMENSION_CONTENT_ALIAS = 'localizedDimensionContent';

/**
* @var EntityManagerInterface
Expand Down Expand Up @@ -159,7 +159,7 @@ public function getMaxPage($scheme, $host): int
->getSingleScalarResult();

return (int) \ceil($amount / self::PAGE_SIZE);
} catch (NoResultException | NonUniqueResultException $e) { // @codeCoverageIgnore
} catch (NoResultException|NonUniqueResultException $e) { // @codeCoverageIgnore
// TODO FIXME add testcase for this
return 0; // @codeCoverageIgnore
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@

class ContentDataProviderRepository implements DataProviderRepositoryInterface
{
const CONTENT_RICH_ENTITY_ALIAS = 'entity';
const LOCALIZED_DIMENSION_CONTENT_ALIAS = 'localizedContent';
const UNLOCALIZED_DIMENSION_CONTENT_ALIAS = 'unlocalizedContent';
public const CONTENT_RICH_ENTITY_ALIAS = 'entity';
public const LOCALIZED_DIMENSION_CONTENT_ALIAS = 'localizedContent';
public const UNLOCALIZED_DIMENSION_CONTENT_ALIAS = 'unlocalizedContent';

/**
* @var ContentManagerInterface
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

abstract class ContentTeaserProvider implements TeaserProviderInterface
{
const CONTENT_RICH_ENTITY_ALIAS = ContentWorkflowInterface::CONTENT_RICH_ENTITY_CONTEXT_KEY;
public const CONTENT_RICH_ENTITY_ALIAS = ContentWorkflowInterface::CONTENT_RICH_ENTITY_CONTEXT_KEY;

/**
* @var ContentManagerInterface
Expand Down
8 changes: 4 additions & 4 deletions Tests/Application/ExampleTestBundle/Admin/ExampleAdmin.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@

class ExampleAdmin extends Admin
{
const SECURITY_CONTEXT = 'sulu.example.examples';
public const SECURITY_CONTEXT = 'sulu.example.examples';

const LIST_VIEW = 'example_test.example.list';
public const LIST_VIEW = 'example_test.example.list';

const ADD_TABS_VIEW = 'example_test.example.add_tabs';
public const ADD_TABS_VIEW = 'example_test.example.add_tabs';

const EDIT_TABS_VIEW = 'example_test.example.edit_tabs';
public const EDIT_TABS_VIEW = 'example_test.example.edit_tabs';

/**
* @var ViewBuilderFactoryInterface
Expand Down
4 changes: 2 additions & 2 deletions Tests/Application/ExampleTestBundle/Entity/Example.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ class Example implements ContentRichEntityInterface
{
use ContentRichEntityTrait;

const RESOURCE_KEY = 'examples';
const TEMPLATE_TYPE = 'example';
public const RESOURCE_KEY = 'examples';
public const TEMPLATE_TYPE = 'example';

/**
* @var mixed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ class ContentSitemapProviderTest extends SuluTestCase
use AssertSnapshotTrait;
use CreateExampleTrait;

const SCHEME = 'https';
const HOST = 'localhost';
public const SCHEME = 'https';
public const HOST = 'localhost';

/**
* @var ContentSitemapProvider
Expand Down
2 changes: 1 addition & 1 deletion Tests/test-bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@
* with this source code in the file LICENSE.
*/

date_default_timezone_set('UTC');
\date_default_timezone_set('UTC');

require __DIR__ . '/Application/config/bootstrap.php';

0 comments on commit 45f5095

Please sign in to comment.