Skip to content
This repository has been archived by the owner on May 17, 2022. It is now read-only.

Commit

Permalink
improvements in build component + refactorings
Browse files Browse the repository at this point in the history
  • Loading branch information
DaviMenezes committed Dec 19, 2019
1 parent 715f5d6 commit bfc03dd
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 5 deletions.
8 changes: 5 additions & 3 deletions src/Collection.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace Dvi\Support;

use Dvi\Corda\Support\Corda;
use Dvi\Corda\Support\Corda as str;
use Tightenco\Collect\Support\Collection as SupportCollection;

Expand All @@ -14,13 +15,14 @@
* @copyright Copyright (c) 2018. ([email protected])
* @see https://github.com/DaviMenezes
* @see https://t.me/davimenezes
* @method Corda first(callable $callback = null, $default = null)
*/
class Collection extends SupportCollection
{
/**
* @param $value
* @param null $glue
* @return Corda
* @return str
*/
public function implode($value, $glue = null)
{
Expand All @@ -30,7 +32,7 @@ public function implode($value, $glue = null)
/**
* @param $key
* @param null $default
* @return Corda|mixed
* @return str|mixed
*/
public function get($key, $default = null)
{
Expand All @@ -41,7 +43,7 @@ public function get($key, $default = null)
return $result;
}

/**@return Corda*/
/**@return str*/
public function route()
{
$this->map(function ($item, $key) use (&$url) {
Expand Down
3 changes: 2 additions & 1 deletion src/Corda.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
* @copyright Copyright (c) 2018. ([email protected])
* @see https://github.com/DaviMenezes
* @see https://t.me/davimenezes
* @method Corda first($n)
*/
class Corda extends Stringy
{
Expand All @@ -34,7 +35,7 @@ public function lines()
/**@return Collection*/
public function split($pattern, $limit = null)
{
return collect(parent::split($pattern, $limit));
return \collection(parent::split($pattern, $limit));
}

public function lastStr(string $separator)
Expand Down
2 changes: 2 additions & 0 deletions src/Http/Request.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@
*/
class Request
{
/**@var self*/
protected static $request;
/**@var self*/
private static $instance;

private function __construct()
Expand Down
3 changes: 2 additions & 1 deletion src/Service/Layout/Form/Field/Facade/FormField.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ class FormField
public function __construct(TField $field, $label = null)
{
$this->field = $field;
$field->setId($field->getName());
$this->field->setId($field->getName());
$this->field->setProperty('id', $field->getName());

if ($label) {
$this->setLabel($label);
Expand Down

0 comments on commit bfc03dd

Please sign in to comment.