-
Notifications
You must be signed in to change notification settings - Fork 15
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
Try to increase quality of the codebase #1654
base: master
Are you sure you want to change the base?
Changes from all commits
1e8978c
c9bb779
3042e8f
2392857
ab8784b
c339bbd
22a76b8
ccb617b
73a2734
0fc16f8
8d483b3
f6a226c
79c7093
a0aab11
dcc84e1
0ab0172
6e3f88e
64e4f17
2457a28
492e3b4
1a19bde
ad4e372
00ade2e
caac319
b4fed3b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,8 @@ | |
*/ | ||
abstract class BaseShortcode { | ||
|
||
final public function __construct() { } | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Der Konstruktor wird aber nicht nochmal von den erbenden Klassen benutzt, muss der dann trotzdem hier angegeben werden? Bzw welchen Sinn hat es dann ihn da anzugeben? |
||
|
||
/** | ||
* The shortcode handler - load all the needed assets and render the map container | ||
* | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -286,7 +286,7 @@ public static function init( bool $ignoreErrors = false ):array{ | |
} | ||
try { | ||
$bookingRule->setAppliedParams( | ||
$ruleParams ?? [], | ||
$ruleParams, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Geht das dann immer noch mit Regeln die keine ruleParams definiert haben? Ich meine ich hab das eingeführt, weil es sonst einen fatal Error mit solchen Regeln gab. |
||
$selectParam ?? null | ||
); | ||
} catch ( BookingRuleException $e ) { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,7 @@ | |
use CommonsBooking\Map\MapAdmin; | ||
use CommonsBooking\Map\MapSettings; | ||
use CommonsBooking\Map\MapShortcode; | ||
use CommonsBooking\Repository\CB1; | ||
use CommonsBooking\Repository\Item; | ||
use CommonsBooking\Repository\Timeframe; | ||
use Exception; | ||
|
@@ -51,8 +52,7 @@ public static function getView() { | |
**/ | ||
public static function replace_map_link_target() { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Die Funktion ist sowieso unbenutzt, nicht? Also lohnt es sich vielleicht gar nicht da was dran zu ändern. |
||
global $post; | ||
$cb_item = 'cb_items'; | ||
if ( is_object( $post ) && $post->post_type == $cb_item ) { | ||
if ( is_object( $post ) && $post->post_type == CB1::$ITEM_TYPE_ID ) { | ||
//get timeframes of item | ||
$cb_data = new CB_Data(); | ||
$date_start = date( 'Y-m-d' ); // current date | ||
|
@@ -81,6 +81,9 @@ public static function replace_map_link_target() { | |
* load all timeframes from db (that end in the future and it's item's status is 'publish') | ||
**/ | ||
public static function get_timeframes() { | ||
|
||
$result = []; | ||
|
||
$timeframes = Timeframe::getBookableForCurrentUser( | ||
[], | ||
[], | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Funktioniert das auch? Also gibt der dann erfolgreich eine leere Liste zurück? Wenn ja kann das so bleiben.