Removed uses of AString and WString.
This commit is contained in:
parent
7bd41f4e93
commit
fc46d04f78
8 changed files with 40 additions and 46 deletions
|
@ -1,7 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
namespace Makai;
|
namespace Makai;
|
||||||
|
|
||||||
use Index\WString;
|
|
||||||
use Index\Colour\Colour;
|
use Index\Colour\Colour;
|
||||||
use Index\Colour\ColourRGB;
|
use Index\Colour\ColourRGB;
|
||||||
|
|
||||||
|
@ -9,16 +8,16 @@ class ContactInfo {
|
||||||
private string $name;
|
private string $name;
|
||||||
private bool $homePage;
|
private bool $homePage;
|
||||||
private int $order;
|
private int $order;
|
||||||
private WString $title;
|
private string $title;
|
||||||
private string $icon;
|
private string $icon;
|
||||||
private int $colour;
|
private int $colour;
|
||||||
private WString $display;
|
private string $display;
|
||||||
private ?string $link;
|
private ?string $link;
|
||||||
|
|
||||||
public function __construct(
|
public function __construct(
|
||||||
string $name, bool $homePage, int $order,
|
string $name, bool $homePage, int $order,
|
||||||
WString $title, string $icon, int $colour,
|
string $title, string $icon, int $colour,
|
||||||
WString $display, ?string $link
|
string $display, ?string $link
|
||||||
) {
|
) {
|
||||||
$this->name = $name;
|
$this->name = $name;
|
||||||
$this->homePage = $homePage;
|
$this->homePage = $homePage;
|
||||||
|
@ -42,7 +41,7 @@ class ContactInfo {
|
||||||
return $this->order;
|
return $this->order;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getTitle(): WString {
|
public function getTitle(): string {
|
||||||
return $this->title;
|
return $this->title;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -58,7 +57,7 @@ class ContactInfo {
|
||||||
return $this->colour;
|
return $this->colour;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getDisplay(): WString {
|
public function getDisplay(): string {
|
||||||
return $this->display;
|
return $this->display;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -45,10 +45,10 @@ class Contacts {
|
||||||
$result->getString(0), // name
|
$result->getString(0), // name
|
||||||
$result->getInteger(1) !== 0, // homepage
|
$result->getInteger(1) !== 0, // homepage
|
||||||
$result->getInteger(2), // order
|
$result->getInteger(2), // order
|
||||||
$result->getWString(3, 'utf-8'), // title
|
$result->getString(3), // title
|
||||||
$result->getString(4), // icon
|
$result->getString(4), // icon
|
||||||
$result->getInteger(5), // colour
|
$result->getInteger(5), // colour
|
||||||
$result->getWString(6, 'utf-8'), // display
|
$result->getString(6), // display
|
||||||
$result->isNull(7) ? null : $result->getString(7) // link
|
$result->isNull(7) ? null : $result->getString(7) // link
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,19 +1,17 @@
|
||||||
<?php
|
<?php
|
||||||
namespace Makai;
|
namespace Makai;
|
||||||
|
|
||||||
use Index\AString;
|
|
||||||
use Index\WString;
|
|
||||||
use Index\Colour\Colour;
|
use Index\Colour\Colour;
|
||||||
use Index\Colour\ColourRGB;
|
use Index\Colour\ColourRGB;
|
||||||
|
|
||||||
class LanguageInfo {
|
class LanguageInfo {
|
||||||
private string $id;
|
private string $id;
|
||||||
private WString $name;
|
private string $name;
|
||||||
private ?int $colour;
|
private ?int $colour;
|
||||||
|
|
||||||
public function __construct(
|
public function __construct(
|
||||||
string $id,
|
string $id,
|
||||||
WString $name,
|
string $name,
|
||||||
?int $colour
|
?int $colour
|
||||||
) {
|
) {
|
||||||
$this->id = $id;
|
$this->id = $id;
|
||||||
|
@ -25,7 +23,7 @@ class LanguageInfo {
|
||||||
return $this->id;
|
return $this->id;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getName(): WString {
|
public function getName(): string {
|
||||||
return $this->name;
|
return $this->name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -56,7 +56,7 @@ class Languages {
|
||||||
private static function createObject(IDbResult $result): LanguageInfo {
|
private static function createObject(IDbResult $result): LanguageInfo {
|
||||||
return new LanguageInfo(
|
return new LanguageInfo(
|
||||||
$result->getString(0), // id
|
$result->getString(0), // id
|
||||||
$result->getWString(1, 'utf-8'), // name
|
$result->getString(1), // name
|
||||||
$result->isNull(2) ? null : $result->getInteger(2) // colour
|
$result->isNull(2) ? null : $result->getInteger(2) // colour
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,34 +1,32 @@
|
||||||
<?php
|
<?php
|
||||||
namespace Makai;
|
namespace Makai;
|
||||||
|
|
||||||
use Index\AString;
|
|
||||||
use Index\WString;
|
|
||||||
use Index\DateTime;
|
use Index\DateTime;
|
||||||
use Index\Colour\Colour;
|
use Index\Colour\Colour;
|
||||||
use Index\Colour\ColourRGB;
|
use Index\Colour\ColourRGB;
|
||||||
|
|
||||||
class ProjectInfo {
|
class ProjectInfo {
|
||||||
private string $id;
|
private string $id;
|
||||||
private WString $name;
|
private string $name;
|
||||||
private AString $nameClean;
|
private string $nameClean;
|
||||||
private ?WString $summary;
|
private ?string $summary;
|
||||||
private ?WString $description;
|
private ?string $description;
|
||||||
private bool $featured;
|
private bool $featured;
|
||||||
private int $order;
|
private int $order;
|
||||||
private ?int $colour;
|
private ?int $colour;
|
||||||
private string $type;
|
private string $type;
|
||||||
private ?AString $homepage;
|
private ?string $homepage;
|
||||||
private ?AString $source;
|
private ?string $source;
|
||||||
private ?AString $discussion;
|
private ?string $discussion;
|
||||||
private DateTime $createdAt;
|
private DateTime $createdAt;
|
||||||
private ?DateTime $archivedAt;
|
private ?DateTime $archivedAt;
|
||||||
private ?DateTime $deletedAt;
|
private ?DateTime $deletedAt;
|
||||||
|
|
||||||
public function __construct(
|
public function __construct(
|
||||||
string $id, WString $name, AString $nameClean,
|
string $id, string $name, string $nameClean,
|
||||||
?WString $summary, ?WString $description,
|
?string $summary, ?string $description,
|
||||||
bool $featured, int $order, ?int $colour, string $type,
|
bool $featured, int $order, ?int $colour, string $type,
|
||||||
?AString $homepage, ?AString $source, ?AString $discussion,
|
?string $homepage, ?string $source, ?string $discussion,
|
||||||
int $createdAt, ?int $archivedAt, ?int $deletedAt
|
int $createdAt, ?int $archivedAt, ?int $deletedAt
|
||||||
) {
|
) {
|
||||||
$this->id = $id;
|
$this->id = $id;
|
||||||
|
@ -52,11 +50,11 @@ class ProjectInfo {
|
||||||
return $this->id;
|
return $this->id;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getName(): WString {
|
public function getName(): string {
|
||||||
return $this->name;
|
return $this->name;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getCleanName(): AString {
|
public function getCleanName(): string {
|
||||||
return $this->nameClean;
|
return $this->nameClean;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -64,7 +62,7 @@ class ProjectInfo {
|
||||||
return $this->summary !== null;
|
return $this->summary !== null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getSummary(): ?WString {
|
public function getSummary(): ?string {
|
||||||
return $this->summary;
|
return $this->summary;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -72,7 +70,7 @@ class ProjectInfo {
|
||||||
return $this->description !== null;
|
return $this->description !== null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getDescription(): ?WString {
|
public function getDescription(): ?string {
|
||||||
return $this->description;
|
return $this->description;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -108,7 +106,7 @@ class ProjectInfo {
|
||||||
return $this->homepage !== null;
|
return $this->homepage !== null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getHomePageUrl(): ?AString {
|
public function getHomePageUrl(): ?string {
|
||||||
return $this->homepage;
|
return $this->homepage;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -116,7 +114,7 @@ class ProjectInfo {
|
||||||
return $this->source !== null;
|
return $this->source !== null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getSourceUrl(): ?AString {
|
public function getSourceUrl(): ?string {
|
||||||
return $this->source;
|
return $this->source;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -124,7 +122,7 @@ class ProjectInfo {
|
||||||
return $this->discussion !== null;
|
return $this->discussion !== null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getDiscussionUrl(): ?AString {
|
public function getDiscussionUrl(): ?string {
|
||||||
return $this->discussion;
|
return $this->discussion;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -43,17 +43,17 @@ class Projects {
|
||||||
private static function createObject(IDbResult $result): ProjectInfo {
|
private static function createObject(IDbResult $result): ProjectInfo {
|
||||||
return new ProjectInfo(
|
return new ProjectInfo(
|
||||||
$result->getString(0), // id
|
$result->getString(0), // id
|
||||||
$result->getWString(1, 'utf-8'), // name
|
$result->getString(1), // name
|
||||||
$result->getAString(2), // clean name
|
$result->getString(2), // clean name
|
||||||
$result->isNull(3) ? null : $result->getWString(3, 'utf-8'), // summary
|
$result->isNull(3) ? null : $result->getString(3), // summary
|
||||||
$result->isNull(4) ? null : $result->getWString(4, 'utf-8'), // description
|
$result->isNull(4) ? null : $result->getString(4), // description
|
||||||
$result->getInteger(5) !== 0, // featured
|
$result->getInteger(5) !== 0, // featured
|
||||||
$result->getInteger(6), // order
|
$result->getInteger(6), // order
|
||||||
$result->isNull(13) ? null : $result->getInteger(13), // colour
|
$result->isNull(13) ? null : $result->getInteger(13), // colour
|
||||||
$result->getString(11), // type
|
$result->getString(11), // type
|
||||||
$result->isNull(7) ? null : $result->getAString(7), // homepage
|
$result->isNull(7) ? null : $result->getString(7), // homepage
|
||||||
$result->isNull(8) ? null : $result->getAString(8), // repository
|
$result->isNull(8) ? null : $result->getString(8), // repository
|
||||||
$result->isNull(9) ? null : $result->getAString(9), // forum
|
$result->isNull(9) ? null : $result->getString(9), // forum
|
||||||
$result->getInteger(12), // created
|
$result->getInteger(12), // created
|
||||||
$result->isNull(10) ? null : $result->getInteger(10), // archived
|
$result->isNull(10) ? null : $result->getInteger(10), // archived
|
||||||
null // deleted
|
null // deleted
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
namespace Makai;
|
namespace Makai;
|
||||||
|
|
||||||
use Index\AString;
|
|
||||||
use Index\DateTime;
|
use Index\DateTime;
|
||||||
|
|
||||||
class SSHKeyInfo {
|
class SSHKeyInfo {
|
||||||
|
@ -9,7 +8,7 @@ class SSHKeyInfo {
|
||||||
private int $level;
|
private int $level;
|
||||||
private string $algo;
|
private string $algo;
|
||||||
private string $body;
|
private string $body;
|
||||||
private AString $comment;
|
private string $comment;
|
||||||
private DateTime $createdAt;
|
private DateTime $createdAt;
|
||||||
private ?DateTime $deprecatedAt;
|
private ?DateTime $deprecatedAt;
|
||||||
|
|
||||||
|
@ -18,7 +17,7 @@ class SSHKeyInfo {
|
||||||
int $level,
|
int $level,
|
||||||
string $algo,
|
string $algo,
|
||||||
string $body,
|
string $body,
|
||||||
AString $comment,
|
string $comment,
|
||||||
int $createdAt,
|
int $createdAt,
|
||||||
?int $deprecatedAt
|
?int $deprecatedAt
|
||||||
) {
|
) {
|
||||||
|
@ -47,7 +46,7 @@ class SSHKeyInfo {
|
||||||
return $this->body;
|
return $this->body;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getComment(): AString {
|
public function getComment(): string {
|
||||||
return $this->comment;
|
return $this->comment;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -40,7 +40,7 @@ class SSHKeys {
|
||||||
$result->getInteger(1),
|
$result->getInteger(1),
|
||||||
$result->getString(2),
|
$result->getString(2),
|
||||||
$result->getString(3),
|
$result->getString(3),
|
||||||
$result->getAString(4),
|
$result->getString(4),
|
||||||
$result->getInteger(5),
|
$result->getInteger(5),
|
||||||
$result->isNull(6) ? null : $result->getInteger(6),
|
$result->isNull(6) ? null : $result->getInteger(6),
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in a new issue