mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-07-04 15:34:35 +02:00
Added an PHP CS fixer config file and applied it to files.
We now use the same the same style as the symfony project, and it allows us to simply fix the style by executing php_cs_fixer fix in the project root.
This commit is contained in:
parent
89258bc102
commit
e557bdedd5
210 changed files with 2099 additions and 2742 deletions
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/**
|
||||
* This file is part of Part-DB (https://github.com/Part-DB/Part-DB-symfony)
|
||||
* This file is part of Part-DB (https://github.com/Part-DB/Part-DB-symfony).
|
||||
*
|
||||
* Copyright (C) 2019 Jan Böhmer (https://github.com/jbtronics)
|
||||
*
|
||||
|
@ -17,7 +17,6 @@
|
|||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*
|
||||
*/
|
||||
|
||||
namespace App\Helpers;
|
||||
|
@ -26,7 +25,6 @@ use League\HTMLToMarkdown\HtmlConverter;
|
|||
use s9e\TextFormatter\Bundles\Forum as TextFormatter;
|
||||
use SebastianBergmann\CodeCoverage\Report\Text;
|
||||
|
||||
|
||||
class BBCodeToMarkdownConverter
|
||||
{
|
||||
protected $html_to_markdown;
|
||||
|
@ -39,10 +37,12 @@ class BBCodeToMarkdownConverter
|
|||
/**
|
||||
* Converts the given BBCode to markdown.
|
||||
* BBCode tags that does not have a markdown aequivalent are outputed as HTML tags.
|
||||
*
|
||||
* @param $bbcode string The Markdown that should be converted.
|
||||
*
|
||||
* @return string The markdown version of the text.
|
||||
*/
|
||||
public function convert(string $bbcode) : string
|
||||
public function convert(string $bbcode): string
|
||||
{
|
||||
//Convert BBCode to html
|
||||
$xml = TextFormatter::parse($bbcode);
|
||||
|
@ -51,4 +51,4 @@ class BBCodeToMarkdownConverter
|
|||
//Now convert the HTML to markdown
|
||||
return $this->html_to_markdown->convert($html);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue