Skip to content
This repository has been archived by the owner on Jan 31, 2020. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
- Updated copyright year
- Removed unneeded annotations
- Removed empty lines at start and finish of classes
  • Loading branch information
weierophinney committed Jan 3, 2014
1 parent 7404563 commit 1962fd4
Show file tree
Hide file tree
Showing 10 changed files with 10 additions and 38 deletions.
4 changes: 1 addition & 3 deletions src/Guard/AllGuardsTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/

Expand All @@ -14,9 +14,7 @@
*/
trait AllGuardsTrait
{

use ArrayOrTraversableGuardTrait;
use EmptyGuardTrait;
use NullGuardTrait;

}
4 changes: 1 addition & 3 deletions src/Guard/ArrayOrTraversableGuardTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/

Expand All @@ -16,7 +16,6 @@
*/
trait ArrayOrTraversableGuardTrait
{

/**
* Verifies that the data is an array or Traversable
*
Expand All @@ -39,5 +38,4 @@ protected function guardForArrayOrTraversable(
throw new $exceptionClass($message);
}
}

}
4 changes: 1 addition & 3 deletions src/Guard/EmptyGuardTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/

Expand All @@ -14,7 +14,6 @@
*/
trait EmptyGuardTrait
{

/**
* Verify that the data is not empty
*
Expand All @@ -33,5 +32,4 @@ protected function guardAgainstEmpty(
throw new $exceptionClass($message);
}
}

}
5 changes: 1 addition & 4 deletions src/Guard/GuardUtils.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/

Expand All @@ -20,10 +20,8 @@
*/
abstract class GuardUtils
{

const DEFAULT_EXCEPTION_CLASS = 'Zend\Stdlib\Exception\InvalidArgumentException';


/**
* Verifies that the data is an array or Traversable
*
Expand Down Expand Up @@ -84,5 +82,4 @@ public static function guardAgainstNull(
throw new $exceptionClass($message);
}
}

}
4 changes: 1 addition & 3 deletions src/Guard/NullGuardTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/

Expand All @@ -14,7 +14,6 @@
*/
trait NullGuardTrait
{

/**
* Verify that the data is not null
*
Expand All @@ -33,5 +32,4 @@ protected function guardAgainstNull(
throw new $exceptionClass($message);
}
}

}
5 changes: 1 addition & 4 deletions test/Guard/ArrayOrTraversableGuardTraitTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/

Expand All @@ -15,12 +15,10 @@

/**
* @requires PHP 5.4
* @group Zend_StdLib_Guard
* @covers Zend\Stdlib\Guard\ArrayOrTraversableGuardTrait
*/
class ArrayOrTraversableGuardTraitTest extends TestCase
{

public function setUp()
{
if (version_compare(PHP_VERSION, '5.4.0', '<')) {
Expand Down Expand Up @@ -50,5 +48,4 @@ public function testGuardForArrayOrTraversableAllowsTraversable()
$traversable = new ArrayObject;
$this->assertNull($object->setArrayOrTraversable($traversable));
}

}
5 changes: 1 addition & 4 deletions test/Guard/EmptyGuardTraitTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/

Expand All @@ -14,12 +14,10 @@

/**
* @requires PHP 5.4
* @group Zend_StdLib_Guard
* @covers Zend\Stdlib\Guard\EmptyGuardTrait
*/
class EmptyGuardTraitTest extends TestCase
{

public function setUp()
{
if (version_compare(PHP_VERSION, '5.4.0', '<')) {
Expand All @@ -42,5 +40,4 @@ public function testGuardAgainstEmptyAllowsNonEmptyString()
$object = new GuardedObject;
$this->assertNull($object->setNotEmpty('foo'));
}

}
5 changes: 1 addition & 4 deletions test/Guard/GuardUtilsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/

Expand All @@ -14,12 +14,10 @@
use Zend\Stdlib\ArrayObject;

/**
* @group Zend_StdLib_Guard
* @covers Zend\Stdlib\Guard\GuardUtils
*/
class GuardUtilsTest extends TestCase
{

public function testGuardForArrayOrTraversableThrowsException()
{
$this->setExpectedException(
Expand Down Expand Up @@ -67,5 +65,4 @@ public function testGuardAgainstNullAllowsNonNull()
{
$this->assertNull(GuardUtils::guardAgainstNull('foo'));
}

}
5 changes: 1 addition & 4 deletions test/Guard/NullGuardTraitTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/

Expand All @@ -14,12 +14,10 @@

/**
* @requires PHP 5.4
* @group Zend_StdLib_Guard
* @covers Zend\Stdlib\Guard\NullGuardTrait
*/
class NullGuardTraitTest extends TestCase
{

public function setUp()
{
if (version_compare(PHP_VERSION, '5.4.0', '<')) {
Expand All @@ -42,5 +40,4 @@ public function testGuardAgainstNullAllowsNonNull()
$object = new GuardedObject;
$this->assertNull($object->setNotNull('foo'));
}

}
7 changes: 1 addition & 6 deletions test/TestAsset/GuardedObject.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,16 @@
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/

namespace ZendTest\Stdlib\TestAsset;

use Zend\Stdlib\Guard\AllGuardsTrait;

/**
* @group Zend_Stdlib_Guard
*/
class GuardedObject
{

use AllGuardsTrait;

public function setArrayOrTraversable($value)
Expand All @@ -33,5 +29,4 @@ public function setNotNull($value)
{
$this->guardAgainstNull($value);
}

}

0 comments on commit 1962fd4

Please sign in to comment.