Completed
Push — master ( 52755b...6c4366 )
by smiley
02:13
created
vendor/phpunit/phpunit-mock-objects/src/Matcher/StatelessInvocation.php 1 patch
Indentation   +30 added lines, -30 removed lines patch added patch discarded remove patch
@@ -17,35 +17,35 @@
 block discarded – undo
17 17
  */
18 18
 abstract class PHPUnit_Framework_MockObject_Matcher_StatelessInvocation implements PHPUnit_Framework_MockObject_Matcher_Invocation
19 19
 {
20
-    /**
21
-     * Registers the invocation $invocation in the object as being invoked.
22
-     * This will only occur after matches() returns true which means the
23
-     * current invocation is the correct one.
24
-     *
25
-     * The matcher can store information from the invocation which can later
26
-     * be checked in verify(), or it can check the values directly and throw
27
-     * and exception if an expectation is not met.
28
-     *
29
-     * If the matcher is a stub it will also have a return value.
30
-     *
31
-     * @param PHPUnit_Framework_MockObject_Invocation $invocation Object containing information on a mocked or stubbed method which was invoked
32
-     *
33
-     * @return mixed
34
-     */
35
-    public function invoked(PHPUnit_Framework_MockObject_Invocation $invocation)
36
-    {
37
-    }
20
+	/**
21
+	 * Registers the invocation $invocation in the object as being invoked.
22
+	 * This will only occur after matches() returns true which means the
23
+	 * current invocation is the correct one.
24
+	 *
25
+	 * The matcher can store information from the invocation which can later
26
+	 * be checked in verify(), or it can check the values directly and throw
27
+	 * and exception if an expectation is not met.
28
+	 *
29
+	 * If the matcher is a stub it will also have a return value.
30
+	 *
31
+	 * @param PHPUnit_Framework_MockObject_Invocation $invocation Object containing information on a mocked or stubbed method which was invoked
32
+	 *
33
+	 * @return mixed
34
+	 */
35
+	public function invoked(PHPUnit_Framework_MockObject_Invocation $invocation)
36
+	{
37
+	}
38 38
 
39
-    /**
40
-     * Checks if the invocation $invocation matches the current rules. If it does
41
-     * the matcher will get the invoked() method called which should check if an
42
-     * expectation is met.
43
-     *
44
-     * @param PHPUnit_Framework_MockObject_Invocation $invocation Object containing information on a mocked or stubbed method which was invoked
45
-     *
46
-     * @return bool
47
-     */
48
-    public function verify()
49
-    {
50
-    }
39
+	/**
40
+	 * Checks if the invocation $invocation matches the current rules. If it does
41
+	 * the matcher will get the invoked() method called which should check if an
42
+	 * expectation is met.
43
+	 *
44
+	 * @param PHPUnit_Framework_MockObject_Invocation $invocation Object containing information on a mocked or stubbed method which was invoked
45
+	 *
46
+	 * @return bool
47
+	 */
48
+	public function verify()
49
+	{
50
+	}
51 51
 }
Please login to merge, or discard this patch.
vendor/phpunit/phpunit-mock-objects/src/Matcher/InvokedAtLeastOnce.php 1 patch
Indentation   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -18,28 +18,28 @@
 block discarded – undo
18 18
  */
19 19
 class PHPUnit_Framework_MockObject_Matcher_InvokedAtLeastOnce extends PHPUnit_Framework_MockObject_Matcher_InvokedRecorder
20 20
 {
21
-    /**
22
-     * @return string
23
-     */
24
-    public function toString()
25
-    {
26
-        return 'invoked at least once';
27
-    }
21
+	/**
22
+	 * @return string
23
+	 */
24
+	public function toString()
25
+	{
26
+		return 'invoked at least once';
27
+	}
28 28
 
29
-    /**
30
-     * Verifies that the current expectation is valid. If everything is OK the
31
-     * code should just return, if not it must throw an exception.
32
-     *
33
-     * @throws ExpectationFailedException
34
-     */
35
-    public function verify()
36
-    {
37
-        $count = $this->getInvocationCount();
29
+	/**
30
+	 * Verifies that the current expectation is valid. If everything is OK the
31
+	 * code should just return, if not it must throw an exception.
32
+	 *
33
+	 * @throws ExpectationFailedException
34
+	 */
35
+	public function verify()
36
+	{
37
+		$count = $this->getInvocationCount();
38 38
 
39
-        if ($count < 1) {
40
-            throw new ExpectationFailedException(
41
-                'Expected invocation at least once but it never occurred.'
42
-            );
43
-        }
44
-    }
39
+		if ($count < 1) {
40
+			throw new ExpectationFailedException(
41
+				'Expected invocation at least once but it never occurred.'
42
+			);
43
+		}
44
+	}
45 45
 }
Please login to merge, or discard this patch.
vendor/phpunit/phpunit-mock-objects/src/Matcher/InvokedAtMostCount.php 1 patch
Indentation   +34 added lines, -34 removed lines patch added patch discarded remove patch
@@ -16,42 +16,42 @@
 block discarded – undo
16 16
  */
17 17
 class PHPUnit_Framework_MockObject_Matcher_InvokedAtMostCount extends PHPUnit_Framework_MockObject_Matcher_InvokedRecorder
18 18
 {
19
-    /**
20
-     * @var int
21
-     */
22
-    private $allowedInvocations;
19
+	/**
20
+	 * @var int
21
+	 */
22
+	private $allowedInvocations;
23 23
 
24
-    /**
25
-     * @param int $allowedInvocations
26
-     */
27
-    public function __construct($allowedInvocations)
28
-    {
29
-        $this->allowedInvocations = $allowedInvocations;
30
-    }
24
+	/**
25
+	 * @param int $allowedInvocations
26
+	 */
27
+	public function __construct($allowedInvocations)
28
+	{
29
+		$this->allowedInvocations = $allowedInvocations;
30
+	}
31 31
 
32
-    /**
33
-     * @return string
34
-     */
35
-    public function toString()
36
-    {
37
-        return 'invoked at most ' . $this->allowedInvocations . ' times';
38
-    }
32
+	/**
33
+	 * @return string
34
+	 */
35
+	public function toString()
36
+	{
37
+		return 'invoked at most ' . $this->allowedInvocations . ' times';
38
+	}
39 39
 
40
-    /**
41
-     * Verifies that the current expectation is valid. If everything is OK the
42
-     * code should just return, if not it must throw an exception.
43
-     *
44
-     * @throws ExpectationFailedException
45
-     */
46
-    public function verify()
47
-    {
48
-        $count = $this->getInvocationCount();
40
+	/**
41
+	 * Verifies that the current expectation is valid. If everything is OK the
42
+	 * code should just return, if not it must throw an exception.
43
+	 *
44
+	 * @throws ExpectationFailedException
45
+	 */
46
+	public function verify()
47
+	{
48
+		$count = $this->getInvocationCount();
49 49
 
50
-        if ($count > $this->allowedInvocations) {
51
-            throw new ExpectationFailedException(
52
-                'Expected invocation at most ' . $this->allowedInvocations .
53
-                ' times but it occurred ' . $count . ' time(s).'
54
-            );
55
-        }
56
-    }
50
+		if ($count > $this->allowedInvocations) {
51
+			throw new ExpectationFailedException(
52
+				'Expected invocation at most ' . $this->allowedInvocations .
53
+				' times but it occurred ' . $count . ' time(s).'
54
+			);
55
+		}
56
+	}
57 57
 }
Please login to merge, or discard this patch.
vendor/phpunit/phpunit-mock-objects/src/Matcher/AnyParameters.php 1 patch
Indentation   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -13,21 +13,21 @@
 block discarded – undo
13 13
  */
14 14
 class PHPUnit_Framework_MockObject_Matcher_AnyParameters extends PHPUnit_Framework_MockObject_Matcher_StatelessInvocation
15 15
 {
16
-    /**
17
-     * @return string
18
-     */
19
-    public function toString()
20
-    {
21
-        return 'with any parameters';
22
-    }
16
+	/**
17
+	 * @return string
18
+	 */
19
+	public function toString()
20
+	{
21
+		return 'with any parameters';
22
+	}
23 23
 
24
-    /**
25
-     * @param PHPUnit_Framework_MockObject_Invocation $invocation
26
-     *
27
-     * @return bool
28
-     */
29
-    public function matches(PHPUnit_Framework_MockObject_Invocation $invocation)
30
-    {
31
-        return true;
32
-    }
24
+	/**
25
+	 * @param PHPUnit_Framework_MockObject_Invocation $invocation
26
+	 *
27
+	 * @return bool
28
+	 */
29
+	public function matches(PHPUnit_Framework_MockObject_Invocation $invocation)
30
+	{
31
+		return true;
32
+	}
33 33
 }
Please login to merge, or discard this patch.
vendor/phpunit/phpunit-mock-objects/src/Matcher/InvokedAtIndex.php 1 patch
Indentation   +55 added lines, -55 removed lines patch added patch discarded remove patch
@@ -22,66 +22,66 @@
 block discarded – undo
22 22
  */
23 23
 class PHPUnit_Framework_MockObject_Matcher_InvokedAtIndex implements PHPUnit_Framework_MockObject_Matcher_Invocation
24 24
 {
25
-    /**
26
-     * @var int
27
-     */
28
-    protected $sequenceIndex;
25
+	/**
26
+	 * @var int
27
+	 */
28
+	protected $sequenceIndex;
29 29
 
30
-    /**
31
-     * @var int
32
-     */
33
-    protected $currentIndex = -1;
30
+	/**
31
+	 * @var int
32
+	 */
33
+	protected $currentIndex = -1;
34 34
 
35
-    /**
36
-     * @param int $sequenceIndex
37
-     */
38
-    public function __construct($sequenceIndex)
39
-    {
40
-        $this->sequenceIndex = $sequenceIndex;
41
-    }
35
+	/**
36
+	 * @param int $sequenceIndex
37
+	 */
38
+	public function __construct($sequenceIndex)
39
+	{
40
+		$this->sequenceIndex = $sequenceIndex;
41
+	}
42 42
 
43
-    /**
44
-     * @return string
45
-     */
46
-    public function toString()
47
-    {
48
-        return 'invoked at sequence index ' . $this->sequenceIndex;
49
-    }
43
+	/**
44
+	 * @return string
45
+	 */
46
+	public function toString()
47
+	{
48
+		return 'invoked at sequence index ' . $this->sequenceIndex;
49
+	}
50 50
 
51
-    /**
52
-     * @param PHPUnit_Framework_MockObject_Invocation $invocation
53
-     *
54
-     * @return bool
55
-     */
56
-    public function matches(PHPUnit_Framework_MockObject_Invocation $invocation)
57
-    {
58
-        $this->currentIndex++;
51
+	/**
52
+	 * @param PHPUnit_Framework_MockObject_Invocation $invocation
53
+	 *
54
+	 * @return bool
55
+	 */
56
+	public function matches(PHPUnit_Framework_MockObject_Invocation $invocation)
57
+	{
58
+		$this->currentIndex++;
59 59
 
60
-        return $this->currentIndex == $this->sequenceIndex;
61
-    }
60
+		return $this->currentIndex == $this->sequenceIndex;
61
+	}
62 62
 
63
-    /**
64
-     * @param PHPUnit_Framework_MockObject_Invocation $invocation
65
-     */
66
-    public function invoked(PHPUnit_Framework_MockObject_Invocation $invocation)
67
-    {
68
-    }
63
+	/**
64
+	 * @param PHPUnit_Framework_MockObject_Invocation $invocation
65
+	 */
66
+	public function invoked(PHPUnit_Framework_MockObject_Invocation $invocation)
67
+	{
68
+	}
69 69
 
70
-    /**
71
-     * Verifies that the current expectation is valid. If everything is OK the
72
-     * code should just return, if not it must throw an exception.
73
-     *
74
-     * @throws ExpectationFailedException
75
-     */
76
-    public function verify()
77
-    {
78
-        if ($this->currentIndex < $this->sequenceIndex) {
79
-            throw new ExpectationFailedException(
80
-                sprintf(
81
-                    'The expected invocation at index %s was never reached.',
82
-                    $this->sequenceIndex
83
-                )
84
-            );
85
-        }
86
-    }
70
+	/**
71
+	 * Verifies that the current expectation is valid. If everything is OK the
72
+	 * code should just return, if not it must throw an exception.
73
+	 *
74
+	 * @throws ExpectationFailedException
75
+	 */
76
+	public function verify()
77
+	{
78
+		if ($this->currentIndex < $this->sequenceIndex) {
79
+			throw new ExpectationFailedException(
80
+				sprintf(
81
+					'The expected invocation at index %s was never reached.',
82
+					$this->sequenceIndex
83
+				)
84
+			);
85
+		}
86
+	}
87 87
 }
Please login to merge, or discard this patch.
vendor/phpunit/phpunit-mock-objects/src/Matcher/InvokedAtLeastCount.php 1 patch
Indentation   +34 added lines, -34 removed lines patch added patch discarded remove patch
@@ -16,42 +16,42 @@
 block discarded – undo
16 16
  */
17 17
 class PHPUnit_Framework_MockObject_Matcher_InvokedAtLeastCount extends PHPUnit_Framework_MockObject_Matcher_InvokedRecorder
18 18
 {
19
-    /**
20
-     * @var int
21
-     */
22
-    private $requiredInvocations;
19
+	/**
20
+	 * @var int
21
+	 */
22
+	private $requiredInvocations;
23 23
 
24
-    /**
25
-     * @param int $requiredInvocations
26
-     */
27
-    public function __construct($requiredInvocations)
28
-    {
29
-        $this->requiredInvocations = $requiredInvocations;
30
-    }
24
+	/**
25
+	 * @param int $requiredInvocations
26
+	 */
27
+	public function __construct($requiredInvocations)
28
+	{
29
+		$this->requiredInvocations = $requiredInvocations;
30
+	}
31 31
 
32
-    /**
33
-     * @return string
34
-     */
35
-    public function toString()
36
-    {
37
-        return 'invoked at least ' . $this->requiredInvocations . ' times';
38
-    }
32
+	/**
33
+	 * @return string
34
+	 */
35
+	public function toString()
36
+	{
37
+		return 'invoked at least ' . $this->requiredInvocations . ' times';
38
+	}
39 39
 
40
-    /**
41
-     * Verifies that the current expectation is valid. If everything is OK the
42
-     * code should just return, if not it must throw an exception.
43
-     *
44
-     * @throws ExpectationFailedException
45
-     */
46
-    public function verify()
47
-    {
48
-        $count = $this->getInvocationCount();
40
+	/**
41
+	 * Verifies that the current expectation is valid. If everything is OK the
42
+	 * code should just return, if not it must throw an exception.
43
+	 *
44
+	 * @throws ExpectationFailedException
45
+	 */
46
+	public function verify()
47
+	{
48
+		$count = $this->getInvocationCount();
49 49
 
50
-        if ($count < $this->requiredInvocations) {
51
-            throw new ExpectationFailedException(
52
-                'Expected invocation at least ' . $this->requiredInvocations .
53
-                ' times but it occurred ' . $count . ' time(s).'
54
-            );
55
-        }
56
-    }
50
+		if ($count < $this->requiredInvocations) {
51
+			throw new ExpectationFailedException(
52
+				'Expected invocation at least ' . $this->requiredInvocations .
53
+				' times but it occurred ' . $count . ' time(s).'
54
+			);
55
+		}
56
+	}
57 57
 }
Please login to merge, or discard this patch.
vendor/phpunit/phpunit-mock-objects/src/Matcher/Parameters.php 1 patch
Indentation   +136 added lines, -136 removed lines patch added patch discarded remove patch
@@ -22,140 +22,140 @@
 block discarded – undo
22 22
  */
23 23
 class PHPUnit_Framework_MockObject_Matcher_Parameters extends PHPUnit_Framework_MockObject_Matcher_StatelessInvocation
24 24
 {
25
-    /**
26
-     * @var Constraint[]
27
-     */
28
-    protected $parameters = [];
29
-
30
-    /**
31
-     * @var PHPUnit_Framework_MockObject_Invocation
32
-     */
33
-    protected $invocation;
34
-
35
-    /**
36
-     * @var ExpectationFailedException
37
-     */
38
-    private $parameterVerificationResult;
39
-
40
-    /**
41
-     * @param array $parameters
42
-     */
43
-    public function __construct(array $parameters)
44
-    {
45
-        foreach ($parameters as $parameter) {
46
-            if (!($parameter instanceof Constraint)) {
47
-                $parameter = new IsEqual(
48
-                    $parameter
49
-                );
50
-            }
51
-
52
-            $this->parameters[] = $parameter;
53
-        }
54
-    }
55
-
56
-    /**
57
-     * @return string
58
-     */
59
-    public function toString()
60
-    {
61
-        $text = 'with parameter';
62
-
63
-        foreach ($this->parameters as $index => $parameter) {
64
-            if ($index > 0) {
65
-                $text .= ' and';
66
-            }
67
-
68
-            $text .= ' ' . $index . ' ' . $parameter->toString();
69
-        }
70
-
71
-        return $text;
72
-    }
73
-
74
-    /**
75
-     * @param PHPUnit_Framework_MockObject_Invocation $invocation
76
-     *
77
-     * @return bool
78
-     */
79
-    public function matches(PHPUnit_Framework_MockObject_Invocation $invocation)
80
-    {
81
-        $this->invocation                  = $invocation;
82
-        $this->parameterVerificationResult = null;
83
-
84
-        try {
85
-            $this->parameterVerificationResult = $this->verify();
86
-
87
-            return $this->parameterVerificationResult;
88
-        } catch (ExpectationFailedException $e) {
89
-            $this->parameterVerificationResult = $e;
90
-
91
-            throw $this->parameterVerificationResult;
92
-        }
93
-    }
94
-
95
-    /**
96
-     * Checks if the invocation $invocation matches the current rules. If it
97
-     * does the matcher will get the invoked() method called which should check
98
-     * if an expectation is met.
99
-     *
100
-     * @return bool
101
-     *
102
-     * @throws ExpectationFailedException
103
-     */
104
-    public function verify()
105
-    {
106
-        if (isset($this->parameterVerificationResult)) {
107
-            return $this->guardAgainstDuplicateEvaluationOfParameterConstraints();
108
-        }
109
-
110
-        if ($this->invocation === null) {
111
-            throw new ExpectationFailedException(
112
-                'Mocked method does not exist.'
113
-            );
114
-        }
115
-
116
-        if (count($this->invocation->parameters) < count($this->parameters)) {
117
-            $message = 'Parameter count for invocation %s is too low.';
118
-
119
-            // The user called `->with($this->anything())`, but may have meant
120
-            // `->withAnyParameters()`.
121
-            //
122
-            // @see https://github.com/sebastianbergmann/phpunit-mock-objects/issues/199
123
-            if (count($this->parameters) === 1 &&
124
-                get_class($this->parameters[0]) === IsAnything::class) {
125
-                $message .= "\nTo allow 0 or more parameters with any value, omit ->with() or use ->withAnyParameters() instead.";
126
-            }
127
-
128
-            throw new ExpectationFailedException(
129
-                sprintf($message, $this->invocation->toString())
130
-            );
131
-        }
132
-
133
-        foreach ($this->parameters as $i => $parameter) {
134
-            $parameter->evaluate(
135
-                $this->invocation->parameters[$i],
136
-                sprintf(
137
-                    'Parameter %s for invocation %s does not match expected ' .
138
-                    'value.',
139
-                    $i,
140
-                    $this->invocation->toString()
141
-                )
142
-            );
143
-        }
144
-
145
-        return true;
146
-    }
147
-
148
-    /**
149
-     * @return bool
150
-     *
151
-     * @throws ExpectationFailedException
152
-     */
153
-    private function guardAgainstDuplicateEvaluationOfParameterConstraints()
154
-    {
155
-        if ($this->parameterVerificationResult instanceof Exception) {
156
-            throw $this->parameterVerificationResult;
157
-        }
158
-
159
-        return (bool) $this->parameterVerificationResult;
160
-    }
25
+	/**
26
+	 * @var Constraint[]
27
+	 */
28
+	protected $parameters = [];
29
+
30
+	/**
31
+	 * @var PHPUnit_Framework_MockObject_Invocation
32
+	 */
33
+	protected $invocation;
34
+
35
+	/**
36
+	 * @var ExpectationFailedException
37
+	 */
38
+	private $parameterVerificationResult;
39
+
40
+	/**
41
+	 * @param array $parameters
42
+	 */
43
+	public function __construct(array $parameters)
44
+	{
45
+		foreach ($parameters as $parameter) {
46
+			if (!($parameter instanceof Constraint)) {
47
+				$parameter = new IsEqual(
48
+					$parameter
49
+				);
50
+			}
51
+
52
+			$this->parameters[] = $parameter;
53
+		}
54
+	}
55
+
56
+	/**
57
+	 * @return string
58
+	 */
59
+	public function toString()
60
+	{
61
+		$text = 'with parameter';
62
+
63
+		foreach ($this->parameters as $index => $parameter) {
64
+			if ($index > 0) {
65
+				$text .= ' and';
66
+			}
67
+
68
+			$text .= ' ' . $index . ' ' . $parameter->toString();
69
+		}
70
+
71
+		return $text;
72
+	}
73
+
74
+	/**
75
+	 * @param PHPUnit_Framework_MockObject_Invocation $invocation
76
+	 *
77
+	 * @return bool
78
+	 */
79
+	public function matches(PHPUnit_Framework_MockObject_Invocation $invocation)
80
+	{
81
+		$this->invocation                  = $invocation;
82
+		$this->parameterVerificationResult = null;
83
+
84
+		try {
85
+			$this->parameterVerificationResult = $this->verify();
86
+
87
+			return $this->parameterVerificationResult;
88
+		} catch (ExpectationFailedException $e) {
89
+			$this->parameterVerificationResult = $e;
90
+
91
+			throw $this->parameterVerificationResult;
92
+		}
93
+	}
94
+
95
+	/**
96
+	 * Checks if the invocation $invocation matches the current rules. If it
97
+	 * does the matcher will get the invoked() method called which should check
98
+	 * if an expectation is met.
99
+	 *
100
+	 * @return bool
101
+	 *
102
+	 * @throws ExpectationFailedException
103
+	 */
104
+	public function verify()
105
+	{
106
+		if (isset($this->parameterVerificationResult)) {
107
+			return $this->guardAgainstDuplicateEvaluationOfParameterConstraints();
108
+		}
109
+
110
+		if ($this->invocation === null) {
111
+			throw new ExpectationFailedException(
112
+				'Mocked method does not exist.'
113
+			);
114
+		}
115
+
116
+		if (count($this->invocation->parameters) < count($this->parameters)) {
117
+			$message = 'Parameter count for invocation %s is too low.';
118
+
119
+			// The user called `->with($this->anything())`, but may have meant
120
+			// `->withAnyParameters()`.
121
+			//
122
+			// @see https://github.com/sebastianbergmann/phpunit-mock-objects/issues/199
123
+			if (count($this->parameters) === 1 &&
124
+				get_class($this->parameters[0]) === IsAnything::class) {
125
+				$message .= "\nTo allow 0 or more parameters with any value, omit ->with() or use ->withAnyParameters() instead.";
126
+			}
127
+
128
+			throw new ExpectationFailedException(
129
+				sprintf($message, $this->invocation->toString())
130
+			);
131
+		}
132
+
133
+		foreach ($this->parameters as $i => $parameter) {
134
+			$parameter->evaluate(
135
+				$this->invocation->parameters[$i],
136
+				sprintf(
137
+					'Parameter %s for invocation %s does not match expected ' .
138
+					'value.',
139
+					$i,
140
+					$this->invocation->toString()
141
+				)
142
+			);
143
+		}
144
+
145
+		return true;
146
+	}
147
+
148
+	/**
149
+	 * @return bool
150
+	 *
151
+	 * @throws ExpectationFailedException
152
+	 */
153
+	private function guardAgainstDuplicateEvaluationOfParameterConstraints()
154
+	{
155
+		if ($this->parameterVerificationResult instanceof Exception) {
156
+			throw $this->parameterVerificationResult;
157
+		}
158
+
159
+		return (bool) $this->parameterVerificationResult;
160
+	}
161 161
 }
Please login to merge, or discard this patch.
vendor/phpunit/phpunit-mock-objects/src/Matcher/InvokedRecorder.php 1 patch
Indentation   +41 added lines, -41 removed lines patch added patch discarded remove patch
@@ -16,50 +16,50 @@
 block discarded – undo
16 16
  */
17 17
 abstract class PHPUnit_Framework_MockObject_Matcher_InvokedRecorder implements PHPUnit_Framework_MockObject_Matcher_Invocation
18 18
 {
19
-    /**
20
-     * @var PHPUnit_Framework_MockObject_Invocation[]
21
-     */
22
-    protected $invocations = [];
19
+	/**
20
+	 * @var PHPUnit_Framework_MockObject_Invocation[]
21
+	 */
22
+	protected $invocations = [];
23 23
 
24
-    /**
25
-     * @return int
26
-     */
27
-    public function getInvocationCount()
28
-    {
29
-        return count($this->invocations);
30
-    }
24
+	/**
25
+	 * @return int
26
+	 */
27
+	public function getInvocationCount()
28
+	{
29
+		return count($this->invocations);
30
+	}
31 31
 
32
-    /**
33
-     * @return PHPUnit_Framework_MockObject_Invocation[]
34
-     */
35
-    public function getInvocations()
36
-    {
37
-        return $this->invocations;
38
-    }
32
+	/**
33
+	 * @return PHPUnit_Framework_MockObject_Invocation[]
34
+	 */
35
+	public function getInvocations()
36
+	{
37
+		return $this->invocations;
38
+	}
39 39
 
40
-    /**
41
-     * @return bool
42
-     */
43
-    public function hasBeenInvoked()
44
-    {
45
-        return count($this->invocations) > 0;
46
-    }
40
+	/**
41
+	 * @return bool
42
+	 */
43
+	public function hasBeenInvoked()
44
+	{
45
+		return count($this->invocations) > 0;
46
+	}
47 47
 
48
-    /**
49
-     * @param PHPUnit_Framework_MockObject_Invocation $invocation
50
-     */
51
-    public function invoked(PHPUnit_Framework_MockObject_Invocation $invocation)
52
-    {
53
-        $this->invocations[] = $invocation;
54
-    }
48
+	/**
49
+	 * @param PHPUnit_Framework_MockObject_Invocation $invocation
50
+	 */
51
+	public function invoked(PHPUnit_Framework_MockObject_Invocation $invocation)
52
+	{
53
+		$this->invocations[] = $invocation;
54
+	}
55 55
 
56
-    /**
57
-     * @param PHPUnit_Framework_MockObject_Invocation $invocation
58
-     *
59
-     * @return bool
60
-     */
61
-    public function matches(PHPUnit_Framework_MockObject_Invocation $invocation)
62
-    {
63
-        return true;
64
-    }
56
+	/**
57
+	 * @param PHPUnit_Framework_MockObject_Invocation $invocation
58
+	 *
59
+	 * @return bool
60
+	 */
61
+	public function matches(PHPUnit_Framework_MockObject_Invocation $invocation)
62
+	{
63
+		return true;
64
+	}
65 65
 }
Please login to merge, or discard this patch.
vendor/phpunit/phpunit-mock-objects/src/Matcher/InvokedCount.php 1 patch
Indentation   +75 added lines, -75 removed lines patch added patch discarded remove patch
@@ -20,91 +20,91 @@
 block discarded – undo
20 20
  */
21 21
 class PHPUnit_Framework_MockObject_Matcher_InvokedCount extends PHPUnit_Framework_MockObject_Matcher_InvokedRecorder
22 22
 {
23
-    /**
24
-     * @var int
25
-     */
26
-    protected $expectedCount;
23
+	/**
24
+	 * @var int
25
+	 */
26
+	protected $expectedCount;
27 27
 
28
-    /**
29
-     * @param int $expectedCount
30
-     */
31
-    public function __construct($expectedCount)
32
-    {
33
-        $this->expectedCount = $expectedCount;
34
-    }
28
+	/**
29
+	 * @param int $expectedCount
30
+	 */
31
+	public function __construct($expectedCount)
32
+	{
33
+		$this->expectedCount = $expectedCount;
34
+	}
35 35
 
36
-    /**
37
-     * @return bool
38
-     */
39
-    public function isNever()
40
-    {
41
-        return $this->expectedCount == 0;
42
-    }
36
+	/**
37
+	 * @return bool
38
+	 */
39
+	public function isNever()
40
+	{
41
+		return $this->expectedCount == 0;
42
+	}
43 43
 
44
-    /**
45
-     * @return string
46
-     */
47
-    public function toString()
48
-    {
49
-        return 'invoked ' . $this->expectedCount . ' time(s)';
50
-    }
44
+	/**
45
+	 * @return string
46
+	 */
47
+	public function toString()
48
+	{
49
+		return 'invoked ' . $this->expectedCount . ' time(s)';
50
+	}
51 51
 
52
-    /**
53
-     * @param PHPUnit_Framework_MockObject_Invocation $invocation
54
-     *
55
-     * @throws ExpectationFailedException
56
-     */
57
-    public function invoked(PHPUnit_Framework_MockObject_Invocation $invocation)
58
-    {
59
-        parent::invoked($invocation);
52
+	/**
53
+	 * @param PHPUnit_Framework_MockObject_Invocation $invocation
54
+	 *
55
+	 * @throws ExpectationFailedException
56
+	 */
57
+	public function invoked(PHPUnit_Framework_MockObject_Invocation $invocation)
58
+	{
59
+		parent::invoked($invocation);
60 60
 
61
-        $count = $this->getInvocationCount();
61
+		$count = $this->getInvocationCount();
62 62
 
63
-        if ($count > $this->expectedCount) {
64
-            $message = $invocation->toString() . ' ';
63
+		if ($count > $this->expectedCount) {
64
+			$message = $invocation->toString() . ' ';
65 65
 
66
-            switch ($this->expectedCount) {
67
-                case 0: {
68
-                    $message .= 'was not expected to be called.';
69
-                }
70
-                break;
66
+			switch ($this->expectedCount) {
67
+				case 0: {
68
+					$message .= 'was not expected to be called.';
69
+				}
70
+				break;
71 71
 
72
-                case 1: {
73
-                    $message .= 'was not expected to be called more than once.';
74
-                }
75
-                break;
72
+				case 1: {
73
+					$message .= 'was not expected to be called more than once.';
74
+				}
75
+				break;
76 76
 
77
-                default: {
78
-                    $message .= sprintf(
79
-                        'was not expected to be called more than %d times.',
80
-                        $this->expectedCount
81
-                    );
82
-                    }
83
-            }
77
+				default: {
78
+					$message .= sprintf(
79
+						'was not expected to be called more than %d times.',
80
+						$this->expectedCount
81
+					);
82
+					}
83
+			}
84 84
 
85
-            throw new ExpectationFailedException($message);
86
-        }
87
-    }
85
+			throw new ExpectationFailedException($message);
86
+		}
87
+	}
88 88
 
89
-    /**
90
-     * Verifies that the current expectation is valid. If everything is OK the
91
-     * code should just return, if not it must throw an exception.
92
-     *
93
-     * @throws ExpectationFailedException
94
-     */
95
-    public function verify()
96
-    {
97
-        $count = $this->getInvocationCount();
89
+	/**
90
+	 * Verifies that the current expectation is valid. If everything is OK the
91
+	 * code should just return, if not it must throw an exception.
92
+	 *
93
+	 * @throws ExpectationFailedException
94
+	 */
95
+	public function verify()
96
+	{
97
+		$count = $this->getInvocationCount();
98 98
 
99
-        if ($count !== $this->expectedCount) {
100
-            throw new ExpectationFailedException(
101
-                sprintf(
102
-                    'Method was expected to be called %d times, ' .
103
-                    'actually called %d times.',
104
-                    $this->expectedCount,
105
-                    $count
106
-                )
107
-            );
108
-        }
109
-    }
99
+		if ($count !== $this->expectedCount) {
100
+			throw new ExpectationFailedException(
101
+				sprintf(
102
+					'Method was expected to be called %d times, ' .
103
+					'actually called %d times.',
104
+					$this->expectedCount,
105
+					$count
106
+				)
107
+			);
108
+		}
109
+	}
110 110
 }
Please login to merge, or discard this patch.