PK XAV}IC phpunit.xml.distnu W+A
./vendor/squizlabs/php_codesniffer/tests/Standards/AllSniffs.php
PK XAVٙI0 0 LICENSEnu W+A MIT License
Copyright (c) 2014-2017 David Joos
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
PK XAV9 UPGRADE-3.0.mdnu W+A UPGRADE FROM 2.x TO 3.0
-----------------------
Table of contents
- [Standard](#standard)
- [Ruleset](#ruleset)
- [Warnings](#warnings)
Standard
--------
In version 3.0 we changed the standards name from ``Symfony2`` to ``Symfony`` as this standard is not bound to any version of Symfony.
Make sure you set your standard accordingly:
```
phpcs --config-set default_standard Symfony
```
Ruleset
-------
In version 3.0 we changed the standards name from ``Symfony2`` to ``Symfony`` as this standard is not bound to any version of Symfony.
If you are using a custom ``ruleset.xml`` or standalone sniffs from this repository, this has to be changed accordingly.
Before:
```xml
// ..
```
After:
```xml
// ...
```
Warnings
--------
Both the ``The license block has to be present at the top of every PHP file, before the namespace`` and the ``Always use identical comparison unless you need type juggling`` messages will appear as warnings as these sniffs are unable to determine whether or not it's an error.
In order to suppress those warnings one can get rid of them with:
```
phpcs --config-set show_warnings 0
```PK XAV # # CONTRIBUTING.mdnu W+A # Contributing
1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. [Add tests for your changes](https://github.com/djoos/Symfony-coding-standard/blob/master/TESTING.md)
5. Push your changes to your feature branch (`git push origin my-new-feature`)
6. Create a new Pull Request (PR)
## Testing
Contributions will only be accepted if they are fully tested as specified in [TESTING.md](https://github.com/djoos/Symfony-coding-standard/blob/master/TESTING.md).
PK XAVĶfL L .travis.ymlnu W+A language: php
php:
- 5.6 # security support until 31/12/2018
- 7.0 # security support until 03/12/2018
- 7.1 # security support until 01/12/2019
- 7.2 # security support until 30/11/2020
- nightly
before_script:
- stable='^[0-9\.]+$'; if [[ "$TRAVIS_PHP_VERSION" =~ $stable ]]; then phpenv config-rm xdebug.ini; fi
- export PATH="$HOME/.composer/vendor/bin:$PATH"
- phpunit --version
script:
- ant test -Dcomposer.path=composer
matrix:
allow_failures:
- php: nightly
notifications:
email:
- development@davidjoos.com
PK XAV0E tests_bootstrap.phpnu W+A
* @license http://spdx.org/licenses/MIT MIT License
* @link https://github.com/djoos/Symfony-coding-standard
*/
$myStandardName = 'Symfony';
require_once __DIR__.'/vendor/squizlabs/php_codesniffer/tests/bootstrap.php';
// Add this Standard
PHP_CodeSniffer\Config::setConfigData(
'installed_paths',
__DIR__.DIRECTORY_SEPARATOR.'Symfony',
true
);
// Ignore all other Standards in tests
$standards = PHP_CodeSniffer\Util\Standards::getInstalledStandards();
$standards[] = 'Generic';
$ignoredStandardsStr = implode(
',', array_filter(
$standards, function ($v) use ($myStandardName) {
return $v !== $myStandardName;
}
)
);
putenv("PHPCS_IGNORE_TESTS={$ignoredStandardsStr}");
PK XAVT build.xmlnu W+A
PK XAV{R R
composer.jsonnu W+A {
"name": "escapestudios/symfony2-coding-standard",
"type": "phpcodesniffer-standard",
"description": "CodeSniffer ruleset for the Symfony 2+ coding standard",
"keywords": ["Symfony2", "Symfony", "coding standard", "phpcs"],
"homepage": "https://github.com/djoos/Symfony-coding-standard",
"license": "MIT",
"authors": [
{
"name": "David Joos",
"email": "iam@davidjoos.com"
},
{
"name": "Community contributors",
"homepage": "https://github.com/djoos/Symfony-coding-standard/graphs/contributors"
}
],
"extra": {
"branch-alias": {
"dev-master": "3.x-dev"
}
},
"minimum-stability": "dev",
"support" : {
"source": "https://github.com/djoos/Symfony-coding-standard",
"issues": "https://github.com/djoos/Symfony-coding-standard/issues"
},
"require-dev": {
"squizlabs/php_codesniffer": "3.*",
"phpunit/phpunit": "^4.0 || ^5.0 || ^6.0"
},
"conflict": {
"squizlabs/php_codesniffer": "<3 || >=4"
}
}
PK XAVf 0 Symfony/Tests/Commenting/AnnotationsUnitTest.phpnu W+A
* @license http://spdx.org/licenses/MIT MIT License
* @link https://github.com/djoos/Symfony2-coding-standard
*/
namespace Symfony\Tests\Commenting;
use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest;
/**
* Unit test class for the AnnotationsUnitTest sniff.
*
* A sniff unit test checks a .inc file for expected violations of a single
* coding standard. Expected errors and warnings are stored in this class.
*
* PHP version 5
*
* @category PHP
* @package Symfony-coding-standard
* @author wicliff
* @license http://spdx.org/licenses/MIT MIT License
* @link https://github.com/djoos/Symfony2-coding-standard
*/
class AnnotationsUnitTest extends AbstractSniffUnitTest
{
/**
* Returns the lines where errors should occur.
*
* The key of the array should represent the line number and the value
* should represent the number of errors that should occur on that line.
*
* @return array
*/
public function getErrorList()
{
return array(
4 => 1,
10 => 1,
);
}
/**
* Returns the lines where warnings should occur.
*
* The key of the array should represent the line number and the value
* should represent the number of errors that should occur on that line.
*
* @return array(int => int)
*/
public function getWarningList()
{
return array();
}
}
PK XAVP^Ӂ , Symfony/Tests/Commenting/LicenseUnitTest.phpnu W+A
* @license http://spdx.org/licenses/MIT MIT License
* @link https://github.com/djoos/Symfony2-coding-standard
*/
namespace Symfony\Tests\Commenting;
use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest;
/**
* Unit test class for the LicenseUnitTest sniff.
*
* A sniff unit test checks a .inc file for expected violations of a single
* coding standard. Expected errors and warnings are stored in this class.
*
* PHP version 5
*
* @category PHP
* @package Symfony-coding-standard
* @author wicliff
* @license http://spdx.org/licenses/MIT MIT License
* @link https://github.com/djoos/Symfony2-coding-standard
*/
class LicenseUnitTest extends AbstractSniffUnitTest
{
/**
* Returns the lines where errors should occur.
*
* The key of the array should represent the line number and the value
* should represent the number of errors that should occur on that line.
*
* @return array
*/
public function getErrorList()
{
return array();
}
/**
* Returns the lines where warnings should occur.
*
* The key of the array should represent the line number and the value
* should represent the number of warnings that should occur on that line.
*
* @return array(int => int)
*/
protected function getWarningList()
{
return array(
3 => 1,
);
}
}
PK XAV@N1F 0 Symfony/Tests/Commenting/AnnotationsUnitTest.incnu W+A
* @license http://spdx.org/licenses/MIT MIT License
* @link https://github.com/djoos/Symfony2-coding-standard
*/
namespace Symfony\Tests\Commenting;
use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest;
/**
* Unit test class for the FunctionComment sniff.
*
* A sniff unit test checks a .inc file for expected violations of a single
* coding standard. Expected errors and warnings are stored in this class.
*
* PHP version 5
*
* @category PHP
* @package Symfony-coding-standard
* @author Authors
* @license http://spdx.org/licenses/MIT MIT License
* @link https://github.com/djoos/Symfony2-coding-standard
*/
class FunctionCommentUnitTest extends AbstractSniffUnitTest
{
/**
* Returns the lines where errors should occur.
*
* The key of the array should represent the line number and the value
* should represent the number of errors that should occur on that line.
*
* @return array
*/
public function getErrorList()
{
return array(
5 => 1,
);
}
/**
* Returns the lines where warnings should occur.
*
* The key of the array should represent the line number and the value
* should represent the number of warnings that should occur on that line.
*
* @return array(int => int)
*/
protected function getWarningList()
{
return array();
}
}
PK XAV|E_ _ 4 Symfony/Tests/Commenting/FunctionCommentUnitTest.incnu W+A
* @license http://spdx.org/licenses/MIT MIT License
* @link https://github.com/djoos/Symfony2-coding-standard
*/
namespace Symfony\Tests\Commenting;
use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest;
/**
* Unit test class for the ClassCommentUnitTest sniff.
*
* A sniff unit test checks a .inc file for expected violations of a single
* coding standard. Expected errors and warnings are stored in this class.
*
* PHP version 5
*
* @category PHP
* @package Symfony-coding-standard
* @author wicliff
* @license http://spdx.org/licenses/MIT MIT License
* @link https://github.com/djoos/Symfony2-coding-standard
*/
class ClassCommentUnitTest extends AbstractSniffUnitTest
{
/**
* Returns the lines where errors should occur.
*
* The key of the array should represent the line number and the value
* should represent the number of errors that should occur on that line.
*
* @return array
*/
public function getErrorList()
{
return array(
3 => 1,
);
}
/**
* Returns the lines where warnings should occur.
*
* The key of the array should represent the line number and the value
* should represent the number of errors that should occur on that line.
*
* @return array(int => int)
*/
public function getWarningList()
{
return array();
}
}
PK XAV} 0 Symfony/Tests/Commenting/TypeHintingUnitTest.phpnu W+A
* @license http://spdx.org/licenses/MIT MIT License
* @link https://github.com/djoos/Symfony2-coding-standard
*/
namespace Symfony\Tests\Commenting;
use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest;
/**
* Unit test class for the TypeHintingUnitTest sniff.
*
* A sniff unit test checks a .inc file for expected violations of a single
* coding standard. Expected errors and warnings are stored in this class.
*
* PHP version 5
*
* @category PHP
* @package Symfony2-coding-standard
* @author wicliff
* @license http://spdx.org/licenses/MIT MIT License
* @link https://github.com/djoos/Symfony2-coding-standard
*/
class TypeHintingUnitTest extends AbstractSniffUnitTest
{
/**
* Returns the lines where errors should occur.
*
* The key of the array should represent the line number and the value
* should represent the number of errors that should occur on that line.
*
* @return array
*/
public function getErrorList()
{
return array(
6 => 1,
11 => 1,
17 => 1,
18 => 1,
);
}
/**
* Returns the lines where warnings should occur.
*
* The key of the array should represent the line number and the value
* should represent the number of errors that should occur on that line.
*
* @return array(int => int)
*/
public function getWarningList()
{
return array();
}
}
PK XAV{8 1 Symfony/Tests/Commenting/ClassCommentUnitTest.incnu W+A
* @license http://spdx.org/licenses/MIT MIT License
* @link https://github.com/djoos/Symfony2-coding-standard
*/
namespace Symfony\Tests\NamingConventions;
use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest;
/**
* Unit test class for the ValidClassNameUnitTest sniff.
*
* A sniff unit test checks a .inc file for expected violations of a single
* coding standard. Expected errors and warnings are stored in this class.
*
* PHP version 5
*
* @category PHP
* @package Symfony-coding-standard
* @author wicliff
* @license http://spdx.org/licenses/MIT MIT License
* @link https://github.com/djoos/Symfony2-coding-standard
*/
class ValidClassNameUnitTest extends AbstractSniffUnitTest
{
/**
* Returns the lines where errors should occur.
*
* The key of the array should represent the line number and the value
* should represent the number of errors that should occur on that line.
*
* @return array
*/
public function getErrorList()
{
return array(
3 => 1,
7 => 1,
14 => 1,
18 => 1,
);
}
/**
* Returns the lines where warnings should occur.
*
* The key of the array should represent the line number and the value
* should represent the number of errors that should occur on that line.
*
* @return array(int => int)
*/
public function getWarningList()
{
return array();
}
}
PK XAV : Symfony/Tests/NamingConventions/ValidClassNameUnitTest.incnu W+A
* @license http://spdx.org/licenses/MIT MIT License
* @link https://github.com/djoos/Symfony2-coding-standard
*/
namespace Symfony\Tests\Errors;
use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest;
/**
* Unit test class for the UserDeprecatedUnitTest sniff.
*
* A sniff unit test checks a .inc file for expected violations of a single
* coding standard. Expected errors and warnings are stored in this class.
*
* PHP version 5
*
* @category PHP
* @package Symfony-coding-standard
* @author wicliff
* @license http://spdx.org/licenses/MIT MIT License
* @link https://github.com/djoos/Symfony2-coding-standard
*/
class UserDeprecatedUnitTest extends AbstractSniffUnitTest
{
/**
* Returns the lines where errors should occur.
*
* The key of the array should represent the line number and the value
* should represent the number of errors that should occur on that line.
*
* @return array
*/
public function getErrorList()
{
return array(
3 => 1,
);
}
/**
* Returns the lines where warnings should occur.
*
* The key of the array should represent the line number and the value
* should represent the number of errors that should occur on that line.
*
* @return array(int => int)
*/
public function getWarningList()
{
return array();
}
}
PK XAV8cO 1 Symfony/Tests/Errors/ExceptionMessageUnitTest.phpnu W+A
* @license http://spdx.org/licenses/MIT MIT License
* @link https://github.com/djoos/Symfony2-coding-standard
*/
namespace Symfony\Tests\Errors;
use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest;
/**
* Unit test class for the ExceptionMessageUnitTest sniff.
*
* A sniff unit test checks a .inc file for expected violations of a single
* coding standard. Expected errors and warnings are stored in this class.
*
* PHP version 5
*
* @category PHP
* @package Symfony-coding-standard
* @author wicliff
* @license http://spdx.org/licenses/MIT MIT License
* @link https://github.com/djoos/Symfony2-coding-standard
*/
class ExceptionMessageUnitTest extends AbstractSniffUnitTest
{
/**
* Returns the lines where errors should occur.
*
* The key of the array should represent the line number and the value
* should represent the number of errors that should occur on that line.
*
* @return array
*/
public function getErrorList()
{
return array(
3 => 1,
);
}
/**
* Returns the lines where warnings should occur.
*
* The key of the array should represent the line number and the value
* should represent the number of errors that should occur on that line.
*
* @return array(int => int)
*/
public function getWarningList()
{
return array();
}
}
PK XAV
j j / Symfony/Tests/Errors/UserDeprecatedUnitTest.incnu W+A
* @license http://spdx.org/licenses/MIT MIT License
* @link https://github.com/djoos/Symfony2-coding-standard
*/
namespace Symfony\Tests\Commenting;
use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest;
/**
* Unit test class for the AlphanumericFilenameUnitTest sniff.
*
* A sniff unit test checks a .inc file for expected violations of a single
* coding standard. Expected errors and warnings are stored in this class.
*
* PHP version 5
*
* @category PHP
* @package Symfony-coding-standard
* @author wicliff
* @license http://spdx.org/licenses/MIT MIT License
* @link https://github.com/djoos/Symfony2-coding-standard
*/
class AlphanumericFilenameUnitTest extends AbstractSniffUnitTest
{
/**
* Returns the lines where errors should occur.
*
* The key of the array should represent the line number and the value
* should represent the number of errors that should occur on that line.
*
* @return array
*/
public function getErrorList()
{
return array(1 => 1);
}
/**
* Returns the lines where warnings should occur.
*
* The key of the array should represent the line number and the value
* should represent the number of warnings that should occur on that line.
*
* @return array
*/
public function getWarningList()
{
return array();
}
}PK XAVx 7 Symfony/Tests/Files/alphanumeric-filename-unit-test.incnu W+A
PK XAVc4Q Q 2 Symfony/Tests/Formatting/ReturnOrThrowUnitTest.incnu W+A
* @license http://spdx.org/licenses/MIT MIT License
* @link https://github.com/djoos/Symfony2-coding-standard
*/
namespace Symfony\Tests\Formatting;
use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest;
/**
* Unit test class for the BlankLineBeforeReturn sniff.
*
* A sniff unit test checks a .inc file for expected violations of a single
* coding standard. Expected errors and warnings are stored in this class.
*
* PHP version 5
*
* @category PHP
* @package Symfony-coding-standard
* @author Authors
* @license http://spdx.org/licenses/MIT MIT License
* @link https://github.com/djoos/Symfony2-coding-standard
*/
class BlankLineBeforeReturnUnitTest extends AbstractSniffUnitTest
{
/**
* Returns the lines where errors should occur.
*
* The key of the array should represent the line number and the value
* should represent the number of errors that should occur on that line.
*
* @return array(int => int)
*/
public function getErrorList()
{
return array(
37 => 1
);
}
/**
* Returns the lines where warnings should occur.
*
* The key of the array should represent the line number and the value
* should represent the number of errors that should occur on that line.
*
* @return array(int => int)
*/
public function getWarningList()
{
return array();
}
}
PK XAVT˥ : Symfony/Tests/Formatting/BlankLineBeforeReturnUnitTest.incnu W+A
* @license http://spdx.org/licenses/MIT MIT License
* @link https://github.com/djoos/Symfony2-coding-standard
*/
namespace Symfony\Tests\Formatting;
use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest;
/**
* Unit test class for the ReturnOrThrowUnitTest sniff.
*
* A sniff unit test checks a .inc file for expected violations of a single
* coding standard. Expected errors and warnings are stored in this class.
*
* PHP version 5
*
* @category PHP
* @package Symfony-coding-standard
* @author wicliff
* @license http://spdx.org/licenses/MIT MIT License
* @link https://github.com/djoos/Symfony2-coding-standard
*/
class ReturnOrThrowUnitTest extends AbstractSniffUnitTest
{
/**
* Returns the lines where errors should occur.
*
* The key of the array should represent the line number and the value
* should represent the number of errors that should occur on that line.
*
* @return array
*/
public function getErrorList()
{
return array(
5 => 1,
);
}
/**
* Returns the lines where warnings should occur.
*
* The key of the array should represent the line number and the value
* should represent the number of errors that should occur on that line.
*
* @return array(int => int)
*/
public function getWarningList()
{
return array();
}
}
PK XAV0, 5 Symfony/Tests/Objects/ObjectInstantiationUnitTest.incnu W+A foo);
new Foo\Bar();
new Foo\Bar(true);
new Foo\Bar($this->foo);
new \Foo\Bar();
new \Foo\Bar(true);
new \Foo\Bar($this->foo);
new $foo();
new $foo(true);
new $foo($this->foo);
new static();
new static(true);
new static($this->foo);
new self();
new self(true);
new self($this->foo);
PK XAV;V&o 5 Symfony/Tests/Objects/ObjectInstantiationUnitTest.phpnu W+A
* @license http://spdx.org/licenses/MIT MIT License
* @link https://github.com/djoos/Symfony2-coding-standard
*/
namespace Symfony\Tests\Objects;
use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest;
/**
* Unit test class for the ObjectInstantiation sniff.
*
* A sniff unit test checks a .inc file for expected violations of a single
* coding standard. Expected errors and warnings are stored in this class.
*
* PHP version 5
*
* @category PHP
* @package Symfony-coding-standard
* @author Authors
* @license http://spdx.org/licenses/MIT MIT License
* @link https://github.com/djoos/Symfony2-coding-standard
*/
class ObjectInstantiationUnitTest extends AbstractSniffUnitTest
{
/**
* Returns the lines where errors should occur.
*
* The key of the array should represent the line number and the value
* should represent the number of errors that should occur on that line.
*
* @return array
*/
public function getErrorList()
{
return array(
4 => 1,
5 => 1,
6 => 1,
7 => 1,
8 => 1,
9 => 1,
10 => 1,
);
}
/**
* Returns the lines where warnings should occur.
*
* The key of the array should represent the line number and the value
* should represent the number of errors that should occur on that line.
*
* @return array(int => int)
*/
public function getWarningList()
{
return array();
}
}
PK XAVDž.M M 9 Symfony/Tests/ControlStructure/YodaConditionsUnitTest.incnu W+A b++;
$a->b--;
++$a->b;
--$a->b;
$a->b ++;
$a->b --;
++ $a->b;
-- $a->b;PK XAV > Symfony/Tests/ControlStructure/IdenticalComparisonUnitTest.phpnu W+A
* @license http://spdx.org/licenses/MIT MIT License
* @link https://github.com/djoos/Symfony2-coding-standard
*/
namespace Symfony\Tests\ControlStructure;
use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest;
/**
* Unit test class for the IdenticalComparisonUnitTest sniff.
*
* A sniff unit test checks a .inc file for expected violations of a single
* coding standard. Expected errors and warnings are stored in this class.
*
* PHP version 5
*
* @category PHP
* @package Symfony-coding-standard
* @author wicliff
* @license http://spdx.org/licenses/MIT MIT License
* @link https://github.com/djoos/Symfony2-coding-standard
*/
class IdenticalComparisonUnitTest extends AbstractSniffUnitTest
{
/**
* Returns the lines where errors should occur.
*
* The key of the array should represent the line number and the value
* should represent the number of errors that should occur on that line.
*
* @return array
*/
public function getErrorList()
{
return array();
}
/**
* Returns the lines where warnings should occur.
*
* The key of the array should represent the line number and the value
* should represent the number of errors that should occur on that line.
*
* @return array(int => int)
*/
public function getWarningList()
{
return array(
3 => 1,
7 => 1,
);
}
}
PK XAV 9 Symfony/Tests/ControlStructure/YodaConditionsUnitTest.phpnu W+A
* @license http://spdx.org/licenses/MIT MIT License
* @link https://github.com/djoos/Symfony2-coding-standard
*/
namespace Symfony\Tests\ControlStructure;
use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest;
/**
* Unit test class for the YodaConditionsUnitTest sniff.
*
* A sniff unit test checks a .inc file for expected violations of a single
* coding standard. Expected errors and warnings are stored in this class.
*
* PHP version 5
*
* @category PHP
* @package Symfony-coding-standard
* @author wicliff
* @license http://spdx.org/licenses/MIT MIT License
* @link https://github.com/djoos/Symfony2-coding-standard
*/
class YodaConditionsUnitTest extends AbstractSniffUnitTest
{
/**
* Returns the lines where errors should occur.
*
* The key of the array should represent the line number and the value
* should represent the number of errors that should occur on that line.
*
* @return array
*/
public function getErrorList()
{
return array(
3 => 1,
7 => 1,
);
}
/**
* Returns the lines where warnings should occur.
*
* The key of the array should represent the line number and the value
* should represent the number of errors that should occur on that line.
*
* @return array(int => int)
*/
public function getWarningList()
{
return array();
}
}
PK XAVY$ $ 9 Symfony/Tests/ControlStructure/UnaryOperatorsUnitTest.phpnu W+A
* @license http://spdx.org/licenses/MIT MIT License
* @link https://github.com/djoos/Symfony2-coding-standard
*/
namespace Symfony\Tests\ControlStructure;
use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest;
/**
* Unit test class for the UnaryOperatorsUnitTest sniff.
*
* A sniff unit test checks a .inc file for expected violations of a single
* coding standard. Expected errors and warnings are stored in this class.
*
* PHP version 5
*
* @category PHP
* @package Symfony-coding-standard
* @author wicliff
* @license http://spdx.org/licenses/MIT MIT License
* @link https://github.com/djoos/Symfony2-coding-standard
*/
class UnaryOperatorsUnitTest extends AbstractSniffUnitTest
{
/**
* Returns the lines where errors should occur.
*
* The key of the array should represent the line number and the value
* should represent the number of errors that should occur on that line.
*
* @return array
*/
public function getErrorList()
{
return array(
11 => 1,
13 => 1,
15 => 1,
17 => 1,
27 => 1,
29 => 1,
31 => 1,
33 => 1,
);
}
/**
* Returns the lines where warnings should occur.
*
* The key of the array should represent the line number and the value
* should represent the number of errors that should occur on that line.
*
* @return array(int => int)
*/
public function getWarningList()
{
return array();
}
}
PK XAV3KK K > Symfony/Tests/ControlStructure/IdenticalComparisonUnitTest.incnu W+A
* @license http://spdx.org/licenses/MIT MIT License
* @link https://github.com/djoos/Symfony2-coding-standard
*/
namespace Symfony\Tests\Classes;
use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest;
/**
* Unit test class for the PropertyDeclarationUnitTest sniff.
*
* A sniff unit test checks a .inc file for expected violations of a single
* coding standard. Expected errors and warnings are stored in this class.
*
* PHP version 5
*
* @category PHP
* @package Symfony-coding-standard
* @author wicliff
* @license http://spdx.org/licenses/MIT MIT License
* @link https://github.com/djoos/Symfony2-coding-standard
*/
class PropertyDeclarationUnitTest extends AbstractSniffUnitTest
{
/**
* Returns the lines where errors should occur.
*
* The key of the array should represent the line number and the value
* should represent the number of errors that should occur on that line.
*
* @return array
*/
public function getErrorList()
{
return array(
9 => 1,
);
}
/**
* Returns the lines where warnings should occur.
*
* The key of the array should represent the line number and the value
* should represent the number of errors that should occur on that line.
*
* @return array(int => int)
*/
public function getWarningList()
{
return array();
}
}
PK XAVX&