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

Apply fixes from StyleCI #2

Merged
merged 1 commit into from
Oct 23, 2018
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
53 changes: 26 additions & 27 deletions src/Events/AbstractEventInterface.php
Original file line number Diff line number Diff line change
@@ -1,27 +1,26 @@
<?php
/**
* This file is part of bigperson/exchange1c package.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
declare(strict_types=1);


namespace Bigperson\Exchange1C\Events;

/**
* Class AbstractEventInterface
*/
abstract class AbstractEventInterface implements \Bigperson\Exchange1C\Interfaces\EventInterface
{
public const NAME = self::class;

/**
* @return string
*/
public function getName(): string
{
return self::NAME;
}
}
<?php
/**
* This file is part of bigperson/exchange1c package.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
declare(strict_types=1);

namespace Bigperson\Exchange1C\Events;

/**
* Class AbstractEventInterface.
*/
abstract class AbstractEventInterface implements \Bigperson\Exchange1C\Interfaces\EventInterface
{
public const NAME = self::class;

/**
* @return string
*/
public function getName(): string
{
return self::NAME;
}
}
44 changes: 21 additions & 23 deletions src/Interfaces/EventDispatcherInterface.php
Original file line number Diff line number Diff line change
@@ -1,23 +1,21 @@
<?php
/**
* This file is part of bigperson/exchange1c package.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
declare(strict_types=1);


namespace Bigperson\Exchange1C\Interfaces;

/**
* Interface EventDispatcherInterface
* @package Bigperson\Exchange1C\Interfaces
*/
interface EventDispatcherInterface
{
/**
* @param EventInterface $event
*/
public function dispatch(EventInterface $event): void;
}
<?php
/**
* This file is part of bigperson/exchange1c package.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
declare(strict_types=1);

namespace Bigperson\Exchange1C\Interfaces;

/**
* Interface EventDispatcherInterface.
*/
interface EventDispatcherInterface
{
/**
* @param EventInterface $event
*/
public function dispatch(EventInterface $event): void;
}
44 changes: 21 additions & 23 deletions src/Interfaces/EventInterface.php
Original file line number Diff line number Diff line change
@@ -1,23 +1,21 @@
<?php
/**
* This file is part of bigperson/exchange1c package.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
declare(strict_types=1);


namespace Bigperson\Exchange1C\Interfaces;

/**
* Interface EventInterface
* @package Bigperson\Exchange1C\Interfaces
*/
interface EventInterface
{
/**
* @return string
*/
public function getName(): string;
}
<?php
/**
* This file is part of bigperson/exchange1c package.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
declare(strict_types=1);

namespace Bigperson\Exchange1C\Interfaces;

/**
* Interface EventInterface.
*/
interface EventInterface
{
/**
* @return string
*/
public function getName(): string;
}
52 changes: 25 additions & 27 deletions tests/Events/EventTest.php
Original file line number Diff line number Diff line change
@@ -1,27 +1,25 @@
<?php
/**
* This file is part of bigperson/exchange1c package.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
declare(strict_types=1);


namespace Tests\Events;

use Bigperson\Exchange1C\Events\BeforeOffersSync;
use Tests\TestCase;

/**
* Class EventTest
*/
class EventTest extends TestCase
{
public function testGetName()
{
$event = new BeforeOffersSync();
$this->assertTrue(is_string($event->getName()));

}
}
<?php
/**
* This file is part of bigperson/exchange1c package.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
declare(strict_types=1);

namespace Tests\Events;

use Bigperson\Exchange1C\Events\BeforeOffersSync;
use Tests\TestCase;

/**
* Class EventTest.
*/
class EventTest extends TestCase
{
public function testGetName()
{
$event = new BeforeOffersSync();
$this->assertTrue(is_string($event->getName()));
}
}
6 changes: 3 additions & 3 deletions tests/Services/CategoryServiceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@

namespace Tests\Services;

use Tests\TestCase;
use Bigperson\Exchange1C\Config;
use Bigperson\Exchange1C\Interfaces\EventDispatcherInterface;
use Bigperson\Exchange1C\ModelBuilder;
use Symfony\Component\HttpFoundation\Request;
use Bigperson\Exchange1C\Services\CategoryService;
use Bigperson\Exchange1C\Interfaces\EventDispatcherInterface;
use Symfony\Component\HttpFoundation\Request;
use Tests\TestCase;

class CategoryServiceTest extends TestCase
{
Expand Down
6 changes: 3 additions & 3 deletions tests/Services/OfferServiceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@

namespace Tests\Services;

use Tests\TestCase;
use Bigperson\Exchange1C\Config;
use Bigperson\Exchange1C\Interfaces\EventDispatcherInterface;
use Bigperson\Exchange1C\ModelBuilder;
use Symfony\Component\HttpFoundation\Request;
use Bigperson\Exchange1C\Services\OfferService;
use Bigperson\Exchange1C\Interfaces\EventDispatcherInterface;
use Symfony\Component\HttpFoundation\Request;
use Tests\TestCase;

class OfferServiceTest extends TestCase
{
Expand Down