Skip to content

Commit

Permalink
[TASK] Adapt to TYPO3 V10
Browse files Browse the repository at this point in the history
  • Loading branch information
buepro committed Jun 30, 2020
1 parent 156cb97 commit 18d2b1c
Show file tree
Hide file tree
Showing 38 changed files with 1,127 additions and 841 deletions.
85 changes: 85 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
# EditorConfig is awesome: http://EditorConfig.org

# top-most EditorConfig file
root = true

# Unix-style newlines with a newline ending every file
[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

# CSS-Files
[*.css]
indent_style = space
indent_size = 4

# HTML-Files
[*.html]
indent_style = space
indent_size = 4

# TMPL-Files
[*.tmpl]
indent_style = space
indent_size = 4

# LESS-Files
[*.less]
indent_style = space
indent_size = 4

# JS-Files
[*.js]
indent_style = space
indent_size = 4

# PHP-Files
[*.php]
indent_style = space
indent_size = 4

# MD-Files
[*.md]
indent_style = space
indent_size = 4

# ReST-Files
[*.rst]
indent_style = space
indent_size = 3

# TypoScript
[*.typoscript]
indent_style = space
indent_size = 4

# TSconfig
[*.tsconfig]
indent_style = space
indent_size = 4

# YML-Files
[{*.yml,*.yaml}]
indent_style = space
indent_size = 4

# package.json
[package.json]
indent_style = space
indent_size = 2

# composer.json
[composer.json]
indent_style = space
indent_size = 4

# XLF-Files
[*.xlf]
indent_style = tab

# SQL-Files
[*.sql]
indent_style = tab
indent_size = 2
35 changes: 35 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Folders
/.ddev export-ignore
/.github export-ignore
/.vscode export-ignore
/Build export-ignore

# Files
.editorconfig export-ignore
.gitattributes export-ignore
.gitignore export-ignore
.php_cs.dist export-ignore
.scrutinizer.yml export-ignore
.travis.yml export-ignore

# Enforce checkout with linux lf consistent over all plattforms
*.xml text eol=lf
*.html text eol=lf
*.css text eol=lf
*.scss text eol=lf
*.svg text eol=lf
*.tmpl text eol=lf
*.less text eol=lf
*.js text eol=lf
*.json text eol=lf
*.php text eol=lf
*.rst text eol=lf
*.md text eol=lf
*.yml text eol=lf
*.ts text eol=lf
*.xlf text eol=lf
*.sql text eol=lf
*.t3s text eol=lf
*.txt text eol=lf
*.typoscript text eol=lf
*.tsconfig text eol=lf
1 change: 1 addition & 0 deletions .php_cs.cache
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"php":"7.1.3","version":"2.13.0:v2.13.0#7136aa4e0c5f912e8af82383775460d906168a10","rules":{"blank_line_after_namespace":true,"braces":true,"class_definition":true,"elseif":true,"function_declaration":true,"indentation_type":true,"line_ending":true,"lowercase_constants":true,"lowercase_keywords":true,"method_argument_space":{"on_multiline":"ensure_fully_multiline"},"no_break_comment":true,"no_closing_tag":true,"no_spaces_after_function_name":true,"no_spaces_inside_parenthesis":true,"no_trailing_whitespace":true,"no_trailing_whitespace_in_comment":true,"single_blank_line_at_eof":true,"single_class_element_per_statement":{"elements":["property"]},"single_import_per_statement":true,"single_line_after_imports":true,"switch_case_semicolon_to_colon":true,"switch_case_space":true,"visibility_required":true,"encoding":true,"full_opening_tag":true,"header_comment":{"header":"This file is part of the package Buepro\/Realer.\n\nFor the full copyright and license information, please read the\nLICENSE file that was distributed with this source code."},"general_phpdoc_annotation_remove":["author"],"no_leading_import_slash":true,"no_trailing_comma_in_singleline_array":true,"no_singleline_whitespace_before_semicolons":true,"no_unused_imports":true,"concat_space":{"spacing":"one"},"no_whitespace_in_blank_line":true,"ordered_imports":true,"single_quote":true,"no_empty_statement":true,"no_extra_consecutive_blank_lines":true,"phpdoc_no_package":true,"phpdoc_scalar":true,"no_blank_lines_after_phpdoc":true,"array_syntax":{"syntax":"short"},"whitespace_after_comma_in_array":true,"function_typehint_space":true,"hash_to_slash_comment":true,"no_alias_functions":true,"lowercase_cast":true,"no_leading_namespace_whitespace":true,"native_function_casing":true,"self_accessor":true,"no_short_bool_cast":true,"no_unneeded_control_parentheses":true},"hashes":{"Classes\\Controller\\PropertyController.php":-2076609696,"Classes\\DataProcessing\\MenuProcessor.php":-172051285,"Classes\\Domain\\Model\\Property.php":-1064733400,"Classes\\Domain\\Repository\\PropertyRepository.php":1883608418,"Classes\\Service\\GeneralService.php":223957607,"Configuration\\TCA\\Overrides\\sys_template.php":1642341450,"Configuration\\TCA\\Overrides\\tt_content.php":1939987932,"Configuration\\TCA\\Overrides\\tx_realer_domain_model_property.php":1148884273,"Configuration\\TCA\\tx_realer_domain_model_property.php":852684360,"ext_emconf.php":699265883,"ext_localconf.php":-184807432,"ext_tables.php":949599639}}
71 changes: 71 additions & 0 deletions .php_cs.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
<?php

/**
* This file represents the configuration for Code Sniffing PSR-2-related
* automatic checks of coding guidelines
* Install @fabpot's great php-cs-fixer tool via
*
* $ composer global require friendsofphp/php-cs-fixer
*
* And then simply run
*
* $ php-cs-fixer fix
*
* For more information read:
* http://www.php-fig.org/psr/psr-2/
* http://cs.sensiolabs.org
*/

if (PHP_SAPI !== 'cli') {
die('This script supports command line usage only. Please check your command.');
}

$header = <<<EOF
This file is part of the package Buepro/Realer.
For the full copyright and license information, please read the
LICENSE file that was distributed with this source code.
EOF;

return PhpCsFixer\Config::create()
->setRiskyAllowed(true)
->setRules([
'@PSR2' => true,
'header_comment' => [
'header' => $header
],
'general_phpdoc_annotation_remove' => [
'author'
],
'no_leading_import_slash' => true,
'no_trailing_comma_in_singleline_array' => true,
'no_singleline_whitespace_before_semicolons' => true,
'no_unused_imports' => true,
'concat_space' => ['spacing' => 'one'],
'no_whitespace_in_blank_line' => true,
'ordered_imports' => true,
'single_quote' => true,
'no_empty_statement' => true,
'no_extra_consecutive_blank_lines' => true,
'phpdoc_no_package' => true,
'phpdoc_scalar' => true,
'no_blank_lines_after_phpdoc' => true,
'array_syntax' => ['syntax' => 'short'],
'whitespace_after_comma_in_array' => true,
'function_typehint_space' => true,
'hash_to_slash_comment' => true,
'no_alias_functions' => true,
'lowercase_cast' => true,
'no_leading_namespace_whitespace' => true,
'native_function_casing' => true,
'self_accessor' => true,
'no_short_bool_cast' => true,
'no_unneeded_control_parentheses' => true
])
->setFinder(
PhpCsFixer\Finder::create()
->exclude('.build')
->exclude('Contrib')
->exclude('Initialisation')
->in(__DIR__)
);
34 changes: 20 additions & 14 deletions Classes/Controller/PropertyController.php
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
<?php
namespace Buepro\Realer\Controller;

/***
*
* This file is part of the "Real estate publisher" Extension for TYPO3 CMS.
/*
* This file is part of the package Buepro/Realer.
*
* For the full copyright and license information, please read the
* LICENSE.txt file that was distributed with this source code.
*
* (c) 2017 Roman Büchler <rb@buechler.pro>
*
***/
* LICENSE file that was distributed with this source code.
*/

namespace Buepro\Realer\Controller;

use Buepro\Realer\Domain\Repository\PropertyRepository;

/**
* PropertyController
Expand All @@ -19,12 +18,19 @@ class PropertyController extends \TYPO3\CMS\Extbase\Mvc\Controller\ActionControl
{
/**
* propertyRepository
*
* @var \Buepro\Realer\Domain\Repository\PropertyRepository
* @inject
*
* @var PropertyRepository
*/
protected $propertyRepository = null;

/**
* @param PropertyRepository $propertyRepository
*/
public function injectPropertyRepository(PropertyRepository $propertyRepository)
{
$this->propertyRepository = $propertyRepository;
}

/**
* action list
*
Expand All @@ -36,7 +42,7 @@ public function listAction()
$objects = $this->propertyRepository->findAll();
} else {
$objects = $this->propertyRepository->findByObjectType($this->request->getArgument('objectType'));
};
}
$this->view->assignMultiple([
'properties' => $objects,
'settings' => $this->settings
Expand All @@ -45,7 +51,7 @@ public function listAction()

/**
* action show
*
*
* @param \Buepro\Realer\Domain\Model\Property $property
* @return void
*/
Expand Down

0 comments on commit 18d2b1c

Please sign in to comment.