mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-01-11 09:48:40 +00:00
Automated formatting changes
This commit is contained in:
parent
cf72e2f5ec
commit
06471f5f71
|
|
@ -184,7 +184,7 @@ final class HttpHeader extends HeaderAbstract
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function getBrowserName(): string
|
||||
public function getBrowserName() : string
|
||||
{
|
||||
$userAgent = $_SERVER['HTTP_USER_AGENT'];
|
||||
|
||||
|
|
|
|||
|
|
@ -105,7 +105,7 @@ final class Currency
|
|||
try {
|
||||
$xml = new \SimpleXMLElement(Rest::request($request)->getBody());
|
||||
|
||||
if (!(property_exists($xml, 'Cube') && $xml->Cube !== null)) {
|
||||
if (!(\property_exists($xml, 'Cube') && $xml->Cube !== null)) {
|
||||
throw new \Exception('Invalid xml path'); // @codeCoverageIgnore
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -443,12 +443,12 @@ class Markdown
|
|||
return $Component['element'];
|
||||
}
|
||||
|
||||
protected function isBlockContinuable($Type): bool
|
||||
protected function isBlockContinuable($Type) : bool
|
||||
{
|
||||
return \method_exists($this, 'block' . $Type . 'Continue');
|
||||
}
|
||||
|
||||
protected function isBlockCompletable($Type): bool
|
||||
protected function isBlockCompletable($Type) : bool
|
||||
{
|
||||
return \method_exists($this, 'block' . $Type . 'Complete');
|
||||
}
|
||||
|
|
@ -2257,7 +2257,7 @@ class Markdown
|
|||
return $markup;
|
||||
}
|
||||
|
||||
protected function elements(array $Elements): string
|
||||
protected function elements(array $Elements) : string
|
||||
{
|
||||
$markup = '';
|
||||
|
||||
|
|
@ -2401,7 +2401,7 @@ class Markdown
|
|||
# Static Methods
|
||||
#
|
||||
|
||||
protected static function escape($text, $allowQuotes = false): string
|
||||
protected static function escape($text, $allowQuotes = false) : string
|
||||
{
|
||||
return \htmlspecialchars($text, $allowQuotes ? \ENT_NOQUOTES : \ENT_QUOTES, 'UTF-8');
|
||||
}
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@ final class DispatcherTest extends \PHPUnit\Framework\TestCase
|
|||
self::assertTrue(
|
||||
!empty(
|
||||
$this->app->dispatcher->dispatch(
|
||||
function($req, $resp, $data = null): bool { return true; },
|
||||
function($req, $resp, $data = null) : bool { return true; },
|
||||
new HttpRequest(new HttpUri(''), $localization),
|
||||
new HttpResponse($localization)
|
||||
)
|
||||
|
|
@ -95,7 +95,7 @@ final class DispatcherTest extends \PHPUnit\Framework\TestCase
|
|||
self::assertTrue(
|
||||
!empty(
|
||||
$this->app->dispatcher->dispatch(
|
||||
function($req): bool { return true; }
|
||||
function($req) : bool { return true; }
|
||||
)
|
||||
)
|
||||
);
|
||||
|
|
@ -182,7 +182,7 @@ final class DispatcherTest extends \PHPUnit\Framework\TestCase
|
|||
!empty(
|
||||
$this->app->dispatcher->dispatch(
|
||||
[
|
||||
function($app, $req, $resp, $data = null): bool { return true; },
|
||||
function($app, $req, $resp, $data = null) : bool { return true; },
|
||||
'phpOMS\tests\Dispatcher\TestController:testFunction',
|
||||
'phpOMS\tests\Dispatcher\TestController::testFunctionStatic',
|
||||
],
|
||||
|
|
|
|||
|
|
@ -16,17 +16,17 @@ namespace phpOMS\tests\Dispatcher;
|
|||
|
||||
class TestController
|
||||
{
|
||||
public function testFunction($req, $resp, $data = null): bool
|
||||
public function testFunction($req, $resp, $data = null) : bool
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public function testFunctionNoPara(): bool
|
||||
public function testFunctionNoPara() : bool
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public static function testFunctionStatic($req, $resp, $data = null): bool
|
||||
public static function testFunctionStatic($req, $resp, $data = null) : bool
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ final class EventManagerTest extends \PHPUnit\Framework\TestCase
|
|||
*/
|
||||
public function testAdd() : void
|
||||
{
|
||||
self::assertTrue($this->event->attach('group', function(): bool { return true; }, false, false));
|
||||
self::assertTrue($this->event->attach('group', function() : bool { return true; }, false, false));
|
||||
self::assertEquals(1, $this->event->count());
|
||||
}
|
||||
|
||||
|
|
@ -63,7 +63,7 @@ final class EventManagerTest extends \PHPUnit\Framework\TestCase
|
|||
*/
|
||||
public function testClear() : void
|
||||
{
|
||||
self::assertTrue($this->event->attach('group', function(): bool { return true; }, false, false));
|
||||
self::assertTrue($this->event->attach('group', function() : bool { return true; }, false, false));
|
||||
self::assertEquals(1, $this->event->count());
|
||||
$this->event->clear();
|
||||
|
||||
|
|
@ -77,8 +77,8 @@ final class EventManagerTest extends \PHPUnit\Framework\TestCase
|
|||
*/
|
||||
public function testAddMultiple() : void
|
||||
{
|
||||
self::assertTrue($this->event->attach('group', function(): bool { return true; }, false, false));
|
||||
self::assertTrue($this->event->attach('group', function(): bool { return true; }, false, false));
|
||||
self::assertTrue($this->event->attach('group', function() : bool { return true; }, false, false));
|
||||
self::assertTrue($this->event->attach('group', function() : bool { return true; }, false, false));
|
||||
self::assertEquals(1, $this->event->count());
|
||||
}
|
||||
|
||||
|
|
@ -185,7 +185,7 @@ final class EventManagerTest extends \PHPUnit\Framework\TestCase
|
|||
*/
|
||||
public function testReset() : void
|
||||
{
|
||||
self::assertTrue($this->event->attach('group', function(): bool { return true; }, false, true));
|
||||
self::assertTrue($this->event->attach('group', function() : bool { return true; }, false, true));
|
||||
$this->event->addGroup('group', 'id1');
|
||||
$this->event->addGroup('group', 'id2');
|
||||
|
||||
|
|
@ -201,7 +201,7 @@ final class EventManagerTest extends \PHPUnit\Framework\TestCase
|
|||
*/
|
||||
public function testNoReset() : void
|
||||
{
|
||||
self::assertTrue($this->event->attach('group', function(): bool { return true; }, false, false));
|
||||
self::assertTrue($this->event->attach('group', function() : bool { return true; }, false, false));
|
||||
$this->event->addGroup('group', 'id1');
|
||||
$this->event->addGroup('group', 'id2');
|
||||
|
||||
|
|
@ -217,7 +217,7 @@ final class EventManagerTest extends \PHPUnit\Framework\TestCase
|
|||
*/
|
||||
public function testDetach() : void
|
||||
{
|
||||
$this->event->attach('group', function(): bool { return true; }, false, true);
|
||||
$this->event->attach('group', function() : bool { return true; }, false, true);
|
||||
$this->event->addGroup('group', 'id1');
|
||||
$this->event->addGroup('group', 'id2');
|
||||
|
||||
|
|
@ -234,7 +234,7 @@ final class EventManagerTest extends \PHPUnit\Framework\TestCase
|
|||
*/
|
||||
public function testInvalidDetach() : void
|
||||
{
|
||||
$this->event->attach('group', function(): bool { return true; }, false, true);
|
||||
$this->event->attach('group', function() : bool { return true; }, false, true);
|
||||
$this->event->addGroup('group', 'id1');
|
||||
$this->event->addGroup('group', 'id2');
|
||||
|
||||
|
|
@ -249,8 +249,8 @@ final class EventManagerTest extends \PHPUnit\Framework\TestCase
|
|||
*/
|
||||
public function testRemove() : void
|
||||
{
|
||||
self::assertTrue($this->event->attach('group1', function(): bool { return true; }, true, false));
|
||||
self::assertTrue($this->event->attach('group2', function(): bool { return true; }, true, false));
|
||||
self::assertTrue($this->event->attach('group1', function() : bool { return true; }, true, false));
|
||||
self::assertTrue($this->event->attach('group2', function() : bool { return true; }, true, false));
|
||||
|
||||
self::assertEquals(2, $this->event->count());
|
||||
$this->event->trigger('group1');
|
||||
|
|
|
|||
|
|
@ -16,7 +16,6 @@ namespace phpOMS\tests\Localization;
|
|||
|
||||
require_once __DIR__ . '/../Autoloader.php';
|
||||
|
||||
use phpOMS\Localization\ISO4217SymbolEnum;
|
||||
use phpOMS\Localization\Money;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
function has𠀊Unicode(): bool
|
||||
function has𠀊Unicode() : bool
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
function noDeprecated(): string
|
||||
function noDeprecated() : string
|
||||
{
|
||||
return \is_string('');
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
function noUnicode(): bool
|
||||
function noUnicode() : bool
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -171,7 +171,7 @@ final class LocationTest extends \PHPUnit\Framework\TestCase
|
|||
'address' => 'Some address here',
|
||||
'state' => 'This is a state 123',
|
||||
'lat' => 12.1,
|
||||
'lon' => 11.2,
|
||||
'lon' => 11.2,
|
||||
];
|
||||
|
||||
$this->location->postal = '0123456789';
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user