Moved Component.php to InternalComponent.php

This commit is contained in:
Netkas 2023-09-26 17:35:52 -04:00
parent 9aba1cbf38
commit d5c0ebf9c7
No known key found for this signature in database
GPG key ID: 5DAF58535614062B
2 changed files with 27 additions and 28 deletions

View file

@ -1,28 +1,28 @@
<?php
/*
* Copyright (c) Nosial 2022-2023, all rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
* associated documentation files (the "Software"), to deal in the Software without restriction, including without
* limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the
* Software, and to permit persons to whom the Software is furnished to do so, subject to the following
* conditions:
*
* The above copyright notice and this permission notice shall be included in all copies or substantial portions
* of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
* PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*
*/
* Copyright (c) Nosial 2022-2023, all rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
* associated documentation files (the "Software"), to deal in the Software without restriction, including without
* limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the
* Software, and to permit persons to whom the Software is furnished to do so, subject to the following
* conditions:
*
* The above copyright notice and this permission notice shall be included in all copies or substantial portions
* of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
* PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*
*/
/** @noinspection PhpMissingFieldTypeInspection */
namespace ncc\Objects\NccVersionInformation;
namespace ncc\Objects;
use ncc\Exceptions\IOException;
use ncc\Exceptions\PathNotFoundException;
@ -30,7 +30,7 @@
use ncc\Utilities\IO;
use RuntimeException;
class Component implements SerializableObjectInterface
class InternalComponent implements SerializableObjectInterface
{
/**
* The Vendor of the component
@ -99,9 +99,9 @@
* Constructs an object from an array representation
*
* @param array $data
* @return Component
* @return InternalComponent
*/
public static function fromArray(array $data): Component
public static function fromArray(array $data): InternalComponent
{
$object = new self();

View file

@ -25,7 +25,6 @@
namespace ncc\Objects;
use ncc\Interfaces\SerializableObjectInterface;
use ncc\Objects\NccVersionInformation\Component;
class NccVersionInformation implements SerializableObjectInterface
{
@ -53,7 +52,7 @@
/**
* An array of components that ncc uses and comes pre-built with
*
* @var Component[]
* @var InternalComponent[]
*/
private $components;
@ -114,7 +113,7 @@
}
/**
* @return Component[]
* @return InternalComponent[]
*/
public function getComponents(): array
{
@ -122,7 +121,7 @@
}
/**
* @param Component[] $components
* @param InternalComponent[] $components
*/
public function setComponents(array $components): void
{
@ -191,7 +190,7 @@
{
foreach($data['components'] as $datum)
{
$object->components[] = Component::fromArray($datum);
$object->components[] = InternalComponent::fromArray($datum);
}
}