NullObjectSpec   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 4

Importance

Changes 0
Metric Value
dl 0
loc 23
rs 10
c 0
b 0
f 0
wmc 1
lcom 1
cbo 4

1 Method

Rating   Name   Duplication   Size   Complexity  
A objectBehavior() 0 18 1
1
<?php
2
3
namespace PHPKitchen\Platform\Specs\Unit\Struct;
4
5
use PHPKitchen\Platform\Data\NullObject;
6
use PHPKitchen\Platform\Specs\Base\Spec;
7
8
/**
9
 * Specification for {@link NullObject}
10
 *
11
 * @author Dmitry Kolodko <[email protected]>
12
 */
13
class NullObjectSpec extends Spec {
14
    /**
15
     * @test
16
     */
17
    public function objectBehavior() {
18
        $nullObject = new NullObject();
19
20
        $I = $this->tester;
0 ignored issues
show
Coding Style introduced by
$I does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
Comprehensibility introduced by
Avoid variables with short names like $I. Configured minimum length is 3.

Short variable names may make your code harder to understand. Variable names should be self-descriptive. This check looks for variable names who are shorter than a configured minimum.

Loading history...
21
        $I->describe('behavior of null object');
0 ignored issues
show
Coding Style introduced by
$I does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
22
23
        $I->expectThat('NullObject check methods always always show it as null and empty');
0 ignored issues
show
Coding Style introduced by
$I does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
24
        $I->seeBool($nullObject->isNull())
0 ignored issues
show
Coding Style introduced by
$I does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
25
          ->isTrue();
26
        $I->seeBool($nullObject->isEmpty())
0 ignored issues
show
Coding Style introduced by
$I does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
27
          ->isTrue();
28
29
        $I->expectThat('NullObject is always equal to `null` and NullObject\'s');
0 ignored issues
show
Coding Style introduced by
$I does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
30
        $I->seeBool($nullObject->isEqualTo(null))
0 ignored issues
show
Coding Style introduced by
$I does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
31
          ->isTrue();
32
        $I->seeBool($nullObject->isEqualTo(new NullObject()))
0 ignored issues
show
Coding Style introduced by
$I does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
33
          ->isTrue();
34
    }
35
}