Skip to content

Commit

Permalink
fix phpstan
Browse files Browse the repository at this point in the history
  • Loading branch information
frederic34 committed Sep 30, 2024
1 parent ca8cd5b commit 88939be
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
2 changes: 2 additions & 0 deletions htdocs/api/class/api_documents.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

use Artis\Dolibarr\Models\EcmFile;
use Luracast\Restler\RestException;

require_once DOL_DOCUMENT_ROOT.'/main.inc.php';
Expand Down Expand Up @@ -618,6 +619,7 @@ public function getDocumentsListByElement($modulepart, $id = 0, $ref = '', $sort
$count = count($filearray);
for ($i = 0 ; $i < $count ; $i++) {
foreach ($ecmfile->lines as $line) {
/** @var EcmFiles $line */
if ($filearray[$i]['name'] == $line->filename) {
$filearray[$i] = array_merge($filearray[$i], (array) $line);
}
Expand Down
19 changes: 17 additions & 2 deletions htdocs/ecm/class/ecmfiles.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

// Put here all includes required by your class file
require_once DOL_DOCUMENT_ROOT.'/core/class/commonobject.class.php';

require_once DOL_DOCUMENT_ROOT.'/core/class/commonobjectline.class.php';
/**
* Class to manage ECM files
*/
Expand Down Expand Up @@ -1033,7 +1033,7 @@ public function initAsSpecimen()
/**
* Class of an index line of a document
*/
class EcmFilesLine
class EcmFilesLine extends CommonObjectLine
{
/**
* @var string ECM files line label
Expand All @@ -1045,8 +1045,19 @@ class EcmFilesLine
*/
public $entity;

/**
* @var string filename
*/
public $filename;

/**
* @var string filepath
*/
public $filepath;

/**
* @var string fullpath origin
*/
public $fullpath_orig;

/**
Expand All @@ -1056,6 +1067,10 @@ class EcmFilesLine

public $keywords;
public $cover;

/**
* @var int position
*/
public $position;
public $gen_or_uploaded; // can be 'generated', 'uploaded', 'unknown'
public $extraparams;
Expand Down

0 comments on commit 88939be

Please sign in to comment.