Skip to content

Commit

Permalink
Code Sniff Fixes
Browse files Browse the repository at this point in the history
Signed-off-by: Justin Yost <justin@loadsys.com>
  • Loading branch information
justinyost committed May 27, 2016
1 parent 7da2984 commit 6e516b3
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
3 changes: 2 additions & 1 deletion src/Model/Behavior/SitemapBehavior.php
Expand Up @@ -4,6 +4,7 @@
*/
namespace Sitemap\Model\Behavior;

use Cake\Datasource\ResultSetInterface;
use Cake\ORM\Behavior;
use Cake\ORM\Entity;
use Cake\ORM\Query;
Expand Down Expand Up @@ -110,7 +111,7 @@ public function findSitemapRecords(Query $query, array $options) {
* @return \Cake\Collection\CollectionInterface Returns the modified collection
* of Results.
*/
public function mapResults(\Cake\Datasource\ResultSetInterface $results) {
public function mapResults(ResultSetInterface $results) {
return $results->map(function ($entity) {
return $this->mapEntity($entity);
});
Expand Down
3 changes: 2 additions & 1 deletion tests/TestCase/Controller/SitemapsControllerTest.php
Expand Up @@ -4,6 +4,7 @@
*/
namespace Sitemap\Test\TestCase\Controller;

use Cake\Core\Configure;
use Cake\ORM\TableRegistry;
use Cake\TestSuite\IntegrationTestCase;
use Sitemap\Controller\SitemapsController;
Expand Down Expand Up @@ -81,7 +82,7 @@ public function testIndexNoModels() {
* @covers \Sitemap\Controller\SitemapsController::index
*/
public function testIndexWithModels() {
\Cake\Core\Configure::write('Sitemap.tables', ['Pages']);
Configure::write('Sitemap.tables', ['Pages']);
$pagesFindQuery = $this->Pages->find('forSitemap');

$Controller = $this->getMock(
Expand Down
5 changes: 3 additions & 2 deletions tests/TestCase/Model/Behavior/SitemapBehaviorTest.php
Expand Up @@ -5,6 +5,7 @@
namespace Sitemap\Test\TestCase\Model\Behavior;

use Cake\Datasource\ConnectionManager;
use Cake\I18n\Time;
use Cake\ORM\Entity;
use Cake\ORM\Table;
use Cake\ORM\TableRegistry;
Expand Down Expand Up @@ -209,7 +210,7 @@ public function testMapEntity() {
);

$this->assertEquals(
new \Cake\I18n\Time('2015-10-08 21:27:04'),
new Time('2015-10-08 21:27:04'),
$entity->_lastmod,
'The _loc field should be set to our standard url'
);
Expand Down Expand Up @@ -243,7 +244,7 @@ public function testMapEntity() {
);

$this->assertEquals(
new \Cake\I18n\Time('2015-10-08 21:27:04'),
new Time('2015-10-08 21:27:04'),
$entity->_lastmod,
'The _loc field should be set to our standard url'
);
Expand Down

0 comments on commit 6e516b3

Please sign in to comment.