Browse Source
chore: Drop app code checker test data
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
pull/38550/head
Christoph Wurst
3 years ago
No known key found for this signature in database
GPG Key ID: CC42AC2A7F0E56D8
22 changed files with
0 additions and
187 deletions
-
tests/data/app/code-checker/test-const.php
-
tests/data/app/code-checker/test-deprecated-constant-alias.php
-
tests/data/app/code-checker/test-deprecated-constant-sub-alias.php
-
tests/data/app/code-checker/test-deprecated-constant-sub.php
-
tests/data/app/code-checker/test-deprecated-constant.php
-
tests/data/app/code-checker/test-deprecated-function-alias.php
-
tests/data/app/code-checker/test-deprecated-function-sub-alias.php
-
tests/data/app/code-checker/test-deprecated-function-sub.php
-
tests/data/app/code-checker/test-deprecated-function.php
-
tests/data/app/code-checker/test-deprecated-method.php
-
tests/data/app/code-checker/test-deprecated-use-alias.php
-
tests/data/app/code-checker/test-deprecated-use-sub-alias.php
-
tests/data/app/code-checker/test-deprecated-use-sub.php
-
tests/data/app/code-checker/test-deprecated-use.php
-
tests/data/app/code-checker/test-equal.php
-
tests/data/app/code-checker/test-extends.php
-
tests/data/app/code-checker/test-identical-operator.php
-
tests/data/app/code-checker/test-implements.php
-
tests/data/app/code-checker/test-new.php
-
tests/data/app/code-checker/test-not-equal.php
-
tests/data/app/code-checker/test-static-call.php
-
tests/data/app/code-checker/test-use.php
|
|
|
@ -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(); |
|
|
|
} |
|
|
|
} |