Skip to content

Commit

Permalink
Apply fixes from StyleCI
Browse files Browse the repository at this point in the history
  • Loading branch information
dsevillamartin authored and StyleCIBot committed Nov 4, 2019
1 parent 5f93435 commit 7380b15
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 14 deletions.
10 changes: 5 additions & 5 deletions extend.php
Expand Up @@ -3,9 +3,9 @@
/*
* This file is part of fof/github-autolink.
*
* Copyright (c) 2019 David Sevilla Martin.
* Copyright (c) 2019 FriendsOfFlarum.
*
* For the full copyright and license information, please view the LICENSE.md
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

Expand All @@ -19,7 +19,7 @@
->css(__DIR__.'/less/forum.less'),
(new Extend\Formatter())
->configure(function (Configurator $configurator) {
$configurator->plugins->set('GithubIssueAutolink', Plugins\GithubIssue\Configurator::class);
$configurator->plugins->set('GithubCommitAutolink', Plugins\GithubCommit\Configurator::class);
})
$configurator->plugins->set('GithubIssueAutolink', Plugins\GithubIssue\Configurator::class);
$configurator->plugins->set('GithubCommitAutolink', Plugins\GithubCommit\Configurator::class);
}),
];
9 changes: 8 additions & 1 deletion src/Plugins/GithubCommit/Configurator.php
@@ -1,9 +1,16 @@
<?php

/*
* This file is part of fof/github-autolink.
*
* Copyright (c) 2019 FriendsOfFlarum.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

namespace FoF\GitHubAutolink\Plugins\GithubCommit;


use s9e\TextFormatter\Plugins\ConfiguratorBase;

class Configurator extends ConfiguratorBase
Expand Down
13 changes: 10 additions & 3 deletions src/Plugins/GithubCommit/Parser.php
@@ -1,9 +1,16 @@
<?php

/*
* This file is part of fof/github-autolink.
*
* Copyright (c) 2019 FriendsOfFlarum.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

namespace FoF\GitHubAutolink\Plugins\GithubCommit;


use s9e\TextFormatter\Plugins\ParserBase;

class Parser extends ParserBase
Expand All @@ -22,8 +29,8 @@ public function parse($text, array $matches)

$tag->setAttributes(
[
'repo' => $m[1][1] >= 0 ? $m[1][0] : $m[4][0],
'commit' => $m[2][1] >= 0 ? $m[2][0] : $m[5][0],
'repo' => $m[1][1] >= 0 ? $m[1][0] : $m[4][0],
'commit' => $m[2][1] >= 0 ? $m[2][0] : $m[5][0],
'comment' => isset($m[3][0]) ? $m[3][0] : '',
]
);
Expand Down
9 changes: 8 additions & 1 deletion src/Plugins/GithubIssue/Configurator.php
@@ -1,9 +1,16 @@
<?php

/*
* This file is part of fof/github-autolink.
*
* Copyright (c) 2019 FriendsOfFlarum.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

namespace FoF\GitHubAutolink\Plugins\GithubIssue;


use s9e\TextFormatter\Plugins\ConfiguratorBase;

class Configurator extends ConfiguratorBase
Expand Down
15 changes: 11 additions & 4 deletions src/Plugins/GithubIssue/Parser.php
@@ -1,9 +1,16 @@
<?php

/*
* This file is part of fof/github-autolink.
*
* Copyright (c) 2019 FriendsOfFlarum.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

namespace FoF\GitHubAutolink\Plugins\GithubIssue;


use s9e\TextFormatter\Plugins\ParserBase;

class Parser extends ParserBase
Expand All @@ -22,9 +29,9 @@ public function parse($text, array $matches)

$tag->setAttributes(
[
'repo' => $m[1][1] >= 0 ? $m[1][0] : $m[5][0],
'type' => $m[2][1] >= 0 ? $m[2][0] : 'issues',
'issue' => $m[3][1] >= 0 ? $m[3][0] : $m[6][0],
'repo' => $m[1][1] >= 0 ? $m[1][0] : $m[5][0],
'type' => $m[2][1] >= 0 ? $m[2][0] : 'issues',
'issue' => $m[3][1] >= 0 ? $m[3][0] : $m[6][0],
'comment' => isset($m[4][0]) ? $m[4][0] : '',
]
);
Expand Down

0 comments on commit 7380b15

Please sign in to comment.