mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-12-21 18:39:31 +00:00
Used PHP_CS_Fixer with symfony preset on codebase.
This commit is contained in:
parent
0f3ba9b6a8
commit
e2f7aafa2d
43 changed files with 971 additions and 1068 deletions
|
|
@ -1,10 +1,11 @@
|
|||
<?php declare(strict_types=1);
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/**
|
||||
*
|
||||
* part-db version 0.1
|
||||
* Copyright (C) 2005 Christoph Lechner
|
||||
* http://www.cl-projects.de/
|
||||
* http://www.cl-projects.de/.
|
||||
*
|
||||
* part-db version 0.2+
|
||||
* Copyright (C) 2009 K. Jacobs and others (see authors.php)
|
||||
|
|
@ -27,7 +28,6 @@
|
|||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*
|
||||
*/
|
||||
|
||||
namespace App\Entity;
|
||||
|
|
@ -35,8 +35,7 @@ namespace App\Entity;
|
|||
use Doctrine\ORM\Mapping as ORM;
|
||||
|
||||
/**
|
||||
* Class Supplier
|
||||
* @package App\Entity
|
||||
* Class Supplier.
|
||||
*
|
||||
* @ORM\Entity()
|
||||
* @ORM\Table("suppliers")
|
||||
|
|
@ -60,13 +59,13 @@ class Supplier extends Company
|
|||
protected $orderdetails;
|
||||
|
||||
/**
|
||||
* Get all parts from this element
|
||||
* Get all parts from this element.
|
||||
*
|
||||
* @return int all parts in a one-dimensional array of Part objects
|
||||
* @return int all parts in a one-dimensional array of Part objects
|
||||
*
|
||||
* @throws Exception if there was an error
|
||||
* @throws Exception if there was an error
|
||||
*/
|
||||
public function getCountOfPartsToOrder() : int
|
||||
public function getCountOfPartsToOrder(): int
|
||||
{
|
||||
/*
|
||||
$query = 'SELECT COUNT(*) as count FROM parts '.
|
||||
|
|
@ -86,20 +85,18 @@ class Supplier extends Company
|
|||
|
||||
return (int) $query_data[0]['count']; */
|
||||
|
||||
|
||||
//TODO
|
||||
throw new \Exception('Not implemented yet!');
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns the ID as an string, defined by the element class.
|
||||
* This should have a form like P000014, for a part with ID 14.
|
||||
*
|
||||
* @return string The ID as a string;
|
||||
*/
|
||||
public function getIDString(): string
|
||||
{
|
||||
return 'L' . sprintf('%06d', $this->getID());
|
||||
return 'L'.sprintf('%06d', $this->getID());
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue