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 | * @var \yii\web\View |
||
5 | * @var $manager \hipanel\modules\finance\logic\AbstractTariffManager |
||
6 | */ |
||
7 | use hipanel\modules\finance\menus\TariffDetailMenu; |
||
8 | use hipanel\widgets\Box; |
||
9 | use hipanel\widgets\ClientSellerLink; |
||
10 | use yii\helpers\Html; |
||
11 | |||
12 | $model = $manager->form; |
||
13 | $type = $manager->getType(); |
||
14 | |||
15 | $this->title = Html::encode($model->name); |
||
16 | $this->params['subtitle'] = Yii::t('hipanel:finance:tariff', 'tariff detailed information'); |
||
17 | $this->params['subtitle'] .= ' ' . Html::a( |
||
18 | Yii::t('hipanel:finance:tariff', 'View as plan'), |
||
19 | ['@plan/view', 'id' => $model->id], |
||
20 | ['class' => 'btn btn-xs btn-info'] |
||
21 | ); |
||
22 | |||
23 | $this->params['breadcrumbs'][] = ['label' => Yii::t('hipanel', 'Tariffs'), 'url' => ['index']]; |
||
24 | $this->params['breadcrumbs'][] = $this->title; |
||
25 | |||
26 | ?> |
||
27 | |||
28 | <div class="row"> |
||
29 | <div class="col-md-3"> |
||
30 | <?php Box::begin([ |
||
31 | 'options' => [ |
||
32 | 'class' => 'box-solid', |
||
33 | ], |
||
34 | 'bodyOptions' => [ |
||
35 | 'class' => 'no-padding', |
||
36 | ], |
||
37 | ]) ?> |
||
38 | <div class="profile-user-img text-center"> |
||
39 | <i class="fa fa-dollar fa-5x"></i> |
||
40 | </div> |
||
41 | <p class="text-center"> |
||
42 | <span class="profile-user-name"> |
||
43 | <?= Html::encode($model->name) ?> |
||
44 | <br/> |
||
45 | <?= ClientSellerLink::widget(['model' => $model->tariff]) ?> |
||
46 | </span> |
||
47 | <br> |
||
48 | <span class="profile-user-role"></span> |
||
49 | </p> |
||
50 | <div class="profile-usermenu"> |
||
51 | <?php if ($model->tariff->note) : ?> |
||
0 ignored issues
–
show
The property
note does not exist on object<hipanel\modules\finance\models\Tariff> . Since you implemented __get , maybe consider adding a @property annotation.
Since your code implements the magic getter <?php
/**
* @property int $x
* @property int $y
* @property string $text
*/
class MyLabel
{
private $properties;
private $allowedProperties = array('x', 'y', 'text');
public function __get($name)
{
if (isset($properties[$name]) && in_array($name, $this->allowedProperties)) {
return $properties[$name];
} else {
return null;
}
}
public function __set($name, $value)
{
if (in_array($name, $this->allowedProperties)) {
$properties[$name] = $value;
} else {
throw new \LogicException("Property $name is not defined.");
}
}
}
If the property has read access only, you can use the @property-read annotation instead. Of course, you may also just have mistyped another name, in which case you should fix the error. See also the PhpDoc documentation for @property.
Loading history...
|
|||
52 | <p style="padding: 10px 15px; border-bottom: 1px solid #f0f4f7;"> |
||
53 | <?php if (Yii::$app->user->can('manage')) : ?> |
||
54 | <?= Yii::t('hipanel:finance:tariff', '{0}:', [Html::tag('b', $model->tariff->getAttributeLabel('note'))]) ?> |
||
0 ignored issues
–
show
The property
$tariff is declared protected in hipanel\modules\finance\forms\AbstractTariffForm . Since you implemented __get() , maybe consider adding a @property or @property-read annotation. This makes it easier for IDEs to provide auto-completion.
Since your code implements the magic setter <?php
/**
* @property int $x
* @property int $y
* @property string $text
*/
class MyLabel
{
private $properties;
private $allowedProperties = array('x', 'y', 'text');
public function __get($name)
{
if (isset($properties[$name]) && in_array($name, $this->allowedProperties)) {
return $properties[$name];
} else {
return null;
}
}
public function __set($name, $value)
{
if (in_array($name, $this->allowedProperties)) {
$properties[$name] = $value;
} else {
throw new \LogicException("Property $name is not defined.");
}
}
}
Since the property has write access only, you can use the @property-write annotation instead. Of course, you may also just have mistyped another name, in which case you should fix the error. See also the PhpDoc documentation for @property.
Loading history...
|
|||
55 | <?= \hipanel\widgets\XEditable::widget([ |
||
56 | 'model' => $model->tariff, |
||
0 ignored issues
–
show
The property
$tariff is declared protected in hipanel\modules\finance\forms\AbstractTariffForm . Since you implemented __get() , maybe consider adding a @property or @property-read annotation. This makes it easier for IDEs to provide auto-completion.
Since your code implements the magic setter <?php
/**
* @property int $x
* @property int $y
* @property string $text
*/
class MyLabel
{
private $properties;
private $allowedProperties = array('x', 'y', 'text');
public function __get($name)
{
if (isset($properties[$name]) && in_array($name, $this->allowedProperties)) {
return $properties[$name];
} else {
return null;
}
}
public function __set($name, $value)
{
if (in_array($name, $this->allowedProperties)) {
$properties[$name] = $value;
} else {
throw new \LogicException("Property $name is not defined.");
}
}
}
Since the property has write access only, you can use the @property-write annotation instead. Of course, you may also just have mistyped another name, in which case you should fix the error. See also the PhpDoc documentation for @property.
Loading history...
|
|||
57 | 'attribute' => 'note', |
||
58 | 'scenario' => 'set-note', |
||
59 | ]) ?> |
||
60 | <?php else : ?> |
||
61 | <?= Yii::t('hipanel:finance:tariff', '{0}: {1}', [Html::tag('b', $model->tariff->getAttributeLabel('note')), Html::encode($model->tariff->note)]) ?> |
||
0 ignored issues
–
show
The property
$tariff is declared protected in hipanel\modules\finance\forms\AbstractTariffForm . Since you implemented __get() , maybe consider adding a @property or @property-read annotation. This makes it easier for IDEs to provide auto-completion.
Since your code implements the magic setter <?php
/**
* @property int $x
* @property int $y
* @property string $text
*/
class MyLabel
{
private $properties;
private $allowedProperties = array('x', 'y', 'text');
public function __get($name)
{
if (isset($properties[$name]) && in_array($name, $this->allowedProperties)) {
return $properties[$name];
} else {
return null;
}
}
public function __set($name, $value)
{
if (in_array($name, $this->allowedProperties)) {
$properties[$name] = $value;
} else {
throw new \LogicException("Property $name is not defined.");
}
}
}
Since the property has write access only, you can use the @property-write annotation instead. Of course, you may also just have mistyped another name, in which case you should fix the error. See also the PhpDoc documentation for @property.
Loading history...
The property
note does not exist on object<hipanel\modules\finance\models\Tariff> . Since you implemented __get , maybe consider adding a @property annotation.
Since your code implements the magic getter <?php
/**
* @property int $x
* @property int $y
* @property string $text
*/
class MyLabel
{
private $properties;
private $allowedProperties = array('x', 'y', 'text');
public function __get($name)
{
if (isset($properties[$name]) && in_array($name, $this->allowedProperties)) {
return $properties[$name];
} else {
return null;
}
}
public function __set($name, $value)
{
if (in_array($name, $this->allowedProperties)) {
$properties[$name] = $value;
} else {
throw new \LogicException("Property $name is not defined.");
}
}
}
If the property has read access only, you can use the @property-read annotation instead. Of course, you may also just have mistyped another name, in which case you should fix the error. See also the PhpDoc documentation for @property.
Loading history...
|
|||
62 | <?php endif; ?> |
||
63 | </p> |
||
64 | <?php endif; ?> |
||
65 | <?php if (Yii::$app->user->can('manage')) : ?> |
||
66 | <?= TariffDetailMenu::widget(['model' => $model]) ?> |
||
67 | <?php endif ?> |
||
68 | </div> |
||
69 | <?php Box::end() ?> |
||
70 | </div> |
||
71 | <div class="col-md-9"> |
||
72 | <?= $this->render($type . '/view', ['model' => $model, 'manager' => $manager]) ?> |
||
73 | </div> |
||
74 | </div> |
||
75 |
Since your code implements the magic setter
_set
, this function will be called for any write access on an undefined variable. You can add the@property
annotation to your class or interface to document the existence of this variable.Since the property has write access only, you can use the @property-write annotation instead.
Of course, you may also just have mistyped another name, in which case you should fix the error.
See also the PhpDoc documentation for @property.