Skip to content
Snippets Groups Projects
Commit 9d3d2dde authored by Sebastien ANDRE's avatar Sebastien ANDRE
Browse files

hotline : #197275 : error on typage

parent 59f3b615
Branches
Tags
1 merge request!4948hotline : #197275 : error on typage
Pipeline #31236 passed with stage
in 46 minutes and 5 seconds
- correctif #197275 : Compte lecteur : Le connecteur Nanook est moins sensible aux données d'abonnements renvoyées par le Webservice, corrige des pages blanches à la connexion des comptes expirés.
\ No newline at end of file
......@@ -20,49 +20,66 @@
*/
class Class_WebService_SIGB_Subscription {
protected $_id='',
$_label='';
class Class_WebService_SIGB_Subscription
{
public function setId(string $id) :self{
protected string $_id = '';
protected string $_label = '';
protected string $_end_date = '';
protected string $_start_date = '';
public function setId(string $id): self
{
$this->_id = $id;
return $this;
}
public function setLabel(string $label) :self{
public function setLabel(string $label): self
{
$this->_label = $label;
return $this;
}
public function getLabel() :string{
public function getLabel(): string
{
return $this->_label;
}
public function getId() :string{
public function getId(): string
{
return $this->_id;
}
public function getStartDate() :string{
public function getStartDate(): string
{
return $this->_start_date;
}
public function getEndDate() :string{
public function getEndDate(): string
{
return $this->_end_date;
}
public function setStartDate(string $start_date) :self{
public function setStartDate(string $start_date): self
{
$this->_start_date = $start_date;
return $this;
}
public function setEndDate(string $end_date) :self{
public function setEndDate(string $end_date): self
{
$this->_end_date = $end_date;
return $this;
}
}
<?php
/**
* Copyright (c) 2012-2024, Agence Française Informatique (AFI). All rights reserved.
*
* BOKEH is free software; you can redistribute it and/or modify
* it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE as published by
* the Free Software Foundation.
*
* There are special exceptions to the terms and conditions of the AGPL as it
* is applied to this software (see README file).
*
* BOKEH is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
*
* You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE
* along with BOKEH; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
class SubscriptionNanookTest extends ModelTestCase
{
/** @test */
public function startDateShouldReturnEmptyString()
{
$this->assertEquals('', (new Class_WebService_SIGB_Subscription)->getStartDate());
}
/** @test */
public function endDateShouldReturnEmptyString()
{
$this->assertEquals('', (new Class_WebService_SIGB_Subscription)->getEndDate());
}
}
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment