realshadow /
satis-control-panel
This project does not seem to handle request data directly as such no vulnerable execution paths were found.
include, or for example
via PHP's auto-loading mechanism.
These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
| 1 | <?php |
||
| 2 | |||
| 3 | namespace App\Satis\Model; |
||
| 4 | |||
| 5 | use App\Satis\Collections\RepositoryCollection; |
||
| 6 | use App\Satis\Collections\PackageCollection; |
||
| 7 | use JMS\Serializer\Annotation\Type; |
||
| 8 | use JMS\Serializer\Annotation\SerializedName; |
||
| 9 | |||
| 10 | /** |
||
| 11 | * Configuration class |
||
| 12 | * |
||
| 13 | * Represent a satis configuration file |
||
| 14 | * |
||
| 15 | * @author Lukas Homza <[email protected]> |
||
| 16 | */ |
||
| 17 | class Config { |
||
| 18 | /** |
||
| 19 | * @Type("string") |
||
| 20 | */ |
||
| 21 | private $name; |
||
| 22 | |||
| 23 | /** |
||
| 24 | * @Type("string") |
||
| 25 | */ |
||
| 26 | private $homepage; |
||
| 27 | |||
| 28 | /** |
||
| 29 | * @Type("App\Satis\Collections\RepositoryCollection<App\Satis\Model\Repository>") |
||
| 30 | */ |
||
| 31 | private $repositories; |
||
| 32 | |||
| 33 | /** |
||
| 34 | * @Type("App\Satis\Collections\PackageCollection<App\Satis\Model\Package>") |
||
| 35 | * @SerializedName("require") |
||
| 36 | */ |
||
| 37 | private $packages; |
||
| 38 | |||
| 39 | /** |
||
| 40 | * @Type("boolean") |
||
| 41 | * @SerializedName("require-all") |
||
| 42 | */ |
||
| 43 | private $requireAll; |
||
| 44 | |||
| 45 | /** |
||
| 46 | * @Type("boolean") |
||
| 47 | * @SerializedName("providers") |
||
| 48 | */ |
||
| 49 | private $providers; |
||
| 50 | |||
| 51 | /** |
||
| 52 | * @Type("boolean") |
||
| 53 | * @SerializedName("require-dependencies") |
||
| 54 | */ |
||
| 55 | private $requireDependencies; |
||
| 56 | |||
| 57 | /** |
||
| 58 | * @Type("boolean") |
||
| 59 | * @SerializedName("require-dev-dependencies") |
||
| 60 | */ |
||
| 61 | private $requireDevDependencies; |
||
| 62 | |||
| 63 | /** |
||
| 64 | * @var Archive |
||
| 65 | * @Type("App\Satis\Model\Archive") |
||
| 66 | */ |
||
| 67 | private $archive; |
||
| 68 | |||
| 69 | /** |
||
| 70 | * @Type("string") |
||
| 71 | * @SerializedName("twig-template") |
||
| 72 | */ |
||
| 73 | private $twigTemplate; |
||
| 74 | |||
| 75 | /** |
||
| 76 | * Constructor |
||
| 77 | */ |
||
| 78 | public function __construct() { |
||
| 79 | $this->repositories = []; |
||
| 80 | $this->packages = []; |
||
| 81 | $this->requireAll = false; |
||
| 82 | $this->requireDependencies = true; |
||
| 83 | $this->requireDevDependencies = false; |
||
| 84 | } |
||
| 85 | |||
| 86 | /** |
||
| 87 | * Get name |
||
| 88 | * |
||
| 89 | * @return string $name |
||
| 90 | */ |
||
| 91 | public function getName() { |
||
| 92 | return $this->name; |
||
| 93 | } |
||
| 94 | |||
| 95 | /** |
||
| 96 | * Get homepage |
||
| 97 | * |
||
| 98 | * @return string $homepage |
||
| 99 | */ |
||
| 100 | public function getHomepage() { |
||
| 101 | return $this->homepage; |
||
| 102 | } |
||
| 103 | |||
| 104 | /** |
||
| 105 | * @param string $homepage |
||
| 106 | * @return $this |
||
| 107 | */ |
||
| 108 | public function setHomepage($homepage) { |
||
| 109 | $this->homepage = $homepage; |
||
| 110 | |||
| 111 | return $this; |
||
| 112 | } |
||
| 113 | |||
| 114 | /** |
||
| 115 | * Get repositories |
||
| 116 | * |
||
| 117 | * @return RepositoryCollection<Repository> |
||
|
0 ignored issues
–
show
|
|||
| 118 | */ |
||
| 119 | public function getRepositories() { |
||
| 120 | return $this->repositories; |
||
| 121 | } |
||
| 122 | |||
| 123 | /** |
||
| 124 | * Set repositories |
||
| 125 | * |
||
| 126 | * @param RepositoryCollection $repositories |
||
| 127 | * |
||
| 128 | * @return static |
||
| 129 | */ |
||
| 130 | public function setRepositories(RepositoryCollection $repositories) { |
||
| 131 | $this->repositories = $repositories; |
||
| 132 | |||
| 133 | return $this; |
||
| 134 | } |
||
| 135 | |||
| 136 | /** |
||
| 137 | * @param Archive $archive |
||
| 138 | */ |
||
| 139 | public function setArchive(Archive $archive = null) { |
||
| 140 | $this->archive = $archive; |
||
| 141 | } |
||
| 142 | |||
| 143 | /** |
||
| 144 | * @return Archive |
||
| 145 | */ |
||
| 146 | public function getArchive() { |
||
| 147 | return $this->archive; |
||
| 148 | } |
||
| 149 | |||
| 150 | /** |
||
| 151 | * Get packages |
||
| 152 | * |
||
| 153 | * @return PackageCollection<Package> |
||
|
0 ignored issues
–
show
The doc-type
PackageCollection<Package> could not be parsed: Expected "|" or "end of type", but got "<" at position 17. (view supported doc-types)
This check marks PHPDoc comments that could not be parsed by our parser. To see which comment annotations we can parse, please refer to our documentation on supported doc-types. Loading history...
|
|||
| 154 | */ |
||
| 155 | public function getPackages() { |
||
| 156 | return $this->packages; |
||
| 157 | } |
||
| 158 | |||
| 159 | /** |
||
| 160 | * @param PackageCollection $packages |
||
| 161 | * @return $this |
||
| 162 | */ |
||
| 163 | public function setPackages(PackageCollection $packages) { |
||
| 164 | $this->packages = $packages; |
||
| 165 | |||
| 166 | return $this; |
||
| 167 | } |
||
| 168 | |||
| 169 | /** |
||
| 170 | * @return boolean |
||
| 171 | */ |
||
| 172 | public function getRequireDevDependencies() { |
||
| 173 | return $this->requireDevDependencies; |
||
| 174 | } |
||
| 175 | |||
| 176 | /** |
||
| 177 | * @param boolean $requireDevDependencies |
||
| 178 | * @return Config |
||
| 179 | */ |
||
| 180 | public function setRequireDevDependencies($requireDevDependencies) { |
||
| 181 | $this->requireDevDependencies = $requireDevDependencies; |
||
| 182 | |||
| 183 | return $this; |
||
| 184 | } |
||
| 185 | |||
| 186 | /** |
||
| 187 | * @return boolean |
||
| 188 | */ |
||
| 189 | public function getRequireAll() { |
||
| 190 | return $this->requireAll; |
||
| 191 | } |
||
| 192 | |||
| 193 | /** |
||
| 194 | * @param boolean $requireAll |
||
| 195 | * @return $this |
||
| 196 | */ |
||
| 197 | public function setRequireAll($requireAll) { |
||
| 198 | $this->requireAll = $requireAll; |
||
| 199 | |||
| 200 | return $this; |
||
| 201 | } |
||
| 202 | |||
| 203 | /** |
||
| 204 | * @return boolean |
||
| 205 | */ |
||
| 206 | public function getProviders() { |
||
| 207 | return $this->providers; |
||
| 208 | } |
||
| 209 | |||
| 210 | /** |
||
| 211 | * @param boolean $providers |
||
| 212 | * @return $this |
||
| 213 | */ |
||
| 214 | public function setProviders($providers) { |
||
| 215 | $this->providers = $providers; |
||
| 216 | return $this; |
||
| 217 | } |
||
| 218 | |||
| 219 | /** |
||
| 220 | * @return string |
||
| 221 | */ |
||
| 222 | public function getTwigTemplate() |
||
| 223 | { |
||
| 224 | return $this->twigTemplate; |
||
| 225 | } |
||
| 226 | |||
| 227 | /** |
||
| 228 | * @param string $twigTemplate |
||
| 229 | * @return Config |
||
| 230 | */ |
||
| 231 | public function setTwigTemplate($twigTemplate) |
||
| 232 | { |
||
| 233 | $this->twigTemplate = $twigTemplate; |
||
| 234 | |||
| 235 | return $this; |
||
| 236 | } |
||
| 237 | } |
||
| 238 |
This check marks PHPDoc comments that could not be parsed by our parser. To see which comment annotations we can parse, please refer to our documentation on supported doc-types.