chore: Drop app code checker test data

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
This commit is contained in:
Christoph Wurst 2023-05-31 14:57:57 +02:00
parent 2845a04827
commit 315f7f286f
No known key found for this signature in database
GPG key ID: CC42AC2A7F0E56D8
22 changed files with 0 additions and 187 deletions

View file

@ -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;
}
}

View file

@ -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;

View file

@ -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;

View file

@ -1,8 +0,0 @@
<?php
use OCP\NamespaceName;
/**
* Class BadClass - creating an instance of a blacklisted class is not allowed
*/
NamespaceName\ClassName::CONSTANT_NAME;

View file

@ -1,6 +0,0 @@
<?php
/**
* Class BadClass - creating an instance of a blacklisted class is not allowed
*/
\OCP\NamespaceName\ClassName::CONSTANT_NAME;

View file

@ -1,6 +0,0 @@
<?php
use OCP\NamespaceName\ClassName as Alias;
Alias::functionName();
Alias::methodName();

View file

@ -1,6 +0,0 @@
<?php
use OCP\NamespaceName as SubAlias;
SubAlias\ClassName::functionName();
SubAlias\ClassName::methodName();

View file

@ -1,6 +0,0 @@
<?php
use OCP\NamespaceName;
NamespaceName\ClassName::functionName();
NamespaceName\ClassName::methodName();

View file

@ -1,4 +0,0 @@
<?php
\OCP\NamespaceName\ClassName::functionName();
\OCP\NamespaceName\ClassName::methodName();

View file

@ -1,5 +0,0 @@
<?php
$class = new \OCP\NamespaceName\ClassName();
$class->methodName();
$class::methodName();

View file

@ -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 {
}

View file

@ -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 {
}

View file

@ -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 {
}

View file

@ -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 {
}

View file

@ -1,11 +0,0 @@
<?php
/**
* Class BadClass - uses equal instead of identical operator
*/
class BadClass {
public function foo() {
if (true == false) {
}
}
}

View file

@ -1,8 +0,0 @@
<?php
/**
* Class BadClass - sub class a forbidden class is not allowed
*/
class BadClass extends OC_Hook {
}

View file

@ -1,13 +0,0 @@
<?php
/**
* Class GoodClass - uses identical operator
*/
class GoodClass {
public function foo() {
if (true === false) {
}
if (true !== false) {
}
}
}

View file

@ -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 {
}

View file

@ -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();
}
}

View file

@ -1,11 +0,0 @@
<?php
/**
* Class BadClass - uses equal instead of identical operator
*/
class BadClass {
public function foo() {
if (true != false) {
}
}
}

View file

@ -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');
}
}

View file

@ -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();
}
}