Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Library CS Fixes #256

Merged
merged 1 commit into from
Jan 19, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions library/Mockery/Adapter/Phpunit/TestListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@
* @copyright Copyright (c) 2010 Pádraic Brady (http://blog.astrumfutura.com)
* @license http://github.com/padraic/mockery/blob/master/LICENSE New BSD License
*/

namespace Mockery\Adapter\Phpunit;

class TestListener implements \PHPUnit_Framework_TestListener
{

/**
* After each test, perform Mockery verification tasks and cleanup the
* statically stored Mockery container for the next test.
Expand All @@ -45,12 +45,12 @@ public function endTest(\PHPUnit_Framework_Test $test, $time)
$result->addError($test, $e, $time);
}
}
/**
* Add Mockery files to PHPUnit's blacklist so they don't showup on coverage reports
*/

/**
* Add Mockery files to PHPUnit's blacklist so they don't showup on coverage reports
*/
public function startTestSuite(\PHPUnit_Framework_TestSuite $suite) {

if (class_exists('\\PHP_CodeCoverage_Filter')
&& method_exists('\\PHP_CodeCoverage_Filter', 'getInstance')) {
\PHP_CodeCoverage_Filter::getInstance()->addDirectoryToBlacklist(
Expand Down
16 changes: 8 additions & 8 deletions library/Mockery/CompositeExpectation.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* @copyright Copyright (c) 2010 Pádraic Brady (http://blog.astrumfutura.com)
* @license http://github.com/padraic/mockery/blob/master/LICENSE New BSD License
*/

namespace Mockery;

class CompositeExpectation
Expand All @@ -29,7 +29,7 @@ class CompositeExpectation
* @var array
*/
protected $_expectations = array();

/**
* Add an expectation to the composite
*
Expand All @@ -40,7 +40,7 @@ public function add($expectation)
{
$this->_expectations[] = $expectation;
}

/**
* Intercept any expectation calls and direct against all expectations
*
Expand All @@ -55,7 +55,7 @@ public function __call($method, array $args)
}
return $this;
}

/**
* Return order number of the first expectation
*
Expand All @@ -67,7 +67,7 @@ public function getOrderNumber()
$first = current($this->_expectations);
return $first->getOrderNumber();
}

/**
* Return the parent mock of the first expectation
*
Expand All @@ -79,7 +79,7 @@ public function getMock()
$first = current($this->_expectations);
return $first->getMock();
}

/**
* Mockery API alias to getMock
*
Expand All @@ -89,7 +89,7 @@ public function mock()
{
return $this->getMock();
}

/**
* Starts a new expectation addition on the first mock which is the primary
* target outside of a demeter chain
Expand All @@ -103,7 +103,7 @@ public function shouldReceive()
$first = current($this->_expectations);
return call_user_func_array(array($first->getMock(), 'shouldReceive'), $args);
}

/**
* Return the string summary of this composite expectation
*
Expand Down
18 changes: 9 additions & 9 deletions library/Mockery/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* @copyright Copyright (c) 2010 Pádraic Brady (http://blog.astrumfutura.com)
* @license http://github.com/padraic/mockery/blob/master/LICENSE New BSD License
*/

namespace Mockery;

class Configuration
Expand All @@ -30,7 +30,7 @@ class Configuration
* @var bool
*/
protected $_allowMockingNonExistentMethod = true;

/**
* Boolean assertion of whether we ignore unnecessary mocking of methods,
* i.e. when method expectations are made, set using a zeroOrMoreTimes()
Expand All @@ -40,14 +40,14 @@ class Configuration
* @var bool
*/
protected $_allowMockingMethodsUnnecessarily = true;

/**
* Parameter map for use with PHP internal classes.
*
* @var array
*/
protected $_internalClassParamMap = array();

/**
* Set boolean to allow/prevent mocking of non-existent methods
*
Expand All @@ -57,7 +57,7 @@ public function allowMockingNonExistentMethods($flag = true)
{
$this->_allowMockingNonExistentMethod = (bool) $flag;
}

/**
* Return flag indicating whether mocking non-existent methods allowed
*
Expand All @@ -67,7 +67,7 @@ public function mockingNonExistentMethodsAllowed()
{
return $this->_allowMockingNonExistentMethod;
}

/**
* Set boolean to allow/prevent unnecessary mocking of methods
*
Expand All @@ -77,7 +77,7 @@ public function allowMockingMethodsUnnecessarily($flag = true)
{
$this->_allowMockingMethodsUnnecessarily = (bool) $flag;
}

/**
* Return flag indicating whether mocking non-existent methods allowed
*
Expand All @@ -87,7 +87,7 @@ public function mockingMethodsUnnecessarilyAllowed()
{
return $this->_allowMockingMethodsUnnecessarily;
}

/**
* Set a parameter map (array of param signature strings) for the method
* of an internal PHP class.
Expand All @@ -110,7 +110,7 @@ public function setInternalClassMethodParamMap($class, $method, array $map)
public function resetInternalClassMethodParamMaps() {
$this->_internalClassParamMap = array();
}

/**
* Get the parameter map of an internal PHP class method
*
Expand Down
6 changes: 3 additions & 3 deletions library/Mockery/Container.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public function __construct(Generator $generator = null, LoaderInterface $loader
$this->_generator = $generator ?: \Mockery::getDefaultGenerator();
$this->_loader = $loader ?: \Mockery::getDefaultLoader();
}

/**
* Generates a new mock object for this container
*
Expand Down Expand Up @@ -167,7 +167,7 @@ public function mock()
} else if (is_array($arg)) {
$constructorArgs = array_shift($args);
continue;
}
}

throw new \Mockery\Exception(
'Unable to parse arguments sent to '
Expand Down Expand Up @@ -217,7 +217,7 @@ public function getGenerator()
{
return $this->_generator;
}

/**
* Tear down tasks for this container
*
Expand Down
2 changes: 1 addition & 1 deletion library/Mockery/CountValidator/AtLeast.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* @copyright Copyright (c) 2010 Pádraic Brady (http://blog.astrumfutura.com)
* @license http://github.com/padraic/mockery/blob/master/LICENSE New BSD License
*/

namespace Mockery\CountValidator;
use Mockery;

Expand Down
2 changes: 1 addition & 1 deletion library/Mockery/CountValidator/AtMost.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* @copyright Copyright (c) 2010 Pádraic Brady (http://blog.astrumfutura.com)
* @license http://github.com/padraic/mockery/blob/master/LICENSE New BSD License
*/

namespace Mockery\CountValidator;
use Mockery;

Expand Down
8 changes: 4 additions & 4 deletions library/Mockery/CountValidator/CountValidatorAbstract.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* @copyright Copyright (c) 2010 Pádraic Brady (http://blog.astrumfutura.com)
* @license http://github.com/padraic/mockery/blob/master/LICENSE New BSD License
*/

namespace Mockery\CountValidator;

abstract class CountValidatorAbstract
Expand All @@ -29,7 +29,7 @@ abstract class CountValidatorAbstract
* @var \Mockery\Expectation
*/
protected $_expectation = null;

/**
* Call count limit
*
Expand All @@ -48,7 +48,7 @@ public function __construct(\Mockery\Expectation $expectation, $limit)
$this->_expectation = $expectation;
$this->_limit = $limit;
}

/**
* Checks if the validator can accept an additional nth call
*
Expand All @@ -59,7 +59,7 @@ public function isEligible($n)
{
return ($n < $this->_limit);
}

/**
* Validate the call count against this validator
*
Expand Down
2 changes: 1 addition & 1 deletion library/Mockery/CountValidator/Exact.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* @copyright Copyright (c) 2010 Pádraic Brady (http://blog.astrumfutura.com)
* @license http://github.com/padraic/mockery/blob/master/LICENSE New BSD License
*/

namespace Mockery\CountValidator;
use Mockery;

Expand Down
2 changes: 1 addition & 1 deletion library/Mockery/CountValidator/Exception.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* @copyright Copyright (c) 2010 Pádraic Brady (http://blog.astrumfutura.com)
* @license http://github.com/padraic/mockery/blob/master/LICENSE New BSD License
*/

namespace Mockery\CountValidator;

class Exception extends \OutOfBoundsException
Expand Down
2 changes: 1 addition & 1 deletion library/Mockery/Exception.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* @copyright Copyright (c) 2010 Pádraic Brady (http://blog.astrumfutura.com)
* @license http://github.com/padraic/mockery/blob/master/LICENSE New BSD License
*/

namespace Mockery;

class Exception extends \UnexpectedValueException
Expand Down
2 changes: 1 addition & 1 deletion library/Mockery/Exception/InvalidCountException.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* @copyright Copyright (c) 2010 Pádraic Brady (http://blog.astrumfutura.com)
* @license http://github.com/padraic/mockery/blob/master/LICENSE New BSD License
*/

namespace Mockery\Exception;
use Mockery;

Expand Down
2 changes: 1 addition & 1 deletion library/Mockery/Exception/InvalidOrderException.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* @copyright Copyright (c) 2010 Pádraic Brady (http://blog.astrumfutura.com)
* @license http://github.com/padraic/mockery/blob/master/LICENSE New BSD License
*/

namespace Mockery\Exception;
use Mockery;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* @copyright Copyright (c) 2010 Pádraic Brady (http://blog.astrumfutura.com)
* @license http://github.com/padraic/mockery/blob/master/LICENSE New BSD License
*/

namespace Mockery\Exception;
use Mockery;

Expand Down
Loading