Avoid using static access to class '\Spatie\SchemaOrg\Schema' in method 'getDefaultOptions'. Open
get_class(Schema::creativeWork()) => 'Creative Work',
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Avoid using static access to class '\Spatie\SchemaOrg\Schema' in method 'getDefaultOptions'. Open
get_class(Schema::organization()) => 'Organisation',
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Avoid using static access to class '\Spatie\SchemaOrg\Schema' in method 'getDefaultOptions'. Open
get_class(Schema::person()) => 'Person',
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Avoid using static access to class '\Spatie\SchemaOrg\Schema' in method 'getDefaultOptions'. Open
get_class(Schema::article()) => 'Article',
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Avoid using static access to class '\Spatie\SchemaOrg\Schema' in method 'getDefaultOptions'. Open
get_class(Schema::webPage()) => 'WebPage',
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Avoid using static access to class '\Spatie\SchemaOrg\Schema' in method 'getDefaultOptions'. Open
get_class(Schema::review()) => 'Review',
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Avoid using static access to class '\Spatie\SchemaOrg\Schema' in method 'getDefaultOptions'. Open
get_class(Schema::recipe()) => 'Recipe',
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Call to method review
from undeclared class \Spatie\SchemaOrg\Schema
Open
get_class(Schema::review()) => 'Review',
- Exclude checks
Call to method article
from undeclared class \Spatie\SchemaOrg\Schema
Open
get_class(Schema::article()) => 'Article',
- Exclude checks
Call to method __construct
from undeclared class \Spatie\SchemaOrg\Schema
Open
return new Schema();
- Exclude checks
Call to method getInstance
from undeclared class \studioespresso\seofields\SeoFields
Open
$options = SeoFields::getInstance()->getSettings()->schemaOptions;
- Exclude checks
Call to method webPage
from undeclared class \Spatie\SchemaOrg\Schema
Open
get_class(Schema::webPage()) => 'WebPage',
- Exclude checks
Class extends undeclared class \craft\base\Component
Open
class SchemaService extends Component
- Exclude checks
Call to method person
from undeclared class \Spatie\SchemaOrg\Schema
Open
get_class(Schema::person()) => 'Person',
- Exclude checks
Call to method organization
from undeclared class \Spatie\SchemaOrg\Schema
Open
get_class(Schema::organization()) => 'Organisation',
- Exclude checks
Call to method recipe
from undeclared class \Spatie\SchemaOrg\Schema
Open
get_class(Schema::recipe()) => 'Recipe',
- Exclude checks
Call to method creativeWork
from undeclared class \Spatie\SchemaOrg\Schema
Open
get_class(Schema::creativeWork()) => 'Creative Work',
- Exclude checks