Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>pull/38550/head
parent
2845a04827
commit
315f7f286f
@ -1,10 +0,0 @@ |
||||
<?php |
||||
|
||||
/** |
||||
* Class BadClass - accessing consts on blacklisted classes is not allowed |
||||
*/ |
||||
class BadClass { |
||||
public function foo() { |
||||
$bar = \OC_API::ADMIN_AUTH; |
||||
} |
||||
} |
||||
@ -1,8 +0,0 @@ |
||||
<?php |
||||
|
||||
use OCP\NamespaceName\ClassName as Alias; |
||||
|
||||
/** |
||||
* Class BadClass - creating an instance of a blacklisted class is not allowed |
||||
*/ |
||||
Alias::CONSTANT_NAME; |
||||
@ -1,8 +0,0 @@ |
||||
<?php |
||||
|
||||
use OCP\NamespaceName as SubAlias; |
||||
|
||||
/** |
||||
* Class BadClass - creating an instance of a blacklisted class is not allowed |
||||
*/ |
||||
SubAlias\ClassName::CONSTANT_NAME; |
||||
@ -1,8 +0,0 @@ |
||||
<?php |
||||
|
||||
use OCP\NamespaceName; |
||||
|
||||
/** |
||||
* Class BadClass - creating an instance of a blacklisted class is not allowed |
||||
*/ |
||||
NamespaceName\ClassName::CONSTANT_NAME; |
||||
@ -1,6 +0,0 @@ |
||||
<?php |
||||
|
||||
/** |
||||
* Class BadClass - creating an instance of a blacklisted class is not allowed |
||||
*/ |
||||
\OCP\NamespaceName\ClassName::CONSTANT_NAME; |
||||
@ -1,6 +0,0 @@ |
||||
<?php |
||||
|
||||
use OCP\NamespaceName\ClassName as Alias; |
||||
|
||||
Alias::functionName(); |
||||
Alias::methodName(); |
||||
@ -1,6 +0,0 @@ |
||||
<?php |
||||
|
||||
use OCP\NamespaceName as SubAlias; |
||||
|
||||
SubAlias\ClassName::functionName(); |
||||
SubAlias\ClassName::methodName(); |
||||
@ -1,6 +0,0 @@ |
||||
<?php |
||||
|
||||
use OCP\NamespaceName; |
||||
|
||||
NamespaceName\ClassName::functionName(); |
||||
NamespaceName\ClassName::methodName(); |
||||
@ -1,4 +0,0 @@ |
||||
<?php |
||||
|
||||
\OCP\NamespaceName\ClassName::functionName(); |
||||
\OCP\NamespaceName\ClassName::methodName(); |
||||
@ -1,5 +0,0 @@ |
||||
<?php |
||||
|
||||
$class = new \OCP\NamespaceName\ClassName(); |
||||
$class->methodName(); |
||||
$class::methodName(); |
||||
@ -1,9 +0,0 @@ |
||||
<?php |
||||
|
||||
use OCP\AppFramework\IApi as OAFIA; |
||||
|
||||
/** |
||||
* Class BadClass - creating an instance of a blacklisted class is not allowed |
||||
*/ |
||||
class BadClass implements OAFIA { |
||||
} |
||||
@ -1,9 +0,0 @@ |
||||
<?php |
||||
|
||||
use OCP\AppFramework as OAF; |
||||
|
||||
/** |
||||
* Class BadClass - creating an instance of a blacklisted class is not allowed |
||||
*/ |
||||
class BadClass implements OAF\IApi { |
||||
} |
||||
@ -1,9 +0,0 @@ |
||||
<?php |
||||
|
||||
use OCP\AppFramework; |
||||
|
||||
/** |
||||
* Class BadClass - creating an instance of a blacklisted class is not allowed |
||||
*/ |
||||
class BadClass implements AppFramework\IApi { |
||||
} |
||||
@ -1,9 +0,0 @@ |
||||
<?php |
||||
|
||||
use OCP\AppFramework\IApi; |
||||
|
||||
/** |
||||
* Class BadClass - creating an instance of a blacklisted class is not allowed |
||||
*/ |
||||
class BadClass implements IApi { |
||||
} |
||||
@ -1,11 +0,0 @@ |
||||
<?php |
||||
|
||||
/** |
||||
* Class BadClass - uses equal instead of identical operator |
||||
*/ |
||||
class BadClass { |
||||
public function foo() { |
||||
if (true == false) { |
||||
} |
||||
} |
||||
} |
||||
@ -1,8 +0,0 @@ |
||||
<?php |
||||
|
||||
/** |
||||
* Class BadClass - sub class a forbidden class is not allowed |
||||
*/ |
||||
class BadClass extends OC_Hook { |
||||
|
||||
} |
||||
@ -1,13 +0,0 @@ |
||||
<?php |
||||
|
||||
/** |
||||
* Class GoodClass - uses identical operator |
||||
*/ |
||||
class GoodClass { |
||||
public function foo() { |
||||
if (true === false) { |
||||
} |
||||
if (true !== false) { |
||||
} |
||||
} |
||||
} |
||||
@ -1,9 +0,0 @@ |
||||
<?php |
||||
|
||||
/** |
||||
* Class BadClass - sub class a forbidden class is not allowed |
||||
* NOTE: lowercase typo is intended |
||||
*/ |
||||
class BadClass implements oC_Avatar { |
||||
|
||||
} |
||||
@ -1,10 +0,0 @@ |
||||
<?php |
||||
|
||||
/** |
||||
* Class BadClass - creating an instance of a blacklisted class is not allowed |
||||
*/ |
||||
class BadClass { |
||||
public function foo() { |
||||
$bar = new OC_AppConfig(); |
||||
} |
||||
} |
||||
@ -1,11 +0,0 @@ |
||||
<?php |
||||
|
||||
/** |
||||
* Class BadClass - uses equal instead of identical operator |
||||
*/ |
||||
class BadClass { |
||||
public function foo() { |
||||
if (true != false) { |
||||
} |
||||
} |
||||
} |
||||
@ -1,10 +0,0 @@ |
||||
<?php |
||||
|
||||
/** |
||||
* Class BadClass - calling static methods on blacklisted classes is not allowed |
||||
*/ |
||||
class BadClass { |
||||
public function foo() { |
||||
OC_App::isEnabled('bar'); |
||||
} |
||||
} |
||||
@ -1,12 +0,0 @@ |
||||
<?php |
||||
|
||||
use OC_AppConfig as UseConfig; |
||||
|
||||
/** |
||||
* Class BadClass - creating an instance of a blacklisted class is not allowed |
||||
*/ |
||||
class BadClass { |
||||
public function foo() { |
||||
$bar = new UseConfig(); |
||||
} |
||||
} |
||||
Loading…
Reference in new issue