Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove malfunctions #111

Merged
merged 2 commits into from
Mar 29, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/Controllers/CompaniesController.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
$this->request->getPost()
);

$this->persistent->searchParams = $query->getParams();
$this->persistent->searchParams = array('di'=>null) + $query->getParams();

Check warning on line 52 in src/Controllers/CompaniesController.php

View check run for this annotation

Codecov / codecov/patch

src/Controllers/CompaniesController.php#L52

Added line #L52 was not covered by tests
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you use the newer syntax (short) for the array please and also run it through codesniffer (spaces needed before and after =>)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have corrected it as requested.

}

$parameters = [];
Expand All @@ -71,7 +71,7 @@

$paginator = new Paginator([
'model' => Companies::class,
'data' => $companies,
'parameters' => $parameters,

Check warning on line 74 in src/Controllers/CompaniesController.php

View check run for this annotation

Codecov / codecov/patch

src/Controllers/CompaniesController.php#L74

Added line #L74 was not covered by tests
'limit' => 10,
'page' => $this->request->getQuery('page', 'int', 1),
]);
Expand Down
3 changes: 1 addition & 2 deletions src/Controllers/ProductsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@
$this->request->getPost()
);

//$this->persistent->searchParams = $query->getParams();
$this->persistent->searchParams = array('di'=>null) + $query->getParams();
}

Expand All @@ -78,7 +77,7 @@

$paginator = new Paginator([
'model' => Products::class,
"parameters" => $parameters,
'parameters' => $parameters,

Check warning on line 80 in src/Controllers/ProductsController.php

View check run for this annotation

Codecov / codecov/patch

src/Controllers/ProductsController.php#L80

Added line #L80 was not covered by tests
'limit' => 10,
'page' => $this->request->getQuery('page', 'int', 1),
]);
Expand Down
4 changes: 2 additions & 2 deletions src/Controllers/ProducttypesController.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
$this->request->getPost()
);

$this->persistent->searchParams = $query->getParams();
$this->persistent->searchParams = array('di'=>null) + $query->getParams();

Check warning on line 57 in src/Controllers/ProducttypesController.php

View check run for this annotation

Codecov / codecov/patch

src/Controllers/ProducttypesController.php#L57

Added line #L57 was not covered by tests
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have also modified this as per your request.
ProductsController also had the same part, so I modified that as well.

}

$parameters = [];
Expand All @@ -76,7 +76,7 @@

$paginator = new Paginator([
'model' => ProductTypes::class,
'data' => $productTypes,
'parameters' => $parameters,

Check warning on line 79 in src/Controllers/ProducttypesController.php

View check run for this annotation

Codecov / codecov/patch

src/Controllers/ProducttypesController.php#L79

Added line #L79 was not covered by tests
'limit' => 10,
'page' => $this->request->getQuery('page', 'int', 1),
]);
Expand Down