Showing 137 of 273 total issues
Avoid too many return
statements within this function. Open
return Kefir.merge(jobs$);
Avoid too many return
statements within this method. Open
return array(
'name' => '__GISTPEN_SETTINGS__',
'data' => $params->state( 'settings' ),
);
Avoid too many return
statements within this method. Open
return false;
Avoid too many return
statements within this method. Open
return $blob;
Avoid too many return
statements within this method. Open
return $this->em->persist( $this->blob_to_state( $blob ) );
Avoid too many return
statements within this method. Open
return false;
Avoid too many return
statements within this method. Open
return $state->blob_id === $blob->ID;
Avoid too many return
statements within this method. Open
return true;
Avoid too many return
statements within this method. Open
return false;
Avoid too many return
statements within this method. Open
return $state->ID;
Avoid too many return
statements within this method. Open
return $prism;
Function delete
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function delete( Model $model, $force = false ) {
foreach ( $this->repositories as $interface => $repository ) {
if ( is_subclass_of( $model, $interface ) ) {
$model = $repository->delete( $model, $force );
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function apply_blob
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function apply_blob( $params, array $data = array() ) {
/**
* Returned blob.
*
* @var BlobModel
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function Choosing
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
const Choosing: React.FC<{ collection: Collection; disabled?: boolean }> = ({
collection,
disabled,
}) => {
const globals = useGlobals();
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function foldResponse
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export const foldResponse = <T extends any, S, F>(
BodyType: t.Type<T>,
success: (t: T) => S,
failure: (err: AjaxError) => F,
) => (obs$: Observable<ObsResponse, NetworkError>): Observable<S | F, never> =>
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function fetch_prism
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
protected function fetch_prism() {
$option = get_option( $this->slug . '_no_priv', [ 'prism' => static::$defaults['prism'] ] );
if ( ! is_array( $option ) || ! isset( $option['prism'] ) ) {
$option = [ 'prism' => [] ];
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function sanitize_gist
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function sanitize_gist( array $gist ) {
foreach ( $gist as $key => $value ) {
if ( ! array_key_exists( $key, Site::$defaults['gist'] ) ) {
return new WP_Error(
'invalid_rest_param',
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"