FOSSology  4.4.0
Open Source License Compliance by Open Source Software
FileLicenses.php
Go to the documentation of this file.
1 <?php
2 /*
3  SPDX-FileCopyrightText: © 2023 Siemens AG
4  Author: Gaurav Mishra <mishra.gaurav@siemens.com>
5 
6  SPDX-License-Identifier: GPL-2.0-only
7 */
12 namespace Fossology\UI\Api\Models;
13 
19 {
24  private $filePath;
25 
30  private $findings;
31 
37 
43  public function __construct(string $filePath = null, Findings $findings = null,
44  string $clearing_status = null)
45  {
46  $this->setFilePath($filePath);
47  $this->setFindings($findings);
49  }
50 
54  public function getFilePath()
55  {
56  return $this->filePath;
57  }
58 
64  {
65  $this->filePath = $filePath;
66  return $this;
67  }
68 
72  public function getFindings()
73  {
74  return $this->findings;
75  }
76 
82  {
83  $this->findings = $findings;
84  return $this;
85  }
86 
90  public function getClearingStatus()
91  {
93  }
94 
100  {
101  $this->clearing_status = $clearing_status;
102  return $this;
103  }
104 
110  public function getArray($apiVersion = ApiVersion::V1)
111  {
112  if ($apiVersion == ApiVersion::V2) {
113  return [
114  'filePath' => $this->getFilePath(),
115  'findings' => $this->getFindings()->getArray(),
116  'clearingStatus' => $this->getClearingStatus()
117  ];
118  } else {
119  return [
120  'filePath' => $this->getFilePath(),
121  'findings' => $this->getFindings()->getArray(),
122  'clearing_status' => $this->getClearingStatus()
123  ];
124  }
125  }
126 }
getArray($apiVersion=ApiVersion::V1)
__construct(string $filePath=null, Findings $findings=null, string $clearing_status=null)
Model holding information about license findings and conclusions.
Definition: Findings.php:18