forked from joomla-projects/joomla-browser
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRoboFile.php
More file actions
47 lines (44 loc) · 1.27 KB
/
RoboFile.php
File metadata and controls
47 lines (44 loc) · 1.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<?php
/**
* This is project's console commands configuration for Robo task runner.
*
* Download robo.phar from http://robo.li/robo.phar and type in the root of the repo: $ php robo.phar
* Or do: $ composer update, and afterwards you will be able to execute robo like $ php vendor/bin/robo
*
* @package JoomlaBrowser
*
* @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
* @see http://robo.li/
*
* @since 1.0.0
*/
class RoboFile extends \Robo\Tasks
{
// Load tasks from composer, see composer.json
use Joomla\Testing\Robo\Tasks\LoadTasks;
/**
* Check the code style of the project against a passed sniffers using PHP_CodeSniffer_CLI
*
* @param string $sniffersPath Path to the sniffers. If not provided Joomla Coding Standards will be used.
* @return void
*/
public function checkCodestyle($sniffersPath = null)
{
if (is_null($sniffersPath))
{
$sniffersPath = __DIR__ . '/.tmp/coding-standards';
}
$this->taskCodeChecks()
->setBaseRepositoryPath(__DIR__)
->setCodeStyleStandardsFolder($sniffersPath)
->setCodeStyleCheckFolders(
array(
'src'
)
)
->checkCodeStyle()
->run()
->stopOnFail();
}
}