Issues (100)

Security Analysis    not enabled

This project does not seem to handle request data directly as such no vulnerable execution paths were found.

  Cross-Site Scripting
Cross-Site Scripting enables an attacker to inject code into the response of a web-request that is viewed by other users. It can for example be used to bypass access controls, or even to take over other users' accounts.
  File Exposure
File Exposure allows an attacker to gain access to local files that he should not be able to access. These files can for example include database credentials, or other configuration files.
  File Manipulation
File Manipulation enables an attacker to write custom data to files. This potentially leads to injection of arbitrary code on the server.
  Object Injection
Object Injection enables an attacker to inject an object into PHP code, and can lead to arbitrary code execution, file exposure, or file manipulation attacks.
  Code Injection
Code Injection enables an attacker to execute arbitrary code on the server.
  Response Splitting
Response Splitting can be used to send arbitrary responses.
  File Inclusion
File Inclusion enables an attacker to inject custom files into PHP's file loading mechanism, either explicitly passed to include, or for example via PHP's auto-loading mechanism.
  Command Injection
Command Injection enables an attacker to inject a shell command that is execute with the privileges of the web-server. This can be used to expose sensitive data, or gain access of your server.
  SQL Injection
SQL Injection enables an attacker to execute arbitrary SQL code on your database server gaining access to user data, or manipulating user data.
  XPath Injection
XPath Injection enables an attacker to modify the parts of XML document that are read. If that XML document is for example used for authentication, this can lead to further vulnerabilities similar to SQL Injection.
  LDAP Injection
LDAP Injection enables an attacker to inject LDAP statements potentially granting permission to run unauthorized queries, or modify content inside the LDAP tree.
  Header Injection
  Other Vulnerability
This category comprises other attack vectors such as manipulating the PHP runtime, loading custom extensions, freezing the runtime, or similar.
  Regex Injection
Regex Injection enables an attacker to execute arbitrary code in your PHP process.
  XML Injection
XML Injection enables an attacker to read files on your local filesystem including configuration files, or can be abused to freeze your web-server process.
  Variable Injection
Variable Injection enables an attacker to overwrite program variables with custom data, and can lead to further vulnerabilities.
Unfortunately, the security analysis is currently not available for your project. If you are a non-commercial open-source project, please contact support to gain access.

src/Entities/InfectionRaport.php (2 issues)

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

1
<?php
2
3
/**
4
 * Patient
5
 *
6
 * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
7
 * OR IMPLIED. ANY USE IS AT YOUR OWN RISK.
8
 *
9
 * Permission is hereby granted to use or copy this program
10
 * for any purpose, provided the above notices are retained on all copies.
11
 * Permission to modify the code and to distribute modified code is granted,
12
 * provided the above notices are retained, and a notice that the code was
13
 * modified is included with the above copyright notice.
14
 *
15
 * @category  Wp
16
 * @package   Punction
17
 * @author    Andrzej Marcinkowski <[email protected]>
18
 * @copyright 2014 Wojewódzki Szpital Zespolony, Kalisz
19
 * @license   MIT http://opensource.org/licenses/MIT
20
 * @version   1.0 $Id: 5e3d6d9fad27385cb557282c244e0767bf6c41e0 $ $Format:%H$
21
 * @link      http://
22
 * @since     File available since Release 1.0.0
23
 * PHP Version 5
24
 */
25
namespace Hospitalplugin\Entities;
26
27
/**
28
 * Infections
29
 *
30
 * @category Wp
31
 * @package Epidemio
32
 * @author Andrzej Marcinkowski <[email protected]>
33
 * @copyright 2014 Wojewódzki Szpital Zespolony, Kalisz
34
 * @license MIT http://opensource.org/licenses/MIT
35
 * @version 1.0 $Id: 5e3d6d9fad27385cb557282c244e0767bf6c41e0 $ $Format:%H$
36
 * @link http://
37
 * @since File available since Release 1.0.0
38
 *       
39
 */
40
class InfectionRaport {
41
	
42
	/**
43
	 * id
44
	 * @Id @Column(type="integer") @GeneratedValue
45
	 */
46
	public $id;
47
	
48
	/**
49
	 * $dataRaportu datetime
50
	 * @Column(type="datetime") *
51
	 */
52
	public $dataRaportu;
53
	
54
	/**
55
	 * $dataPrzeslania datetime
56
	 * @Column(type="datetime") *
57
	 */
58
	public $dataPrzeslania;
59
	
60
	/**
61
	 * @ManyToOne(targetEntity="Hospitalplugin\Entities\Ward")
62
	 * @JoinColumn(name="oddzialId", referencedColumnName="id")
63
	 */
64
	public $ward;
65
	
66
	/**
67
	 * @ManyToOne(targetEntity="Hospitalplugin\Entities\User")
68
	 * @JoinColumn(name="userId", referencedColumnName="id")
69
	 */
70
	protected $user;
71
	
72
	function __construct($args) {
0 ignored issues
show
It is generally recommended to explicitly declare the visibility for methods.

Adding explicit visibility (private, protected, or public) is generally recommend to communicate to other developers how, and from where this method is intended to be used.

Loading history...
73 View Code Duplication
		foreach ( $args as $key => $value ) {
0 ignored issues
show
This code seems to be duplicated across your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
74
			if ($key == 'dataRaportu') {
75
				$value = new \DateTime ( $value );
76
			} 
77
			call_user_func ( array (
78
					$this,
79
					'set' . $key 
80
			), $value );
81
		}
82
		$this->dataPrzeslania = new \DateTime ();
83
		echo '<h3><div class="alert alert-primary">Dziękuję za przesłanie raportu!</div></h3>';
84
	}
85
	
86
	/**
87
	 * getId
88
	 *
89
	 * @return id
90
	 */
91
	public function getId() {
92
		return $this->id;
93
	}
94
	
95
	/**
96
	 * sets id
97
	 *
98
	 * @param int $id
99
	 *        	ID
100
	 *        	
101
	 * @return \Hospitalplugin\Entities\Patient
102
	 */
103
	public function setId($id) {
104
		$this->id = $id;
105
		return $this;
106
	}
107
	
108
	/**
109
	 * toString
110
	 *
111
	 * @return string
112
	 */
113
	public function toString() {
114
		$txt = $this->getId ();
115
		$data = $this->getDataRaportu ();
116
		if ($data instanceof \DateTime) {
117
			$txt .= $this->getDataRaportu ()->format ( "Y-m-d" );
118
		} else {
119
			$txt .= $this->getDataRaportu ();
120
		}
121
		return $txt;
122
	}
123
	public function getDataRaportu() {
124
		return $this->dataRaportu;
125
	}
126
	public function setDataRaportu($dataRaportu) {
127
		$this->dataRaportu = $dataRaportu;
128
		return $this;
129
	}
130
	
131
	public function getDataPrzeslania() {
132
		return $this->dataPrzeslania;
133
	}
134
	public function setDataPrzeslania($dataPrzeslania) {
135
		$this->dataPrzeslania = $dataPrzeslania;
136
		return $this;
137
	}
138
	public function getWard() {
139
		return $this->ward;
140
	}
141
	public function setWard($ward) {
142
		$this->ward = $ward;
143
		return $this;
144
	}
145
	public function getUser() {
146
		return $this->user;
147
	}
148
	public function setUser($user) {
149
		$this->user = $user;
150
		return $this;
151
	}
152
	
153
	
154
}
155