Initial commit: apps.prometeysev.ru
This commit is contained in:
commit
96ccabcd8b
6561 files changed
+1270349
No files matched your search
Vendored
+177
@@ -0,0 +1,177 @@
|
||||
<?php
|
||||
namespace Beakman;
|
||||
|
||||
class FunctionNames
|
||||
{
|
||||
public function _forbidden()
|
||||
{
|
||||
echo "I emit an error";
|
||||
}
|
||||
|
||||
private function notDiscouraged()
|
||||
{
|
||||
echo "I don't emit a warning anymore";
|
||||
}
|
||||
|
||||
public function setVariables()
|
||||
{
|
||||
$this->passingPublic = 'changed';
|
||||
$this->underscored = 'has value now';
|
||||
$this->doubleUnderscore = 'not recommended';
|
||||
}
|
||||
|
||||
public static function setStatics()
|
||||
{
|
||||
self::$publicStatic = true;
|
||||
self::$protectedStatic = true;
|
||||
self::$privateStatic = true;
|
||||
}
|
||||
|
||||
protected function _someFunc()
|
||||
{
|
||||
// code here
|
||||
}
|
||||
|
||||
protected function noUnderscorePrefix()
|
||||
{
|
||||
// code here
|
||||
$closure = function () {
|
||||
// code here
|
||||
};
|
||||
}
|
||||
|
||||
public function __call($name, $arguments)
|
||||
{
|
||||
}
|
||||
public function __construct()
|
||||
{
|
||||
}
|
||||
public function __clone()
|
||||
{
|
||||
}
|
||||
public function __debugInfo()
|
||||
{
|
||||
}
|
||||
public function __destruct()
|
||||
{
|
||||
}
|
||||
public function __get($name)
|
||||
{
|
||||
}
|
||||
public function __invoke()
|
||||
{
|
||||
}
|
||||
public function __isset($name)
|
||||
{
|
||||
}
|
||||
public function __set($name, $value)
|
||||
{
|
||||
}
|
||||
public function __sleep()
|
||||
{
|
||||
}
|
||||
public function __toString()
|
||||
{
|
||||
return '';
|
||||
}
|
||||
public function __unset($name)
|
||||
{
|
||||
}
|
||||
public function __wakeup()
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
interface FunctionNamesInterface
|
||||
{
|
||||
public function _forbidden();
|
||||
|
||||
public function setVariables();
|
||||
|
||||
public static function setStatics();
|
||||
}
|
||||
|
||||
trait FunctionNamesTrait
|
||||
{
|
||||
public function _forbidden()
|
||||
{
|
||||
echo "I emit an error";
|
||||
}
|
||||
|
||||
private function notDiscouraged()
|
||||
{
|
||||
echo "I don't emit a warning anymore";
|
||||
}
|
||||
|
||||
public function setVariables()
|
||||
{
|
||||
$this->passingPublic = 'changed';
|
||||
$this->underscored = 'has value now';
|
||||
$this->doubleUnderscore = 'not recommended';
|
||||
}
|
||||
|
||||
public static function setStatics()
|
||||
{
|
||||
self::$publicStatic = true;
|
||||
self::$protectedStatic = true;
|
||||
self::$privateStatic = true;
|
||||
}
|
||||
|
||||
protected function _someFunc()
|
||||
{
|
||||
// code here
|
||||
}
|
||||
|
||||
protected function noUnderscorePrefix()
|
||||
{
|
||||
// code here
|
||||
}
|
||||
|
||||
function _noScopeSpecified()
|
||||
{
|
||||
echo 'handled by an other Sniff';
|
||||
}
|
||||
|
||||
public function __call($name, $arguments)
|
||||
{
|
||||
}
|
||||
public function __construct()
|
||||
{
|
||||
}
|
||||
public function __clone()
|
||||
{
|
||||
}
|
||||
public function __debugInfo()
|
||||
{
|
||||
}
|
||||
public function __destruct()
|
||||
{
|
||||
}
|
||||
public function __get($name)
|
||||
{
|
||||
}
|
||||
public function __invoke()
|
||||
{
|
||||
}
|
||||
public function __isset($name)
|
||||
{
|
||||
}
|
||||
public function __set($name, $value)
|
||||
{
|
||||
}
|
||||
public function __sleep()
|
||||
{
|
||||
}
|
||||
public function __toString()
|
||||
{
|
||||
return '';
|
||||
}
|
||||
public function __unset($name)
|
||||
{
|
||||
}
|
||||
public function __wakeup()
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
public function __passingOutside() {}
|
||||
Vendored
+28
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
namespace CakePHP\Tests\NamingConventions;
|
||||
|
||||
use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest;
|
||||
|
||||
class ValidFunctionNameUnitTest extends AbstractSniffUnitTest
|
||||
{
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function getErrorList()
|
||||
{
|
||||
return [
|
||||
6 => 1,
|
||||
87 => 1,
|
||||
96 => 1,
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function getWarningList()
|
||||
{
|
||||
return [];
|
||||
}
|
||||
}
|
||||
Vendored
+6
@@ -0,0 +1,6 @@
|
||||
<?php
|
||||
trait Foo {
|
||||
}
|
||||
|
||||
trait WTFTrait {
|
||||
}
|
||||
Vendored
+26
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
namespace CakePHP\Tests\NamingConventions;
|
||||
|
||||
use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest;
|
||||
|
||||
class ValidTraitNameUnitTest extends AbstractSniffUnitTest
|
||||
{
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function getErrorList()
|
||||
{
|
||||
return [
|
||||
2 => 1,
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function getWarningList()
|
||||
{
|
||||
return [];
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user