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